You are not logged in.

#1 2016-10-24 13:10:03

JakeStanger
Member
Registered: 2016-08-12
Posts: 19

Media keys detected by showkey, but not by xev

My media keys have always worked without an issue until recently, when they just...stopped working... (I believe some package update somewhere may be responsible but I haven't a clue what...). Using showkey shows the keys still work and are still detected at least somewhat (with a keycode of 164 and a scancode of 0xe0 0x22), however Xorg's xev do not detect the keys at all.

It seems odd to me that this would be the case, so if somebody with more of a clue than I have about this sorta thing could help that'll be much appreciated...

A couple of things worth noting:
-The keyboard is a USB Microsoft Wired 600, so nothing special
-My desktop environment is Cinnamon

Offline

#2 2016-10-24 15:54:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,801

Re: Media keys detected by showkey, but not by xev

I don't use Cinnamon, but is there any chance you are now running Wayland instead of Xorg?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-10-24 16:20:16

JakeStanger
Member
Registered: 2016-08-12
Posts: 19

Re: Media keys detected by showkey, but not by xev

ewaller wrote:

I don't use Cinnamon, but is there any chance you are now running Wayland instead of Xorg?

I have an Xorg process running and no mention of Wayland running, and commands such as xrandr still work fine, so I'm definitely still running Xorg.

Offline

#4 2016-10-24 21:21:55

seth
Member
Registered: 2012-09-03
Posts: 51,456

Re: Media keys detected by showkey, but not by xev

xev won't see keys which are actively grabbed or xmodmap'd away. also the used keyboard layout/model (man setxkbmap) matters.
The media keys are likely grabbed by something, try a failsafe session (ie. only X11 and an xterm - no fancy desktop, daemons, ...)

Offline

#5 2016-10-24 22:08:29

JakeStanger
Member
Registered: 2016-08-12
Posts: 19

Re: Media keys detected by showkey, but not by xev

seth wrote:

xev won't see keys which are actively grabbed or xmodmap'd away. also the used keyboard layout/model (man setxkbmap) matters.
The media keys are likely grabbed by something, try a failsafe session (ie. only X11 and an xterm - no fancy desktop, daemons, ...)

I ended the Xorg process, and then ran xinit and the same thing happened still..showkey works fine and xev does not...

Offline

#6 2016-10-24 22:14:03

seth
Member
Registered: 2012-09-03
Posts: 51,456

Re: Media keys detected by showkey, but not by xev

"setxkbmap -print -query" ?

Offline

#7 2016-10-24 22:19:59

JakeStanger
Member
Registered: 2016-08-12
Posts: 19

Re: Media keys detected by showkey, but not by xev

seth wrote:

"setxkbmap -print -query" ?

xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+gb+inet(evdev)"	};
	xkb_geometry  { include "pc(pc104)"	};
};
rules:      evdev
model:      evdev
layout:     gb

From inside Cinnamon. In a plain Xorg server the only difference is the layout is US.

Offline

#8 2016-10-24 22:58:16

seth
Member
Registered: 2012-09-03
Posts: 51,456

Re: Media keys detected by showkey, but not by xev

setxkbmap -model pc105
or try
setxkbmap -model microsoftmult

(You do not need to restart X11)

It's rather odd, though.

Offline

#9 2016-10-24 23:03:34

JakeStanger
Member
Registered: 2016-08-12
Posts: 19

Re: Media keys detected by showkey, but not by xev

seth wrote:

setxkbmap -model pc105
or try
setxkbmap -model microsoftmult

(You do not need to restart X11)

It's rather odd, though.

Nope, nothing from either of them...

It does seem very odd, especially as they were working absolutely fine and I've never had to touch the key mappings...There's also a calculator button which stopped working alongside the media keys if that makes any difference at all...

Offline

#10 2016-10-30 12:47:11

seth
Member
Registered: 2012-09-03
Posts: 51,456

Re: Media keys detected by showkey, but not by xev

Does "sudo evtest" show the events?
And if, which codes?

Offline

#11 2016-10-30 19:33:09

gnumdk
Member
Registered: 2009-10-15
Posts: 175

Re: Media keys detected by showkey, but not by xev

Same here, not mediakeys since recent update

Offline

#12 2016-11-01 20:26:46

JakeStanger
Member
Registered: 2016-08-12
Posts: 19

Re: Media keys detected by showkey, but not by xev

evtest does not detect the keys.

Offline

#13 2016-11-01 21:27:50

