Discussion:
Multimedia/Volume Keys Not Working
(too old to reply)
Harvey Kelly
2013-02-11 17:50:02 UTC
Permalink
Hi everyone,

Running Wheezy and the multimedia/volume keys don't work in
Windowmaker (they work fine with Gnome and Xfce4), nor from the
console.

Using xev, it seems they've been mapped correctly (from an Arch wiki
page I ran this command):

xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode
/s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'

Which gave me the output:

123 XF86AudioRaiseVolume
122 XF86AudioLowerVolume
121 XF86AudioMute

The Debian wiki (http://wiki.debian.org/Keyboard/MultimediaKeys)
suggests mapping them with xmodmap - but that seems a little
redundant/wrong if xev is telling me they're already mapped (same with
xloadkeys).

I've tried installing/purging everything to do with Gnome (to get rid
of specifically pulseaudio), but that doesn't make any difference - l
even uninstalled ALSA and reinstalled with no joy.

Other function keys like brightness/dimming work fine, it's just the
volume up/down/mute that aren't working.

The card (according to alsamixer is a HDA Intel / Intel Cantiga HDMI).
Any help would be really appreciated.

Harvey
--
To UNSUBSCRIBE, email to debian-laptop-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/CAErRyQhDanNA6Psrk3WPg6U_bCzU_21DMC+LA+AJXJqYyXGv+***@mail.gmail.com
Matthew Dawson
2013-02-12 20:00:01 UTC
Permalink
Post by Harvey Kelly
Hi everyone,
Running Wheezy and the multimedia/volume keys don't work in
Windowmaker (they work fine with Gnome and Xfce4), nor from the
console.
Using xev, it seems they've been mapped correctly (from an Arch wiki
xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode
/s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
123 XF86AudioRaiseVolume
122 XF86AudioLowerVolume
121 XF86AudioMute
The Debian wiki (http://wiki.debian.org/Keyboard/MultimediaKeys)
suggests mapping them with xmodmap - but that seems a little
redundant/wrong if xev is telling me they're already mapped (same with
xloadkeys).
I've tried installing/purging everything to do with Gnome (to get rid
of specifically pulseaudio), but that doesn't make any difference - l
even uninstalled ALSA and reinstalled with no joy.
Other function keys like brightness/dimming work fine, it's just the
volume up/down/mute that aren't working.
The card (according to alsamixer is a HDA Intel / Intel Cantiga HDMI).
Any help would be really appreciated.
Harvey
Hi Harvey,

I think your problem may occur because you have nothing listening to those key
strokes. Gnome, Xfce 4, and other DE's have programs that listen for those
key presses and respond accordingly. It shouldn't be realted to either ALSA
or pulseaudio. Do you have an appropriate program running that listens to
them (I've never used Windowmaker, so I don't know what it would use)?

