This will send the unmute command when the screen is locked, which might work. It will definitely work (tested) if what you want to do is just to unmute the sound when the screen is locked.
You can use Cuttlefish:
Cuttlefish is a tool that lets you do everything you want to under specific circumstances, like while locking your screen. Please see an introduction to Cuttlefish (it is very easy to use, but it would still be a lot easier with a video as an example): http://www.youtube.com/watch?v=U7mSfh9pqpg
So, you generally have to
Create a new Reflex and give it a name that you prefer
Click on 'Activated by stimulus'
Check as stimulus the 'Screen is locked' (under Screensaver header)
Go to the Reaction tab and add a new reaction from bottom left
Go to Applications->Start application (advanced mode)->OK
Click on the 'executable' which is by default firefox and alter it to /usr/bin/amixer (head to /usr/bin and select amixer
This will send the unmute command when the screen is locked, which might work. It will definitely work (tested) if what you want to do is just to unmute the sound when the screen is locked.
You can use Cuttlefish:
Cuttlefish is a tool that lets you do everything you want to under specific circumstances, like while locking your screen. Please see an introduction to Cuttlefish (it is very easy to use, but it would still be a lot easier with a video as an example): http://www.youtube.com/watch?v=U7mSfh9pqpg
So, you generally have to
/usr/bin/amixer
(head to /usr/bin and selectamixer
set 'Master' unmute
Tested and works fine under Ubuntu 12.04
You could try to install another screensaver alternative that could have another effect on your hardware: see How can I change or install screensavers?
Potential workaround - installing xscreensaver
Now remove gnome-screensaver
Now start the xscreensaver configuration tool - from a terminal:
there you can enter the time until screen-lock.