Ubuntu – Volume Hot Key not working in Lubuntu

keyboardlubuntushortcut-keyssound

I installed Lubuntu(14.04.2 LTS) in my Lenovo Z510.

The multimedia hot keys in my laptop is independent. Means to use multimedia keys I don't have to press Fn key. The brightness hot keys are working perfectly but only the volume buttons(mute, volume up, volume down) not working.

I tried

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

but still nothing happens.

Best Answer

  • on 17.04, default volume commands won't work, because on ~/.config/openbox/lubuntu-rc.xml the amixer command is wrong. In order to fix it, find "XF86Audio" key tags

    <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>
        <keybind key="XF86AudioMute">
          <action name="Execute">
            <command>amixer -q sset Master toggle</command>
          </action>
        </keybind>
    

    change amixer -q option to "amixer -D pulse". the file must be like the following:

    <!-- Keybinding for Volume management -->
        <keybind key="XF86AudioRaiseVolume">
          <action name="Execute">
            <command>amixer -D pulse sset Master 3%+ unmute</command>
          </action>
        </keybind>
        <keybind key="XF86AudioLowerVolume">
          <action name="Execute">
            <command>amixer -D pulse sset Master 3%- unmute</command>
          </action>
        </keybind>
        <keybind key="XF86AudioMute">
          <action name="Execute">
            <command>amixer -D pulse sset Master toggle</command>
          </action>
        </keybind>
    
  • Related Question