Matthew
--
To UNSUBSCRIBE, email to debian-laptop-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@ring00
Bob Proulx
2013-02-12 20:10:02 UTC
Permalink
Post by Matthew Dawson
Post by Harvey Kelly
Running Wheezy and the multimedia/volume keys don't work in
Windowmaker (they work fine with Gnome and Xfce4), nor from the
console.
I think your problem may occur because you have nothing listening to
those key strokes. Gnome, Xfce 4, and other DE's have programs that
listen for those key presses and respond accordingly. It shouldn't
be realted to either ALSA or pulseaudio. Do you have an appropriate
program running that listens to them (I've never used Windowmaker,
so I don't know what it would use)?
You didn't say what laptop model you have but my ThinkPad needs the
'tpb' (think pad buttons) package installed to handle those
functions. Here is some documentation on it.

http://www.thinkwiki.org/wiki/Tpb

Perhaps your laptop is similar.

Bob
Harvey Kelly
2013-02-12 22:00:02 UTC
Permalink
Hi Bob,
Post by Bob Proulx
You didn't say what laptop model you have but my ThinkPad needs the
'tpb' (think pad buttons) package installed to handle those
functions.
It's a Compaq Presario CQ70 - I haven't been able to find anything on
it/its multimedia keys online.

H
--
To UNSUBSCRIBE, email to debian-laptop-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@mail.gmail.com
Harvey Kelly
2013-02-14 14:30:03 UTC
Permalink
Just an update...
Post by Harvey Kelly
Post by Bob Proulx
You didn't say what laptop model you have but my ThinkPad needs the
'tpb' (think pad buttons) package installed to handle those
functions.
It's a Compaq Presario CQ70 - I haven't been able to find anything on
it/its multimedia keys online.
Installed Fluxbox and the multimedia keys work fine straight 'out of
the box' - forgot how much I like Fluxbox/Blackbox! I used Blackbox
years and years ago, so will probably stick with Fluxbox. As you
probably guessed, I'm trying to stay away from the Gnome/KDE behemoth
model, which is why I installed WindowMaker a few days ago and then
Fluxbox.

I'm reluctant to label this as 'solved' as it seems the problem lays
with WindowMaker/WPrefs, meaning I have to put these three commands...

amixer set Master 2%+
amixer set Master 2%-
amixer set Master toggle

... in menu items and bind shortcut keys to them, which is maybe only
semi-solved?

Oh yeah, Fluxbox is so great.
--
To UNSUBSCRIBE, email to debian-laptop-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/CAErRyQi7+9KP5LNAaSHCoVg=dCqyq2TVus8=***@mail.gmail.com
Andrey Rahmatullin
2013-02-14 14:40:01 UTC
Permalink
Post by Harvey Kelly
I'm reluctant to label this as 'solved' as it seems the problem lays
with WindowMaker/WPrefs, meaning I have to put these three commands...
amixer set Master 2%+
amixer set Master 2%-
amixer set Master toggle
... in menu items and bind shortcut keys to them, which is maybe only
semi-solved?
If you don't already have a daemon that can listen to multimedia keys you
can use xbindkeys.
--
WBR, wRAR
Harvey Kelly
2013-02-14 14:50:02 UTC
Permalink
Post by Andrey Rahmatullin
Post by Harvey Kelly
I'm reluctant to label this as 'solved' as it seems the problem lays
with WindowMaker/WPrefs, meaning I have to put these three commands...
amixer set Master 2%+
amixer set Master 2%-
amixer set Master toggle
... in menu items and bind shortcut keys to them, which is maybe only
semi-solved?
If you don't already have a daemon that can listen to multimedia keys you
can use xbindkeys.
Yeah, I tried xbindkeys (it didn't work). In WindowMaker I ran this command:

xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode
/s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'

Which gave me the output:

123 XF86AudioRaiseVolume
122 XF86AudioLowerVolume
121 XF86AudioMute

So the keys are being recognised with xev, just not picked up by
WindowMaker, whereas they are by Fluxbox. (My understanding is that
xbindkeys is used when say XF86AudioMute doesn't correspond to muting
the sound.)
Anyway, a few days ago I did try xbindkeys, and nothing happened with the sound.
--
To UNSUBSCRIBE, email to debian-laptop-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/CAErRyQi4N6YF6YGjJ+JxXNbbOcAQP=***@mail.gmail.com
Andrey Rahmatullin
2013-02-14 17:50:02 UTC
Permalink
Post by Harvey Kelly
So the keys are being recognised with xev, just not picked up by
WindowMaker
Should they?
if not, try xbindkeys.
Post by Harvey Kelly
(My understanding is that xbindkeys is used when say XF86AudioMute
doesn't correspond to muting the sound.)
xbindkeys doesn't know anything about sound.
Post by Harvey Kelly
Anyway, a few days ago I did try xbindkeys, and nothing happened with the sound.
Did you configure xbindkeys to change the volume? Are you sure the command
didn't run?
--
WBR, wRAR
Harvey Kelly
2013-02-14 18:10:01 UTC
Permalink
Hi there,
Post by Andrey Rahmatullin
Post by Harvey Kelly
So the keys are being recognised with xev, just not picked up by
WindowMaker
Should they?
I have no idea.
Post by Andrey Rahmatullin
if not, try xbindkeys.
I did :-)
Post by Andrey Rahmatullin
Post by Harvey Kelly
Anyway, a few days ago I did try xbindkeys, and nothing happened with the sound.
Did you configure xbindkeys to change the volume? Are you sure the command
didn't run?
I was sure it was running, and configured correctly.

This is a bit of a moot point now anyway, Fluxbox is installed and
tweaked/configured, WindowMaker was un-installed a couple of days ago.

Thanks.
--
To UNSUBSCRIBE, email to debian-laptop-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/CAErRyQhg1ipgJVvWGST=G1xGep3c3TvwGU+***@mail.gmail.com
Harvey Kelly
2013-02-12 22:00:02 UTC
Permalink
Hi Matthew,
Post by Matthew Dawson
I think your problem may occur because you have nothing listening to those key
strokes. Gnome, Xfce 4, and other DE's have programs that listen for those
key presses and respond accordingly. It shouldn't be realted to either ALSA
or pulseaudio. Do you have an appropriate program running that listens to
them (I've never used Windowmaker, so I don't know what it would use)?
Ah I see - sorry, that seems obvious now! No, I don't have anything
waiting to listen for keystrokes, I thought that facility came
directly from the kernel not the DE? And yup, I made sure I had the
right keyboard selected via dpkg-reconfigure keyboard-configuration.

I've got a work-around functioning:
Using WPrefs I put the following commands...

amixer set Master 2%+
amixer set Master 2%-
amixer set Master toggle

... in menu items and bound shortcut keys to them. Frustratingly there
doesn't seem to be a config file for Windowmaker to add keyboard
shortcuts, everything has to be done through WPrefs (modifying
pre-existing ones).

Harvey
--
To UNSUBSCRIBE, email to debian-laptop-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/CAErRyQhmMQThE75+oDPv=1t1tV2CkCNwApv-h2y--***@mail.gmail.com
Facundo Aguirre
2013-02-15 17:10:02 UTC
Permalink
Hi Harvey,

I have a HP dv5 and had exactly the same issue, but with dwm.

I finally got it working with xbindkeys. It installs the file
/etc/X11/Xsession.d/98xbindkeys, so xbindkeys is started with X.

You can use xbindkeys-config for a graphical configuration.

My .xbdinkeysrc for those keys is (using cmus as music player):

# (un)mute
"amixer -c0 set Master toggle"
m:0x0 + c:121
# XF86AudioMute

# volume up
"amixer -c0 set Master 1+ unmute"
Shift + m:0x0 + c:123
# XF86AudioRaiseVolume

# volume down
"amixer -c0 set Master 1-"
Shift + m:0x0 + c:122
# XF86AudioLowerVolume

# more volume up
"amixer -c0 set Master 10+ unmute"
m:0x0 + c:123
# XF86AudioRaiseVolume

# more volume down
"amixer -c0 set Master 10-"
m:0x0 + c:122
# XF86AudioLowerVolume

# play / pause
"cmus-remote -u"
m:0x0 + c:172
# XF86AudioPlay

# stop
"cmus-remote -s"
m:0x0 + c:174
# XF86AudioStop

# next
"cmus-remote -n"
m:0x0 + c:171
# XF86AudioNext

Facundo
Post by Harvey Kelly
Hi everyone,
Running Wheezy and the multimedia/volume keys don't work in
Windowmaker (they work fine with Gnome and Xfce4), nor from the
console.
Using xev, it seems they've been mapped correctly (from an Arch wiki
xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode
/s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
123 XF86AudioRaiseVolume
122 XF86AudioLowerVolume
121 XF86AudioMute
The Debian wiki (http://wiki.debian.org/Keyboard/MultimediaKeys)
suggests mapping them with xmodmap - but that seems a little
redundant/wrong if xev is telling me they're already mapped (same with
xloadkeys).
I've tried installing/purging everything to do with Gnome (to get rid
of specifically pulseaudio), but that doesn't make any difference - l
even uninstalled ALSA and reinstalled with no joy.
Other function keys like brightness/dimming work fine, it's just the
volume up/down/mute that aren't working.
The card (according to alsamixer is a HDA Intel / Intel Cantiga HDMI).
Any help would be really appreciated.
Harvey
--
--
To UNSUBSCRIBE, email to debian-laptop-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@who.void
Harvey Kelly
2013-02-16 02:20:01 UTC
Permalink
Hi Facundo,

Thanks for that. I did actually try xbindkeys before, and I was sure
my config was correct, but obviously I was wrong: I didn't point at
the card like you did (with -c0) and think there's where I went wrong
as everything else in your rc file is identical to my .xbindkeysrc.

Thanks again, and thanks to everyone who tried to help - especially
Andrey Rahmatul who tried insisting I give xbindkeys another go! :-)

H

On 15 February 2013 16:51, Facundo Aguirre
Post by Facundo Aguirre
# (un)mute
"amixer -c0 set Master toggle"
m:0x0 + c:121
# XF86AudioMute
# volume up
"amixer -c0 set Master 1+ unmute"
Shift + m:0x0 + c:123
# XF86AudioRaiseVolume
# volume down
"amixer -c0 set Master 1-"
Shift + m:0x0 + c:122
# XF86AudioLowerVolume
# more volume up
"amixer -c0 set Master 10+ unmute"
m:0x0 + c:123
# XF86AudioRaiseVolume
# more volume down
"amixer -c0 set Master 10-"
m:0x0 + c:122
# XF86AudioLowerVolume
# play / pause
"cmus-remote -u"
m:0x0 + c:172
# XF86AudioPlay
# stop
"cmus-remote -s"
m:0x0 + c:174
# XF86AudioStop
# next
"cmus-remote -n"
m:0x0 + c:171
# XF86AudioNext
--
To UNSUBSCRIBE, email to debian-laptop-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/CAErRyQgfquMdu+3Rmrtka-xGqQaK+W-hKA5wfZetn-***@mail.gmail.com
Continue reading on narkive:
Loading...