USB, Keyboard, Network problems with Debian beta and 4 PSU


14 posts
by charlelie » Tue Jun 26, 2012 8:33 pm
Hi,

I'm experiencing problems with my new RPI.
I'm using 2012-06-18-wheezy-beta debian.

With the previous version, there were the same problems anyway (but others bugs have been corrected in the most recent).

I have tried 4 different cellphones PSU with 4 different cellphones USB cables (with a different quality and cable width).

1) Motorola Milestone 5.1V 850mA
2) Unknown Chinese "Travel Charger" 5.0V 1A
3) HTC Chacha 5V 1A
4) "Philong" Chinese "Switching Power Supply" 5V 1A

Then, I checked the voltage between TP1-TP2 when on heavy load (boot or LXDE loaded), and when CPU idle and without LXDE started

1) 4.75V / 4.80V
2) 5.04V / 4.98V
3) 4.74V / 4.77V
4) 4.72V / 4.75V

The problems occurrs with all of these PSU.

- A lot of USB errors: resets, USB key mounting point lost, network issues
- Keyboard problems (keys stay "virtually" down and missing characters when I’m typing)


These problems appear most frequently when LXDE is running. For instance, in console mode, network seems stable, I can ping, wget files, I can browse my USB key…
I sawlogs which may be related to these problems with dmesg command. Please look at the samples I gave at the end the post. If you want, I can post a complete dmesg log.

Here is my hardware configuration :
- one Packard Bell keyboard with an integrated USB port with a connected wired mouse connected
- a self powered Targus USB Hub, with a 5V 2.4A PSU
- a HDMI cable connected either to my Thomson TV or to an Acer X243w DVI monitor (with a cheap DVI adapter)

Besides, I tested :
- with the hub connected to any RPI USB port, and mouse and KB on the hub
- KB connected to RPI and mouse connected to the KB integrated USB port
- with or without network cable connected
- with any combinaison of PSU / micro USB cable
- with the RPI powered by one port of the Targus USB Hub, connected on the RPI micro USB
And the problems still occur.

I haven't tested all the combinations (like RPI powered by the HUB and KB and mouse directly on the RPI).

Do you have any idea? I should admit that I'm lost.
Thank you very much.


Here, some of dmesg relevant lines :

hub 1-1.2:1.0: cannot reset port 1 (err = -110)

smsc95xx 1-1.1:1.0: eth0: kevent 4 may have been dropped (a lot of them)

smsc95xx 1-1.1:1.0: eth0: Failed to read register index 0x00000114

USB disconnect, device number 5

followed by

usb 1-1.2.4: new full speed USB device number 9 using dwc_otg
usb 1-1.2.4: New USB device found, idVendor=1631, idProduct=5400

A block like

[ 298.073198] INFO:: periodic_channel_available: Total channels: 8, Periodic: 6, Non-periodic: 2
[ 298.073215]
[ 298.073236] INFO:: schedule_periodic: No host channel available for periodic transfer.
[ 298.073248]
[ 298.073267] ERROR::dwc_otg_hcd_urb_enqueue:487: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008
[ 298.073280]
[ 298.087721] INFO:: periodic_channel_available: Total channels: 8, Periodic: 6, Non-periodic: 2
[ 298.087738]
[ 298.087759] INFO:: schedule_periodic: No host channel available for periodic transfer.
[ 298.087770]
[ 298.087790] ERROR::dwc_otg_hcd_urb_enqueue:487: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008
[ 298.087803]
[ 298.117689] INFO:: periodic_channel_available: Total channels: 8, Periodic: 6, Non-periodic: 2
[ 298.117706]
[ 298.117726] INFO:: schedule_periodic: No host channel available for periodic transfer.
[ 298.117740]
[ 298.117760] ERROR::dwc_otg_hcd_urb_enqueue:487: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008
[ 298.117773]
[ 298.177694] INFO:: periodic_channel_available: Total channels: 8, Periodic: 6, Non-periodic: 2
[ 298.177713]
[ 298.177733] INFO:: schedule_periodic: No host channel available for periodic transfer.
[ 298.177745]
[ 298.177765] ERROR::dwc_otg_hcd_urb_enqueue:487: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008
[ 298.177778]
[ 298.287680] INFO:: periodic_channel_available: Total channels: 8, Periodic: 6, Non-periodic: 2
[ 298.287698]
[ 298.287719] INFO:: schedule_periodic: No host channel available for periodic transfer.
[ 298.287732]
[ 298.287752] ERROR::dwc_otg_hcd_urb_enqueue:487: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008
[ 298.287765]
[ 298.397686] INFO:: periodic_channel_available: Total channels: 8, Periodic: 6, Non-periodic: 2
[ 298.397703]
[ 298.397723] INFO:: schedule_periodic: No host channel available for periodic transfer.
[ 298.397735]
[ 298.397754] ERROR::dwc_otg_hcd_urb_enqueue:487: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008
[ 298.397768]
[ 298.507683] INFO:: periodic_channel_available: Total channels: 8, Periodic: 6, Non-periodic: 2
[ 298.507700]
[ 298.507721] INFO:: schedule_periodic: No host channel available for periodic transfer.
[ 298.507733]
[ 298.507753] ERROR::dwc_otg_hcd_urb_enqueue:487: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008
[ 298.507766]
[ 298.617688] INFO:: periodic_channel_available: Total channels: 8, Periodic: 6, Non-periodic: 2
[ 298.617705]
[ 298.617725] INFO:: schedule_periodic: No host channel available for periodic transfer.
[ 298.617738]
[ 298.617758] ERROR::dwc_otg_hcd_urb_enqueue:487: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008
Posts: 7
Joined: Tue Jun 26, 2012 3:54 pm
Location: France
by clickykbd » Wed Jun 27, 2012 3:12 am
I would love to hear more about this. Maybe SD card? I'm having the exact same issues... things felt "kinda" stable for a while... but seems to be getting worse if that's possible?

