Skip to main content

Thread: Can't unmute using amixer


alright folks, here situation. want make program prevents me muting or turning down computer's sound (this alarm clock program - i'm heavy sleeper , i'm trying polyphasic sleep need clever , alarm). way want this, rather hackishly, run little script loops forever unmuting sound every second.

problem
code:
amixer -c 0 set master 100% unmute
doesn't work. if mute using amixer, unmute using amixer successful: unmutes. however, if mute computer using laptop's mute button, amixer doesn't appear anything.

what's strange appears work. example, if press mute button on keyboard, can this:
code:
toby@tensile:~$ amixer 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 mute button, can using amixer show status of master, , shows volume @ 89% , switched off - muted. when issue second command, sets volume 100% , seems think has switched on. hear no sound.

have tried increasing volume increment, using 'toggle' , else can think of, nothing works. modifying volume works fine - if turn down volume using laptop's volume control, can turn amixer. what's deal? appreciated!

oh! fixed it. turned out mute button on keyboard doing lot more muting master channel. muting headphone , speaker channel. strangely, if hit mute keyboard while alsamixer open, didn't show this, if muted , then opened alsamixer, saw other channels muted.

in addition, when turn volume down way using keyboard's volume control, affects master channel, except when volume turns 0%, pcm channel's volume goes 0%, in order turn volume up, needs dealt well.

if interested, here "don't let user mute or turn down volume!" script:

code:
#!/bin/bash   # takes volume level 0 100, inclusive, command line argument # every second, program unmutes various channels , sets master volume volume, ensuring user hasn't turned sound off or down  while true;   amixer set master $*% unmute > /dev/null # $* gets volume command line arg   amixer set headphone unmute > /dev/null   amixer set speaker unmute > /dev/null   amixer set pcm 100% unmute > /dev/null   sleep 1 done
marking thread solved. ubuntu forums, you're great bounce ideas off of!


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Multimedia Software [SOLVED] Can't unmute using amixer


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support