seth
Member
Registered: 2012-09-03
Posts: 51,456

Re: Media keys detected by showkey, but not by xev

Ewww.
You did test all relevant sources? (Eg. my media keys are in event1 while the regular ones are in event0)

Sounds like a bug in systemd then (somewhere around /usr/lib/udev/hwdb.d/60-keyboard.hwdb)
Does that fit either of your pacman logs?

Offline

#14 2016-11-03 17:49:07

JakeStanger
Member
Registered: 2016-08-12
Posts: 19

Re: Media keys detected by showkey, but not by xev

Ah, glad you said that. Found my keyboard is indeed split into two sources, and the media keys only show up in the second source as the correct keys.

Here's everything I got for each key:

Event: time 1478195188.348728, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00cd
Event: time 1478195188.348728, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 1
Event: time 1478195188.348728, -------------- SYN_REPORT ------------
Event: time 1478195188.436716, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00cd
Event: time 1478195188.436716, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 0
Event: time 1478195188.436716, -------------- SYN_REPORT ------------
Event: time 1478195192.300737, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00ea
Event: time 1478195192.300737, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
Event: time 1478195192.300737, -------------- SYN_REPORT ------------
Event: time 1478195192.380718, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00ea
Event: time 1478195192.380718, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
Event: time 1478195192.380718, -------------- SYN_REPORT ------------
Event: time 1478195193.204728, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e9
Event: time 1478195193.204728, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 1478195193.204728, -------------- SYN_REPORT ------------
Event: time 1478195193.260743, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e9
Event: time 1478195193.260743, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 1478195193.260743, -------------- SYN_REPORT ------------
Event: time 1478195194.532731, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e2
Event: time 1478195194.532731, type 1 (EV_KEY), code 113 (KEY_MUTE), value 1
Event: time 1478195194.532731, -------------- SYN_REPORT ------------
Event: time 1478195194.620723, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e2
Event: time 1478195194.620723, type 1 (EV_KEY), code 113 (KEY_MUTE), value 0
Event: time 1478195194.620723, -------------- SYN_REPORT ------------
Event: time 1478195196.348732, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0192
Event: time 1478195196.348732, type 1 (EV_KEY), code 140 (KEY_CALC), value 1
Event: time 1478195196.348732, -------------- SYN_REPORT ------------
Event: time 1478195196.436733, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0192
Event: time 1478195196.436733, type 1 (EV_KEY), code 140 (KEY_CALC), value 0
Event: time 1478195196.436733, -------------- SYN_REPORT ------------

Sorry I didn't see the extra source at first; I know to look out for that in the future.

Last edited by JakeStanger (2016-11-03 17:49:39)

Offline

#15 2016-11-03 20:24:20

seth
Member
Registered: 2012-09-03
Posts: 51,456

Re: Media keys detected by showkey, but not by xev