an apt-get update just hung my system... no panic message on screen but completely unresponsive.
User avatar
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
by Lob0426 » Wed Jun 27, 2012 3:48 am
Have you tried rpi-update to get the newest firmware? There are USB fixes in the new firmware.
Have tried the following?
$ sudo apt-get update
$ sudo apt-get upgrade
These will make sure you have the newest files in your distro. I connect the keyboard and mouse to the RasPi itself (wireless combo keyboard/mouse). At least hook your keyboard to the RasPi. Some mice draw a lot of power, but this should have no effect on the hub. I tried a Dell 6 button Laser Mouse that would not work on the RasPi or the hub though. So have you tried another mouse? I have had trouble with incomplete shutdowns out of LXDE when using USB WiFi.
Try the troubleshooting Wiki:
http://elinux.org/R-Pi_Troubleshooting
512MB version 2.0 as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1935
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by clickykbd » Wed Jun 27, 2012 4:21 am
in my case, I had been keeping up with firmware and repository updates. I suspect corrupted SD card as have been battling with lots of crash issues revolving around hub/accessory issues. Trying a different SD card from wheezy-beta now. Things seem more stable already, but the hub is currently not in the picture either, will see if issues come back with hardware additions.
User avatar
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
by marsman2020 » Thu Jun 28, 2012 7:33 pm
Can you please add your findings to the bug on github about USB+network issues - https://github.com/raspberrypi/linux/issues/29
Posts: 70
Joined: Sun May 20, 2012 11:26 pm
by charlelie » Fri Jun 29, 2012 10:23 pm
Thank you for your answers.

Linux is up to date (apt and rpi-update), and I have more details.

If I connect my KB directly on the RPI and the mouse too, (tried with 2 wired mouses) so it works, no strange logs or behaviours, even with LXDE started or Quake III running.

If I keep the keyboard on RPI, and connect my hub with nothing connected on, it works too.

But if I add something on the hub (tried with my 2 mouses for instance) and LXDE or Quake III is running, things go bad again. Note that Quake III isn't slowed by this problem, KB and mouse still work like a charm.

And as soon as I disconnect the mouse from the hub, Ethernet network come back and logs stops.

I tried again with 2 different PSU, the HTC and the Unknown Chinese "Travel Charger" which is always around 5V, even on heavy load.

I also tried to swap devices on 2 ports.

Is it sure this kind of problems is software related only ?

marsman2020>You added a link on this topic, it is usefull ? (i'm not used to github)
Posts: 7
Joined: Tue Jun 26, 2012 3:54 pm
Location: France
by W. H. Heydt » Fri Jun 29, 2012 11:38 pm
A couple of things I've discovered while trying (and failing, so far...) to diagnose USB issues:

lsusb gives a list of USB devices attached

usb-devices gives details (included max current) for USB devices attached.
Posts: 1553
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)
by clickykbd » Sat Jun 30, 2012 1:38 am
I think I've sorted things on my end, at least in console (lxde is another story). It all seems to revolve around a plethora of buggy USB keyboard combinations, but finally found one that works like a champ, and couldn't be more happy about which one it is!

Trusty IBM Model-M (1984) w/SDL socket
http://en.wikipedia.org/wiki/Model_M_keyboard

Adapted to USB with this beautiful piece of kit:
http://www.ebay.com/itm/270955553909?ss ... 1497.l2649

