Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Keyboard randomly generate XF86WakeUp codes in KDE
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Markand
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2008
Posts: 76

PostPosted: Thu Dec 07, 2017 2:04 pm    Post subject: [Solved] Keyboard randomly generate XF86WakeUp codes in KDE Reply with quote

Hello,

I have a Cherry Strait 3.0 black keyboard.

It works fine on any WM (dwm, pekwm), but on KDE I'm getting a curious behaviour, it randomly drop keystrokes so I sometimes need to type a key twice or more. It never happens on the internal laptop keyboard and an other USB one. I realized using xev that these keys are replaced with XF86WakeUp

I can reproduce it all the time using xev. I open xev, switch to a window and get back to xev input window test. If I type any key I get the following reports instead of the correct key:

Code:

KeyPress event, serial 42, synthetic NO, window 0x3a00001,
    root 0xf5, subw 0x0, time 1584761, (-2189,1390), root:(379,1439),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 43, synthetic NO, window 0x3a00001,
    root 0xf5, subw 0x0, time 1584769, (-2189,1390), root:(379,1439),
    state 0x0, keycode 151 (keysym 0x1008ff2b, XF86WakeUp), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


It never happens on a different WM than KDE.

Do you already have seen that before and have a solution?


Last edited by Markand on Fri Dec 08, 2017 10:40 am; edited 3 times in total
Back to top
View user's profile Send private message
Markand
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2008
Posts: 76

PostPosted: Fri Dec 08, 2017 9:26 am    Post subject: Reply with quote

Using libinput-debug-events I can reproduce the problem.

I press some keyboard keys:

Code:

-event8   KEYBOARD_KEY      +2.68s      *** (-1) pressed
e event8   KEYBOARD_KEY      +2.74s     *** (-1) released
 event8   KEYBOARD_KEY      +3.00s      *** (-1) pressed
e event8   KEYBOARD_KEY      +3.06s     *** (-1) released
 event8   KEYBOARD_KEY      +3.37s      *** (-1) pressed
e event8   KEYBOARD_KEY      +3.44s     *** (-1) released
 event8   KEYBOARD_KEY      +5.46s      *** (-1) pressed
c event8   KEYBOARD_KEY      +5.48s     *** (-1) released
 event8   KEYBOARD_KEY      +5.80s      *** (-1) pressed
c event8   KEYBOARD_KEY      +5.86s     *** (-1) released
 event8   KEYBOARD_KEY      +6.05s      *** (-1) pressed
c event8   KEYBOARD_KEY      +6.13s     *** (-1) released
 event8   KEYBOARD_KEY      +6.41s      *** (-1) pressed
 event8   KEYBOARD_KEY      +6.51s      *** (-1) pressed


Now, I move the mouse, click and then I press a keyboard key:

Code:

 event15  POINTER_MOTION    +3.01s        0.00/ -0.95
 event15  POINTER_MOTION    +3.03s        0.93/ -0.93
 event15  POINTER_BUTTON    +3.16s      BTN_LEFT (272) pressed, seat count: 1
 event15  POINTER_BUTTON    +3.23s      BTN_LEFT (272) released, seat count: 0
-event9   KEYBOARD_KEY      +4.52s      KEY_WAKEUP (143) pressed
 event9   KEYBOARD_KEY      +4.53s      KEY_WAKEUP (143) released


A fancy KEY_WAKEUP appears with no reasons.
Back to top
View user's profile Send private message
Markand
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2008
Posts: 76

PostPosted: Fri Dec 08, 2017 10:02 am    Post subject: Reply with quote

Okay, I've finally found.

At boot I have powertop --auto-tune which turns on agressive power management on USB devices. Not using it fixes the problem.

Use this tool with care :)
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Fri Dec 08, 2017 5:48 pm    Post subject: Reply with quote

I guess the keyboard's trying to be clever and thinks that if it's suspended the host is too, so only sends ACPI wakeup keys. Seems unnecessary too, every PC I've used will wake up on any key.

If your other USB devices work fine you may want to just blacklist that one in udev, like this:
/etc/udev/rules.d/local.rules:
ATTR{idVendor}=="xxxx", ATTR{idProduct}=="yyyy", ATTR{power/control}="on"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum