Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] USB keyboard not responsive after short inactivity
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
fr3aker
n00b
n00b


Joined: 07 Nov 2008
Posts: 14

PostPosted: Thu Sep 24, 2015 8:34 pm    Post subject: [solved] USB keyboard not responsive after short inactivity Reply with quote

Hey,

on my notebook my USB keyboard is not accepting keypresses after short periods of inactivity (1s-10s, varying). If that happens I have to press some specific keys to get any keys at all working again (one of "a", "e", "i", "u" does the trick).

This happens in X and also on the ttys. The built-in keyboard remains functional all the time. The keyboard works without problems on my desktop.

I suspect this might be some bad power save setting but I have no idea how to go about debugging this. Does someone have an idea how to find out what's causing the problem?

Possibly a related problem: when connecting an arduino to my notebook I have to run "lsusb -v" to make the kernel detect it.


Last edited by fr3aker on Fri Sep 25, 2015 12:50 pm; edited 2 times in total
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1369
Location: Montréal

PostPosted: Fri Sep 25, 2015 1:27 am    Post subject: Reply with quote

I think you have the answer at USB Power Saving - Gentoo Wiki.

To disable autosuspend you can pass the parameter autosuspend=-1 to the usbcore module
Code:
echo 'options usbcore autosuspend=-1' > /etc/modprobe.d/usbcore.conf

rebuild the initramfs if you use one with this file include or pass the parameter usbcore.autosuspend=-1 to Linux at boot time if the Usb core support is compile in the kernel image itself.

The -1 value should say to usbcore to not suspend.
_________________
Paul
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1675
Location: United Kingdom

PostPosted: Fri Sep 25, 2015 1:36 am    Post subject: Reply with quote

Do you have Laptop Mode Tools installed and running, by any chance? If you do, which version? If it's >= 1.66 then you can edit /etc/laptop-mode/conf.d/runtime-pm.conf and blacklist autosuspending of any USB device by declaring its VendorID:ProductID in the AUTOSUSPEND_RUNTIME_DEVID_BLACKLIST environment variable. For example, I sometimes use an external USB Hewlett-Packard KU-0316 Keyboard with my Compal NBLB2 laptop:

Code:
# lsusb
Bus 002 Device 005: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard <---- External keyboard at one office
Bus 002 Device 004: ID 064e:a115 Suyin Corp. <---- Built-in Webcam
Bus 002 Device 003: ID 147e:1001 Upek TCS5B Fingerprint sensor <---- Built-in fingerprint sensor
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 046d:c052 Logitech, Inc. <----Logitech NX50 notebook mouse
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The following entry in /etc/laptop-mode/conf.d/runtime-pm.conf stops Laptop Mode Tools auto-suspending the external USB Hewlett-Packard KU-0316 Keyboard:
Code:
AUTOSUSPEND_RUNTIME_DEVID_BLACKLIST="03f0:0024"


Ref.: Laptop Mode Tools revisited due to a change in its functionality
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
fr3aker
n00b
n00b


Joined: 07 Nov 2008
Posts: 14

PostPosted: Fri Sep 25, 2015 12:48 pm    Post subject: Reply with quote

Thank you both for your responses! You were dead on.

After disabling usb autosuspend and re-plugging my keyboard everything worked correctly.

Many thanks to Fitzcarraldo for the laptop mode tools hint!

Note: when changing the autosuspend mode while running you have to re-plug devices because changes only affect newly connected hardware.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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