No more stuck keys, hotplug works, key repeat rate is happy (fast) again, no complaints from ethernet drivers, my 2 USB wifi dongles work reliably in combination, even with my hub that I previously thought was a part of the problem. It even works on the same hub as high-speed devices such as the wifi dongle. And of course I now make lots of noise when typing! Yipee!

My previous keyboard attempts, all having problems mentioned above:
- BTC 9118H mini USB keyboard
- Unbranded Roll-Up USB full size (similiar to Manhattan branded one)
- Generic MiMicro USB-2-PS2 adapter with various PS2 keyboards
(all the PS2 keyboards exhibited similiar issues with this adapter)

One weird thing I've noticed, and I've seen this with some of the other keyboards too, is that in console [caps-lock] light never illuminates. However it does when connected to other computers.

However, with this new combination I have yet to get any of my 3 USB mice to work in X (at least 2 of them did work previously), and even locked up the Pi pretty hard killing xinit after one failed attempt. Black screen and unreachable over network. var/log/messages generates a ton of new errors I hadn't seen yet when these mice are plugged.... will post some if I don't resolve this.
User avatar
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
by mlepage » Wed Jul 18, 2012 11:16 pm
I have the keyboard issue too (stuck keys, dropped letters, inconsistent repeats). Tried several keyboards. Am using good (1A) tablet charger and powered USB hub.
Posts: 9
Joined: Tue Jun 12, 2012 1:58 am
by drgeoff » Thu Jul 19, 2012 8:42 am
clickykbd wrote: It all seems to revolve around a plethora of buggy USB keyboard combinations, but finally found one that works like a champ, and couldn't be more happy about which one it is!

The keyboards are not buggy. There are 'issues' with the USB code which are manifesting themselves in various ways.
Posts: 2865
Joined: Wed Jan 25, 2012 6:39 pm
by El_Presidente » Thu Jul 19, 2012 9:21 am
I support calls for a full review of USB kernel/driver code. There are now a mass of messages from Pi users frustrated by USB device and networking problems. While some are saying this can be fixed by improving the quality of the power supply, hub or USB device, there are so many of us that have swapped out every component in the list, several times over and still see issues. Marsman2020 quoted above is one example of a user who has taken a good deal of time to document the problem and his diagnostic steps. Time for a 'drains up' within the Foundation on this one.
-----------------------------------------------------------------------------------------
Never trust a man, who when left alone with a tea cosey, doesn't try it on.
Posts: 36
Joined: Tue Apr 03, 2012 7:02 am
Location: Bolton, UK
by Atilla » Thu Jul 19, 2012 9:23 pm
Sadly, I have to agree. I've got the same issues with keyboard and mouse and they do not seem to be at all power related. I've got a good 1A charger and my voltages are stable. The keyboard keys are acting totally random sometimes, which is really frustrating. I need to resort to SSH in order to be able to do anything more interesting.

Is there anything specific we should be looking for when we have those problems so we can report it?
Posts: 4
Joined: Thu Jul 19, 2012 9:19 pm
by El_Presidente » Fri Jul 20, 2012 5:05 pm
Atilla wrote:Is there anything specific we should be looking for when we have those problems so we can report it?

I think the general advice is, setup your system to replicate a known problem with USB/Ethernet, then at the point you have issues, do as many of the following as you can, noting your findings:-

1) Test the voltage with a multimeter across TP1/TP2 on the Pi board.
2) Issue a 'dmsg|more' command and look for errors towards the end of the messages, particularly with any of:
'Failed to write register index 0x00000114' (or 118)
'hub_port_status failed'
'schedule_periodic: No host channel available for periodic transfer'
'Cannot enable port n. Maybe the USB cable is bad?'
'Failed to initialize the device'
'failed with error -22'
3) Note where your Pi was at, console, LXDE, transferring data, at load or idling?

When you swap components, think of everything in the chain being a potential problem, the power supply to the Pi, the wire from the Pi to the uplink on your hub, the hub itself, the power supply to the hub, each device connected into the hub.
You will need to eliminate each one, but only ever change one at a time. Then restart the Pi, repeat the actions that made it fail last time, noting anything different.

Rinse and repeat for about 6 hours a night for a week, or until your head bursts.
-----------------------------------------------------------------------------------------
Never trust a man, who when left alone with a tea cosey, doesn't try it on.
Posts: 36
Joined: Tue Apr 03, 2012 7:02 am
Location: Bolton, UK
by philchile » Sat Dec 08, 2012 10:17 am
Had the same issue. Bought a new power USB hub. Still had same issue.
Remembered about 2 powered USB ports on power strip / extension lead to TV/DVD player. Once plugged in there - no issues.

Guess it is all about USB power and maintaining 5V and 500mA.
Posts: 1
Joined: Sat Dec 08, 2012 10:14 am