After installing Lubuntu 16.10 on my Lenovo Y510P, the key binding for volume control (Fn + Left/Right) were not working.
I found out that all key bindings can be easily configured using the XML configuration file ~/.config/openbox/lubuntu-rc.xml.
The default commands were configured as follows:
<!-- Keybinding for Volume management --> <keybind key="XF86AudioRaiseVolume"> <action name="Execute"> <command>amixer -q sset Master 3%+ unmute</command> </action> </keybind> <keybind key="XF86AudioLowerVolume"> <action name="Execute"> <command>amixer -q sset Master 3%- unmute</command> </action> </keybind>
When executing these commands on the console (lxterminal), I received the following error message:
$ amixer -q sset Master 3%+ unmute amixer: Unable to find simple control 'Master',0
It appeared that the simple channel name was wrong.
The problem could easily be fixed by manually selecting the first sound card via -c 1 (the option -q serves to suppress any standard output):
amixer -q -c 1 -- sset Master playback 3%+ unmute # increase volume by 3% amixer -q -c 1 -- sset Master playback 3%- unmute # decrease volume by 3%
The modified part of the configuration files looks as follows. Note: The X server needs to be restarted for the changes to take effect!
<!-- Keybinding for Volume management --> <keybind key="XF86AudioRaiseVolume"> <action name="Execute"> <!--<command>amixer -q sset Master 3%+ unmute</command>--> <command>amixer -q -c 1 -- sset Master playback 3%+ unmute</command> </action> </keybind> <keybind key="XF86AudioLowerVolume"> <action name="Execute"> <command>amixer -q -c 1 -- sset Master playback 3%- unmute</command> </action> </keybind> <keybind key="XF86AudioMute"> <action name="Execute"> <command>amixer -c 1 -- sset Master toggle</command> </action> </keybind>