You are not logged in.

#1 2015-02-19 09:18:11

DoctorJellyface
Member
From: Slovakia
Registered: 2015-02-19
Posts: 40
Website

Kernel registers audio keys twice

EDIT: Looks like it's the fault of the kernel, not GNOME nor PulseAudio. Details in #7 to #10.

I'm not sure if to post this here or under Sound/Multimedia, but since sound is working OK, I'll put this here. First post though. Please try to be kind if I mess something up.

I'm having a slight annoyance with the GNOME shell. When I use the FN audio keys (FN + F11/F12) the sound changes, but twice. Two levels up or down. It's not a ground-breaking issue. But the worst thing about it is that it plays the "volume changed" sound twice.

I tried locating the sound file and playing it, and yes, the sound is only one pop, whereas I get two pops, with an indefinite pause in between. Sometimes it's like pop-pop, sometimes  popop, and sometimes  ppopop. It's quite an ugly sound.

I tried turning off the keyboard shortcut in the keyboard settings, and the sound didn't change at all, so I'm not running two things at the same time which both try to change the sound.

I'm running Arch (fully updated) on a HP Compaq 6735s (ya, it's a laptop).

Thanks.

Last edited by DoctorJellyface (2015-03-21 18:54:25)

Offline

#2 2015-02-21 18:19:09

DoctorJellyface
Member
From: Slovakia
Registered: 2015-02-19
Posts: 40
Website

Re: Kernel registers audio keys twice

Bump?

Offline

#3 2015-02-21 22:04:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,552
Website

Re: Kernel registers audio keys twice

Please do not bump.

Also, please feel free to use the report button for such requests:

DoctorJellyface wrote:

Admin, could you please move this over to Sound/Multimedia?

The only reason I saw this request was that someone else reported your 'bump'.

Mod Note: Moving to Multimedia per OP request.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#4 2015-02-22 07:00:56

DoctorJellyface
Member
From: Slovakia
Registered: 2015-02-19
Posts: 40
Website

Re: Kernel registers audio keys twice

Trilby wrote:

Please do not bump.

Sorry, wasn't aware of that, should have read the etiquette more thoroughly.

Trilby wrote:

Also, please feel free to use the report button for such requests:

DoctorJellyface wrote:

Admin, could you please move this over to Sound/Multimedia?

The only reason I saw this request was that someone else reported your 'bump'.

Sorry, wasn't aware of that either. Lesson learned!

Offline

#5 2015-02-22 08:27:58

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: Kernel registers audio keys twice

if this doesnt happen with regular apps, but only with gnome system sounds, its most likely not a pulse issue...

Last edited by Rasi (2015-02-22 08:28:15)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#6 2015-02-22 09:54:52

DoctorJellyface
Member
From: Slovakia
Registered: 2015-02-19
Posts: 40
Website

Re: Kernel registers audio keys twice

Rasi wrote:

if this doesnt happen with regular apps, but only with gnome system sounds, its most likely not a pulse issue...

No, all the other system sounds are OK, except for the volume change sound.

Offline

#7 2015-02-22 17:23:28

mkoskar
Member
Registered: 2014-07-16
Posts: 64
Website

Re: Kernel registers audio keys twice

This seems rather Gnome or your hardware specific issue. AFAIK pulseaudio itself doesn't bind any keys. I don't have Gnome nor I know its internals but I assume it simply binds <XF86AudioLowerVolume> <XF86AudioRaiseVolume>, which are then handled by calling pulseaudio or whatever else. E.g., I bind these keys in Xmonad and call "amixer" on default card to manipulate Master control  which in turns manipulates pulseaudio if it's running (otherwise defaults to ALSA).

Anyway, since you experience handling of particular key twice, it points to either HW issue where by pressing key once you get 2 "responses", or 2 applications are handling one response.

I would go with verifying of responses from ACPI driver, in virtual console, and possibly in X.

Refer to: https://wiki.archlinux.org/index.php/Ex … board_keys and https://wiki.archlinux.org/index.php/Ex … ys_in_Xorg

For verifying ACPI responses, install "acpid", start it, and then run "acpi_listen", you should see one line per key-press. Normally you don't need acpid to be running and probably you should verify what "events" and "handlers" are installed in there:

$ find /ect/acpi

In virtual console you can verify with "showkey".
Inside X you can verify with "xev" (below filter taken from Wiki mentioned above):

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

