Alright folks, here is the situation. I want to make a program that prevents me from muting or turning down my computer's sound (this is for an alarm clock program - I'm a heavy sleeper and I'm trying polyphasic sleep so I really need a clever and good alarm). The way I want to do this, rather hackishly, is to just run a little script that loops forever unmuting the sound every second.

The only problem is that
Code:
amixer -c 0 set Master 100% unmute
doesn't work. If I mute using amixer, then unmute using amixer is successful: it unmutes. However, if I mute my computer using my laptop's mute button, amixer doesn't appear to do anything.

What's strange is that it appears to work. For example, if I press the mute button on my keyboard, I can do this:
Code:
toby@tensile:~$ amixer get Master
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 57 [89%] [-5.25dB] [off]
toby@tensile:~$ amixer set Master 100% unmute
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 64 [100%] [0.00dB] [on]
You can see that, after having pressed the mute button, I can using amixer get to show the status of Master, and it shows the volume at 89% and that it is switched off - muted. When I issue the second command, it sets the volume to 100% and seems to think it has switched it on. But I hear no sound.

I have tried increasing the volume by an increment, using 'toggle' and everything else I can think of, but nothing works. Modifying the volume works fine - if I turn down the volume using my laptop's volume control, I can successfully turn it back up with amixer. What's the deal? Any help would be very appreciated!