Looks fine (at least playpause equals mine and codes ain't > 255)
Maybe it's shadowed by some other input device? What's the output of "xinput"?

Offline

#16 2016-11-04 17:55:10

JakeStanger
Member
Registered: 2016-08-12
Posts: 19

Re: Media keys detected by showkey, but not by xev

⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Razer Razer Ouroboros                   	id=10	[slave  pointer  (2)]
⎜   ↳ Razer Razer Ouroboros                   	id=11	[slave  pointer  (2)]
⎜   ↳ Microsoft Wired Keyboard 600            	id=15	[slave  pointer  (2)]
⎜   ↳ USB Mouse                               	id=16	[slave  pointer  (2)]
⎜   ↳ Afterglow AX.1 Gamepad for Xbox 360     	id=18	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Power Button                            	id=8	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=9	[slave  keyboard (3)]
    ↳ Razer Razer Ouroboros                   	id=12	[slave  keyboard (3)]
    ↳ Microsoft Wired Keyboard 600            	id=13	[slave  keyboard (3)]
    ↳ Microsoft Wired Keyboard 600 (keys)     	id=14	[slave  keyboard (3)]
    ↳ Afterglow AX.1 Gamepad for Xbox 360 (keys)	id=17	[slave  keyboard (3)]
    ↳ Microsoft Wired Keyboard 400            	id=19	[slave  keyboard (3)]
    ↳ Razer Razer Ouroboros                   	id=20	[slave  keyboard (3)]

Don't judge my awful peripheral setup...

Also, I have tested unplugging the second keyboard and it doesn't make the slightest difference (this was plugged in when the media keys worked too).

Offline

#17 2016-11-04 19:43:47

seth
Member
Registered: 2012-09-03
Posts: 51,456

Re: Media keys detected by showkey, but not by xev

I'd still try to remove the second keyboard but even more important the gamepad and especially t he mouse that shows up as 4 devices (replace it with some simple nice three buttons and a wheel rodant) - just to figure whether this is the cause or not.

Offline

#18 2016-11-04 19:52:03

JakeStanger
Member
Registered: 2016-08-12
Posts: 19

Re: Media keys detected by showkey, but not by xev

Here is my xinput without any of the extra peripherals:

⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Microsoft Wired Keyboard 600            	id=12	[slave  pointer  (2)]
⎜   ↳ USB Mouse                               	id=13	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Power Button                            	id=8	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=9	[slave  keyboard (3)]
    ↳ Microsoft Wired Keyboard 600            	id=10	[slave  keyboard (3)]
    ↳ Microsoft Wired Keyboard 600 (keys)     	id=11	[slave  keyboard (3)]

Media keys still not working with everything unplugged.

I had two mice plugged in before by the way; the doubling up is all part of my over-complicated VM setup. None of the peripherals have changed since the media keys stopped working, just to make that super clear.

Offline

#19 2016-11-04 20:36:05

seth
Member
Registered: 2012-09-03
Posts: 51,456

Re: Media keys detected by showkey, but not by xev

Seems to be a super-weid bug in xf86-input-evdev then, try downgrading
https://archive.archlinux.org/packages/ … put-evdev/

Offline

#20 2016-11-04 21:11:12

JakeStanger
Member
Registered: 2016-08-12
Posts: 19

Re: Media keys detected by showkey, but not by xev

Nope, this didn't help either. Sigh...

This is more than likely entirely useless, but I noticed it recently and figured I might as well explain anyway:
-If I pass my keyboard through to my Windows VM, then share it using Synergy from the VM back to the host (using the VM as the Synergy server) the media keys work again.

Offline

#21 2016-11-05 15:05:20

seth
Member
Registered: 2012-09-03
Posts: 51,456

Re: Media keys detected by showkey, but not by xev

virtualbox will read the raw xinput2 events and Synergy probably utilize the XTST keyboard.
It however means the keys are not grabbed or modmapped away. If there's no problem with the xf86-input-evdev driver (you did restart X11 after the update?!) I can only assume the layout/variant/model are somehow wonky.

Say hello to your german keyboard:

setxkbmap -layout de -model evdev -option terminate:ctrl_alt_bksp,ctrl:nocaps -variant deadgraveacute -rules xorg -keycodes evdev

Try again. Most alphanumerc keys (qwertZ) are normal, the rest not so much. autorepeat likely won't work right after calling this (but that's unrelated)
If things (should) work again (notably the MM keys should),

setxkbmap -layout gb -model evdev -option terminate:ctrl_alt_bksp,ctrl:nocaps -rules xorg -keycodes evdev

Offline

#22 2016-11-05 20:33:25

JakeStanger
Member
Registered: 2016-08-12
Posts: 19

Re: Media keys detected by showkey, but not by xev

Running the first command successfully updated the keyboard layout but the media keys are still not working. The second command set it back to GB layout but they're still not working...

I wonder if something else is interfering? Perhaps the Cinnamon keyboard settings (although I haven't touched them)?

Offline

#23 2016-11-05 20:50:34

seth
Member
Registered: 2012-09-03
Posts: 51,456

Re: Media keys detected by showkey, but not by xev

You said, it also happens with a naked X server?

ran xinit and the same thing happened still

Offline

#24 2016-11-05 20:51:58

JakeStanger
Member
Registered: 2016-08-12
Posts: 19

Re: Media keys detected by showkey, but not by xev

Very true, I forgot all about that. It's been a long couple of weeks...

Offline

#25 2016-11-05 22:14:15

seth
Member
Registered: 2012-09-03
Posts: 51,456

Re: Media keys detected by showkey, but not by xev

What's odd are the three input devices for the keyboard (it's not odd to have one as pointer)
Check what devices they map to:

xinput list-props <id> | grep Node # use actual IDs

and recheck the devices that map to the usable keyboard, maybe also

xinput test <id>

One is probably superfluous, in doubt,

xinput disable <id of second keyboard entry>, xinput enable <id of pointer entry>

et vv. an see what happens...

Offline

Board footer

Powered by FluxBB