blag: typos, indentation fixes (libmultimarkdown-perl is a bit more picky with code...
[www-rohieb-name.git] / blag / post / wireless-usb-keyboards-and-delayed-keystrokes.mdwn
1 [[!meta title="Wireless USB keyboards and delayed keystrokes"]]
2 [[!meta date="2012-04-29 01:09"]]
3 [[!meta author="rohieb"]]
4 [[!meta license="CC-BY-SA 3.0"]]
5
6 Everytime I was using my wireless USB keyboard with my laptop while the
7 power cable was not connected, the keyboard behaviour was lousy, and
8 keystrokes tend to be delayed by several seconds. The kernel logs said
9 something like
10
11 [23302.802096] uhci_hcd 0000:00:1a.0: setting latency timer to 64
12 [23302.842177] uhci_hcd 0000:00:1a.1: PCI INT B -> GSI 21 (level, low) -> IRQ 21
13 [23302.842190] uhci_hcd 0000:00:1a.1: setting latency timer to 64
14 [23302.882145] uhci_hcd 0000:00:1a.2: PCI INT C -> GSI 19 (level, low) -> IRQ 19
15 [23302.882158] uhci_hcd 0000:00:1a.2: setting latency timer to 64
16 [23302.929065] uhci_hcd 0000:00:1d.1: PCI INT B -> GSI 19 (level, low) -> IRQ 19
17 [23302.929079] uhci_hcd 0000:00:1d.1: setting latency timer to 64
18
19 Searching on Google, I found [a forum post][0] which suggested to
20 disable USB auto-suspend in the [laptop-mode][1] configuration files.
21 The relevant file on my Ubuntu 12.04 is
22 `/etc/laptop-mode/conf.d/usb-autosuspend.conf`, which is fairly well
23 documented, and has an option `AUTOSUSPEND_USBID_BLACKLIST` which
24 allowed me to blacklist my USB keyboard, so the device was no longer put
25 in auto-suspend mode. (The USB ID needed for
26 `AUTOSUSPEND_USBID_BLACKLIST` can be found in the output of [lsusb][2])
27
28 After editing that file, I had to restart the laptop-mode daemon (`sudo
29 /etc/init.d/laptop-mode restart`), and keystrokes from my wireless
30 keyboard arrived again without any delay.
31
32 [0]: https://bbs.archlinux.org/viewtopic.php?pid=898114#p898114
33 [1]: http://packages.ubuntu.com/laptop-mode
34 [2]: http://packages.ubuntu.com/usbutils
35
36 [[!tag fix Ubuntu auto-suspend battery_power laptop-mode Linux Linux_3.2
37 powersave timing Ubuntu_Precise USB wireless_keyboard]]
This page took 0.04944 seconds and 5 git commands to generate.