pages tagged USBrohieb.namehttps://rohieb.name/blag/tag/USB/rohieb.nameikiwiki2013-11-09T04:11:26ZWireless USB keyboards and delayed keystrokeshttps://rohieb.name/blag/post/wireless-usb-keyboards-and-delayed-keystrokes/rohieb
CC-BY-SA 3.0
2013-09-19T05:04:01Z2012-04-28T23:09:00Z
<p>Everytime I was using my wireless USB keyboard with my laptop while the
power cable was not connected, the keyboard behaviour was lousy, and
keystrokes tend to be delayed by several seconds. The kernel logs said
something like</p>
<pre><code>[23302.802096] uhci_hcd 0000:00:1a.0: setting latency timer to 64
[23302.842177] uhci_hcd 0000:00:1a.1: PCI INT B -> GSI 21 (level, low) -> IRQ 21
[23302.842190] uhci_hcd 0000:00:1a.1: setting latency timer to 64
[23302.882145] uhci_hcd 0000:00:1a.2: PCI INT C -> GSI 19 (level, low) -> IRQ 19
[23302.882158] uhci_hcd 0000:00:1a.2: setting latency timer to 64
[23302.929065] uhci_hcd 0000:00:1d.1: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[23302.929079] uhci_hcd 0000:00:1d.1: setting latency timer to 64
</code></pre>
<p>Searching on Google, I found <a href="https://bbs.archlinux.org/viewtopic.php?pid=898114#p898114">a forum post</a> which suggested to
disable USB auto-suspend in the <a href="http://packages.ubuntu.com/laptop-mode">laptop-mode</a> configuration files.
The relevant file on my Ubuntu 12.04 is
<code>/etc/laptop-mode/conf.d/usb-autosuspend.conf</code>, which is fairly well
documented, and has an option <code>AUTOSUSPEND_USBID_BLACKLIST</code> which
allowed me to blacklist my USB keyboard, so the device was no longer put
in auto-suspend mode. (The USB ID needed for
<code>AUTOSUSPEND_USBID_BLACKLIST</code> can be found in the output of <a href="http://packages.ubuntu.com/usbutils">lsusb</a>)</p>
<p>After editing that file, I had to restart the laptop-mode daemon (<code>sudo
/etc/init.d/laptop-mode restart</code>), and keystrokes from my wireless
keyboard arrived again without any delay.</p>
af9015 bulk message failed: Switch USB Ports?https://rohieb.name/blag/post/af9015-bulk-message-failed-switch-usb-ports/rohieb
CC-BY-SA 3.0
2013-11-09T04:11:26Z2009-08-23T23:00:00Z
<p>Yesterday, I suddenly wasn’t able to use my AF9015-based DVB-T USB stick
anymore. It only worked for about a minute, then the image froze and
<code>dmesg</code> said the following:</p>
<pre><code>[10633.166371] usb 1-3: USB disconnect, address 5
[10633.186247] af9015: bulk message failed:-22 (8/-339951920)
[10633.186254] af9013: I2C read failed reg:d417
[10633.186258] af9015: bulk message failed:-22 (8/-1067461161)
[10633.186265] af9013: I2C read failed reg:d417
[10633.186279] af9015: bulk message failed:-22 (9/-339951284)
[10633.186282] mt2060 I2C write failed
</code></pre>
<p>I was not even able to <code>rmmod</code> the dvb-usb-af9015 kernel module, the
rmmod process just hung itself up.</p>
<p>After two hours of compiling a new driver version, experimenting with
kernel parameters and getting a new <a href="http://www.otit.fi/~crope/v4l-dvb/af9015/af9015_firmware_cutter/firmware_files/4.95.0/">firmware
version</a>,
I finally booted into my rarely used Windows system. The first thing I
saw was the “USB 2.0 device on USB 1.1 bus”, and as I also could not get
a movie stream, I tried to plug the DVB-T stick into a different USB
port. And voilà, suddenly everything worked again, as well on Windows as
later on Linux. No more error messages in the kernel log, everything
just fine as before.</p>
<p>But I wonder if I have been using this USB port before — as far as I can
remember, the DVB-T stick had always been on the other port… Yet another
proof for me to never trust yourself <img src="https://rohieb.name/smileys/biggrin.png" alt=":D" /></p>
<p><strong>Update:</strong> Unfortunately, this solution did not help for long. After
about two weeks, the error is still there, and also occurs more
frequently, near to once an evening (until I reboot). So maybe, it
hasn’t even to do with switching USB ports, and my hardware is beginning
to fail… <img src="https://rohieb.name/smileys/sad.png" alt=":(" /></p>
<p><strong>Update:</strong> Seems it is fixed now, using revision dca0fed8d68b (Sat Sep
26 19:27:52 2009 +0200) of
<a href="http://linuxtv.org/hg/~anttip/af9015">anttip’s</a> repository. At least it
worked for over 4 hours now <img src="https://rohieb.name/smileys/smile.png" alt=":-)" /></p>