12

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.

4 Answers 4

10

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>
8
  • 2
    I think openbox --reconfigure is needed for changes to take effect, but it's still not working for me. I normally have to hit Fn in conjunction with F1, F2, and F3 for volume control (not working) and F5 and F6 for brightness control (which does work).
    – Michael
    Jul 7, 2018 at 18:30
  • Ok I take that back, it's actually working, but there is no indicator like the large overlay that shows up when I adjust brightness.
    – Michael
    Jul 7, 2018 at 20:38
  • @Michael, you are right! This DE doesn't show any OSD overlay for sound. As I never used one, I don't know any one. But you can try google it or even trying to use xfce's one
    – meetnick
    Jul 9, 2018 at 11:59
  • @Michael, Have you found a solution for indicating volume control? I'm having the same issue.
    – Mahdi-Malv
    May 3, 2019 at 10:28
  • @Mahdi-Malv not yet
    – Michael
    May 3, 2019 at 18:49
3

Try to change some commands in $HOME/.config/openbox/lubuntu-rc.xml

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

In Lubuntu 18.04.1 my speaker volume control hot keys did not work. In trying to find a way to edit the lubuntu-rc.xml file I found a GUI approach to achieving the same results as answered by @spucktek and @Alexander Mordovskiy. The solution is still to change the XF86Audio command lines from "-q sset" to "-D pulse sset".

To modify the lubuntu-rc.xml file in the GUI -> select "Menu" from the desktop panel, my menu button is on the bottom, -> then "Preferences" -> "Set Up Hot Keys".
The LXHotkey panel opens up. There are two tabs at the top of the panel, Actions and Programs. -> Select the Programs tab.

Find the "XF86AudioRaiseVolume" asset under the Hotkey 1 column.
-> doubleclick 'XF86AudioRaiseVolume' and a small edit panel opens. -> in command line field change the "amixer -q sset Master 3%+ unmute" line from 'amixer -q sset' to "amixer -D pulse sset"

The command line should now read "amixer -D pulse sset Master 3%+ unmute" -> click the [check button] at the top of the panel to apply the changes.

Repeat for entries "XF86AudioLowerVolume" and "XF86AudioMute". Once you're finished -> save your changes by clicking the "folder" icon button located directly below the "Edit" menu.

Hopefully a noob like myself will find this helpful.

0

Try keytouch, a keyboard shortcuts editor.

Install in the terminal by typing

sudo apt-get install keytouch-editor

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .