I found a solution. Apparently, the values of some dconf
keys were mixed up, see here. All I did was:
gsettings reset org.gnome.settings-daemon.plugins.media-keys volume-up
gsettings reset org.gnome.settings-daemon.plugins.media-keys volume-down
gsettings reset org.gnome.settings-daemon.plugins.media-keys volume-mute
Works wonderful now. Thank you all for your help!
IMPROVED ANSWER:
See Mute button won't toggle / un-mute for how to add "-D pulse" to mute using the Preferences menu.
The following is how to adjust it by editing a configuration file:
Insert "-D pulse" as in the following lines, in .config/openbox/lubuntu-rc.xml
<!-- Keybinding for Volume management -->
<keybind key="XF86AudioRaiseVolume">
<action name="Execute">
<command>amixer -q -D pulse sset Master 3%+ unmute</command>
</action>
</keybind>
<keybind key="XF86AudioLowerVolume">
<action name="Execute">
<command>amixer -q -D pulse sset Master 3%- unmute</command>
</action>
</keybind>
<keybind key="XF86AudioMute">
<action name="Execute">
<command>amixer -q -D pulse sset Master toggle</command>
</action>
</keybind>
My previous answer doesn't work with sound from all pulse audio applications, such as playing YouTube in Firefox. The above answer works.
See SOLVED Can't unmute using amixer at Ubuntu forums for the sources of this improvement in the command.
My previous answer, for reference:
Open alsamixer in LXTerminal to see what sound controls get muted and unmuted when you press the mute button repeatedly. You might find that the mute button mutes "Master" and some other volume controls. You might find that using any mute in alsamixer (pressing the m key) mutes everything else.
To adjust what the keyboard mute button does, one way is to edit /home/[username]/.config/openbox/lubuntu-rc.xml
(If you don't have that file $HOME/.config/openbox/lubuntu-rc.xml you can make it by copying /usr/share/lubuntu/openbox/rc.xml to $HOME/.config/openbox/lubuntu-rc.xml )
I made comments out of the original commands for volume and mute controls there, and inserted my own commands. Now the section of my lubuntu-rc.xml titled "Keybinding for Volume management" looks like this:
<!-- Keybinding for Volume management -->
<!-- sde Whether using command amixer or alsamixer in lxterminal,
setting any control to `mute` sets several other controls to
mute, which don't get reset when setting Master to `unmute`
(even when those settings are by `toggle`) -->
<keybind key="XF86AudioRaiseVolume">
<action name="Execute">
<!-- <command>amixer -q sset Master 3%+ unmute</command> -->
<command>bash -c "amixer -q sset Master 1%+ unmute; amixer sset Front unmute; amixer sset Surround unmute; amixer sset Center unmute; amixer sset LFE unmute"</command>
</action>
</keybind>
<keybind key="XF86AudioLowerVolume">
<action name="Execute">
<!-- <command>amixer -q sset Master 3%- unmute</command> -->
<command>bash -c "amixer -q sset Master 1%- unmute; amixer sset Front unmute; amixer sset Surround unmute; amixer sset Center unmute; amixer sset LFE unmute"</command>
</action>
</keybind>
<keybind key="XF86AudioMute">
<action name="Execute">
<!-- <command>amixer -q sset Master toggle</command> -->
<command>bash -c "amixer -q sset Master toggle; amixer sset Front unmute; amixer sset Surround unmute; amixer sset Center unmute; amixer sset LFE unmute"</command>
</action>
</keybind>
This works in Lubuntu 17.10 and should work in earlier versions too.
Run "amixer scontrols" to see what names of controls you can use for your own modifications.
Save a backup file for lubuntu-rc.xml so that you can replace it from a terminal if your changes go wrong, then restart lubuntu or openbox, to hear if your changes work.
(I know this isn't an easy adjustment, but it does answer whether it's possible to fix.)
Best Answer
Had the same problem on my Dell D630; it's a Lubuntu thing.
Open Menu>Prefrences>Setup Hot Keys
Click the 'Programs' tab and locate the command "amixer -q sset Master toggle"
Double-click the command and modify to this: "amixer -D pulse -q sset Master toggle".
This will make the mute button toggle properly. If you want the volume keys to unmute as well, the command "-D pulse" can be inserted into those commands in the same fashion (e.g.: "amixer -D pulse -q sset Master 3%+ unmute")
Hope this helps!