Since Gnome handles those you would most likely not seen those, I tried with my setup and thought with "xev -root" I would be able to see them but no (not sure why and how that exactly works). But once I unbind keys from WM I can see them firing.
Also listening to dbus with dbus-monitor might help (depending how Gnome actually communicates with pulseaudio).

Hope it helps wink.

Edit: typos

Last edited by mkoskar (2015-02-22 17:24:16)

Offline

#8 2015-02-27 17:32:23

DoctorJellyface
Member
From: Slovakia
Registered: 2015-02-19
Posts: 40
Website

Re: Kernel registers audio keys twice

Hey, thanks for the reply! Sorry for being so late, I never have time to do stuff like this throughout the week.

I tried using xev to monitor the keys, but it didn't catch them since I was on GNOME. Then I looked at the wiki pages you wrote about and tried this command under a TTY:

# showkey --keycodes

I played with it, and found out that the volume keys (XF86AudioLowerVolume & XF86AudioRaiseVolume) showed double events when pressed. To get the output available in through the X session, I just did a

# showkey --keycodes > /tmp/volume-keys-test

, pressed Fn + F11 and Fn + F12 (volume down, volume down), and got this output:

kb mode was UNICODE
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
keycode  28 release
keycode 114 press
keycode 114 release
keycode 114 press
keycode 114 release
keycode 115 press
keycode 115 release
keycode 115 press
keycode 115 release

So, keycode 28 is the return key, 114 is XF86AudioLowerVolume and 115 is XF86AudioRaiseVolume. Keep in mind that I only pressed those keys once. The same press on the brightness keys produced just one "press" and one "release" event.

Now it's sure that neither GNOME nor PulseAudio are to blame for this, so I hereby want to apologize to the devs about unrighteously blaming their code.

Anyone has an idea what could be wrong, or how to fix it? Thanks.

Offline

#9 2015-02-27 19:48:34

mkoskar
Member
Registered: 2014-07-16
Posts: 64
Website

Re: Kernel registers audio keys twice

Well, you might also try "acpid" as I mentioned in previous post. I believe it reads directly ACPI events as published by kernel, though based on you "showkey" results I would expect same result (double event for single trigger), nevertheless try it, it's easy to do.

If above would be the case, then I'm not sure. I haven't had such issue myself, but with my limited knowledge about this at this point I would go and study smile, but most likely I would try search internet, because if so, it would be HW related and likely already reported somewhere near kernel and particular acpi subsystem / drivers.

Offline

#10 2015-02-28 06:12:34

DoctorJellyface
Member
From: Slovakia
Registered: 2015-02-19
Posts: 40
Website

Re: Kernel registers audio keys twice

Thanks for the reply.

Well, I tried the test with acpid, same sequence, ran it with

# acpi_listen > /tmp/volume-keys-test-2

and pressed the volume down and up, once. I got

button/volumedown VOLDN 00000080 00000000 K
button/volumedown VOLDN 00000080 00000000 K
button/volumeup VOLUP 00000080 00000000 K
button/volumeup VOLUP 00000080 00000000 K

Not cool.

Offline

#11 2015-03-18 18:32:29

DoctorJellyface
Member
From: Slovakia
Registered: 2015-02-19
Posts: 40
Website

Re: Kernel registers audio keys twice

Could anyone point me to where I should report this and what information to provide? I never submitted a bug report directly to the Linux bugtracker before. Thanks.

Offline

#12 2015-03-21 18:49:25

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Kernel registers audio keys twice

Moving to Kernel and Hardware, as per request...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#13 2015-03-21 18:57:31

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Kernel registers audio keys twice

Have you checked your firmware (BIOS) options for any function-key related settings?

For reporting kernel bugs:
https://www.kernel.org/pub/linux/docs/l … -bugs.html

Offline

#14 2015-03-22 06:11:00

DoctorJellyface
Member
From: Slovakia
Registered: 2015-02-19
Posts: 40
Website

Re: Kernel registers audio keys twice

Head_on_a_Stick wrote:

Have you checked your firmware (BIOS) options for any function-key related settings?

No, double-checked that.

Thanks for the link, will look into that.

Offline

#15 2015-03-28 05:28:38

DoctorJellyface
Member
From: Slovakia
Registered: 2015-02-19
Posts: 40
Website

Re: Kernel registers audio keys twice

I reported the bug here: https://bugzilla.kernel.org/show_bug.cgi?id=95221

I had no idea where to put it, so I put it under Other/Other. Probably a bad idea, since it's been a week and no one responded.

Offline

Board footer

Powered by FluxBB