obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 6:53 am

That's interesting information Iostintime.
It's a bit like the system freezing when an old ftdi usb2serial is accessed. As long as you don't use it, everything works fine. If you query it's settings, the system hangs.
So considering the supply, we could say that the Polyfuses are not an issue as long as you are using a decent supply adapter.
We could probably state that using the Pi(model B) with a 5V 0.7A adapter is asking for problems.

This still leaves our Elephant.which we shoud keep in the spotlight util someone finds a way to terminate him. We had better called him a cockroach, as Elephants are protected species, and less people will feel sorry if you crunch a cockroach. Maybe a moderator could change the topic title if people agree?
I know they likely have better things to do :)

User avatar
Jim JKla
Posts: 2218
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 7:04 am

We don't have to kill the elephant just get him out of the room ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

User avatar
Montala
Posts: 675
Joined: Mon Mar 05, 2012 11:54 pm
Location: Herefordshire (U.K.)

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 7:33 am

Jim JKla wrote:We don't have to kill the elephant just get him out of the room ;)
:D :D

User avatar
Jim JKla
Posts: 2218
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 7:35 am

Buns we need buns ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

User avatar
piglet
Posts: 915
Joined: Sat Aug 27, 2011 1:16 pm

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 7:59 am

Or peanuts. ;)

gritz
Posts: 449
Joined: Sat Jan 28, 2012 2:33 am

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 12:31 pm

:lol: or a mouse.

User avatar
RaTTuS
Posts: 10558
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 12:49 pm

or all 3 ... and or a lady elephant
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
Jim JKla
Posts: 2218
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 1:11 pm

Your assuming the USB is Male
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 2:12 pm

Considering the amount of trouble we are having with it, I assume it's....
Never Mind, getting off topic...

crozone
Posts: 12
Joined: Mon Jul 30, 2012 11:27 am

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 3:11 pm

So people seem to be pretty adamant that input power is not the issue. Has anyone tried monitoring the internal 3V rail, instead of just the 5V one? After all, the 3V rail is used for the signal rails on all of the ports. Another thing: has anyone tried applying a heatsink to the USB hub chip? I'm finding that it gets /really/ hot during heavy use and I wonder if it could be causing problems. It would be very interesting to see if a model A Pi still has the same issues without that chip, with the port hooked straight into the broadcom.

I'm hoping, along with everyone else, that this is a software issue and the hardware is not at fault. However, I have a fairly strong hunch it's hardware, considering things only seem to go south during load.

Aydan
Posts: 719
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 10:08 pm

I for myself can say that it's not a power problem.

I run one of my pi's from a belkin 7-port powered hub.
I run it headless. No Keybord or mouse.
If I connect the root port of the hub to the Pi USB and a USB stick or HDD to the hub, I get abysmal performance (around 30kB/s) on the drives and USB-reset messages from the kernel.
If I use a Y-cable to power the HDD/USB-stick from the hub but plug the data part directly into the Pi and do not connect the hub then I get expected performance (20MB/s)
The only difference in setups is that once the hub is involved in the data transfer and the other time it's not.
The power situation is the same both times.
The problem definitely lies in the usb driver's handling of hubs.

Regards
Aydan

spitecho
Posts: 24
Joined: Tue Jul 10, 2012 12:03 am
Location: internet

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 10:55 pm

Doesn't seem to be a power issue with mine. I have the Pi hooked up to a separate 1A psu and a 2.5A Dlink DUB-H4 hub. The keyboard and network get all screwy if I try to use both at once (particularly in X), but if I plug in an external USB 3.0 HDD, it works flawlessly as a headless NFS server, even without a Y-cable.

Trying to use keyboard and ethernet at the same time flooded dmesg with "smsc95xx 1-1.1:1.0: eth0: kevent 4 may have been dropped" with occasional spurts of "smsc95xx 1-1.1:1.0: eth0: Failed to write register index 0x00000008."

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1551
Joined: Sat Sep 10, 2011 11:43 am

Re: USB - the Elephant in our Room

Wed Aug 01, 2012 6:03 am

So,

Again to those still labouring the issue, the strange keyboard flakiness is nothing to do with power. The problem is to do with the driver not sending split transactions in time on the USB bus. Because of this the hub throws them away and you end up missing data.

I know this because I've got a model A with no 9512 on it and an external hub with a USB1.1 keyboard connected and all of that connected through a many thousand pound USB analyser. Yes I do have lots of dumps but none of them will be of any use to you unless you are a USB hub developer!

(Aside... If anyone knows a USB hub developer I'd sorely like to talk to the about the split transactions and decoding the relevant portions of the USB hub spec)

Cheers

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

blavery
Posts: 95
Joined: Sun Jul 01, 2012 2:57 am
Location: QLD. Australia

Re: USB - the Elephant in our Room

Wed Aug 01, 2012 6:30 am

In which case the most pointed question next is:
Is the problem locked away on the pi's hardware, or might it be solvable on SD loaded code? :?:

User avatar
liz
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 5212
Joined: Thu Jul 28, 2011 7:22 pm
Contact: Website

Re: USB - the Elephant in our Room

Wed Aug 01, 2012 6:40 am

It should be solvable with SD loaded code - which is why we have tasked GSH with pratting around with it! (Many thanks, Gordon. And apologies to R and the kids for keeping you tied to a USB analyser when you should be making some more of those delicious spicy cashew nuts.)
Director of Communications, Raspberry Pi

blavery
Posts: 95
Joined: Sun Jul 01, 2012 2:57 am
Location: QLD. Australia

Re: USB - the Elephant in our Room

Wed Aug 01, 2012 7:03 am

Liz/Gordon,
That would be quite the best news to hear at this stage. We need to be patient. We wish Gordon success and our thanks.

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: USB - the Elephant in our Room

Wed Aug 01, 2012 7:27 am

I only read yesterday that Gordon worked on the 8000 interrupts/sec issue. I didn't realise he was working on the other usb problems as well.
If by any mean you need some testing to be done, I am willing to help. I have several wifi sticks with different chipsets that disconnect after a couple of minutes and some prolific and ftdi usb2serial adapters. I have 3 different powered usb hubs as well.
I don't know how to ask this carefully, but is there a release date for the patch planned already?
I noticed Gordon read that it just still needed some cleanup, but now I see he's looking for hub design specialists. It's a bit contradictiory...
I hope progress is going well.
I am trying to convince my boss in using the pi for our future embedded projects, and it's not working out very well at the moment.

User avatar
piglet
Posts: 915
Joined: Sat Aug 27, 2011 1:16 pm

Re: USB - the Elephant in our Room

Wed Aug 01, 2012 8:12 am

I read in another thread (http://www.raspberrypi.org/phpBB3/viewt ... =28&t=6771) that the problem was thought to be isolated to Debian. I did some testing last night with Archlinux, and found similar problems:

Setup:

Archlinux (current build from download page, brought up to date with pacman -Syu)
Pi connectivity: Ethernet cable to switch; USB port to powered D-link DUB-H7 hub; hdmi to hdmi monitor.
In hub: Basic Dell wired Mouse, Basic Dell RT7D50 keyboard, unmounted memory stick, un-driver'd Edimax EW-7811UN Wifi dongle
Pi microusb power directly connected to hub's 3A rated power input.

Test; results multiply repeatable:

10 Ethernet connectivity OK.
20 Started up mouse with gpm -m /dev/input/mouse0 & other options as per default config file -> mouse worked, but no connectivity through ethernet
30 Stopped mouse with gpm -k -> ethernet connectivity restarted
40 goto 20

chrisw2
Posts: 106
Joined: Sat Apr 07, 2012 11:22 am
Location: Manchester, UK

Re: USB - the Elephant in our Room

Wed Aug 01, 2012 3:03 pm

gsh wrote:...
(Aside... If anyone knows a USB hub developer I'd sorely like to talk to the about the split transactions and decoding the relevant portions of the USB hub spec)
Gordon,

Have you tried contacting Greg Kroah-Hartmann? I know he was taking an interest at one time, see: http://www.raspberrypi.org/phpBB3/viewt ... 28&t=13058 (post 5)

I know he is a kernel developer but he "knows a bit about USB" (I suspect he is being over modest!)

crozone
Posts: 12
Joined: Mon Jul 30, 2012 11:27 am

Re: USB - the Elephant in our Room

Thu Aug 02, 2012 4:06 pm

Has anyone used Chris Boot's raspberrypi kernel? I've managed to fix the crash I got with heavy usb/network load by installing his latest kernel and firmware found here: http://www.bootc.net/projects/raspberry-pi-kernel/

Maybe this will fix some of the other usb issues as well?

Downsides are it's not a armhf build, only armel. You'll need to use dpkg --force-architecture -i <package>.deb to get it to install.

Using transmission-daemon I managed to torrent 32 gigs at 1MB/s overnight, over a wireless card to a ntfs self powered hdd, without a hub. Voltage dropped to 4.5 volts the entire time because of the wireless card and it still didn't crash, torrent checks out as perfect with hash check. On the default kernel, the wireless card was dropping out every few mins and couldn't sustain any data transfer without disconnecting.

Note that omxplayer doesn't work with this though, but quake 3 does. If you need to use the raspi as a headless seed box, this is a pretty good.

p4trykx
Posts: 127
Joined: Wed Jan 11, 2012 2:55 pm

Re: USB - the Elephant in our Room

Thu Aug 02, 2012 8:00 pm

Does HUBs reported 'working' with Raspi also suffer from mentioned errors?

User avatar
Montala
Posts: 675
Joined: Mon Mar 05, 2012 11:54 pm
Location: Herefordshire (U.K.)

Re: USB - the Elephant in our Room

Thu Aug 02, 2012 8:26 pm

So far as I can see the main problems occur when users connect powered hubs to their Raspberry Pi's, but there do appear to be (at least) two main types of hub, namely four port and seven port hubs.

I have noticed though that some of the so called seven port hubs actually consist of two four port boards joined together internally, and therefore under 'lsusb' show up as two separate USB 'devices'. I wondered therefore if this could possibly have any bearing on the problem... particularly if two adapters, or 'dongles' were connected, one to each of the two boards.

Not sure if I have explained this too well, but hopefully those who understand what is going on in the background, as it were, will quickly know if this is anything to be concerned about, or not.

lostintime
Posts: 29
Joined: Sun Jul 22, 2012 7:30 am

Re: USB - the Elephant in our Room

Thu Aug 02, 2012 11:20 pm

liz wrote:It should be solvable with SD loaded code - which is why we have tasked GSH with pratting around with it! (Many thanks, Gordon. And apologies to R and the kids for keeping you tied to a USB analyser when you should be making some more of those delicious spicy cashew nuts.)
So you're saying Gordon has actually been tasked with fixing the bugs in the dwc_otg driver?

wireless
Posts: 1
Joined: Sat Aug 04, 2012 4:25 am

Re: USB - the Elephant in our Room

Sat Aug 04, 2012 11:17 pm

Confirmed. I have the Elephant as well. I am using Slackware 13.37 at the moment. I have other distros that I may test on as well.

I am working on some stats, etc. that may point to something... it is extremely time consuming testing this stuff. Hopefully I will post some more info soon.

Quick Synopsis.
I have attached one USB 2.0 Hub, then tested, then attached two USB 2.0 hubs, and tested, and also a Targus Laptop Extender (APC50US) (4-port Hub with video, audio, serial, network hardware) in place of a Hub. USB Hubs I have tested are 7-port hubs and a 13 port hub. I attached as many USB devices that I could scare up. I also powered the RPi both independently (its own PS) and attaching it to one on the powered USB Hubs. As a side note, the RPi definitely seems to get _some_ power from the uplink port on some cheap hubs (!!oh nos!!) but not enough to actually boot. This could possibly cause some instability- maybe some diodes can be used to prevent this if it does prove to be causing problems.

I have found that just attaching Hubs with nothing attached to them had issues with the RPi seeing the Hubs. Upper and Lower USB connection of the RPi also seem to act differently from one another. The upper port will actually make the PS of a Hub shut off(??!!)... move it to the lower port and it does not do that.

zardoz99
Posts: 175
Joined: Fri Jan 13, 2012 2:25 pm
Location: Somewhere in Canada.

Re: USB - the Elephant in our Room

Sun Aug 05, 2012 8:26 am

Just as an aside, the USB problems are not just annoying, it's possible that they can actually cause damage.

I went out and purchased a couple of "Intenso" 32GB memory sticks.
They were formatted and tested on an Intel system under Fedora 14. Worked fine for an extended period being benchmarked and calculating things like erase block size etc for optimum configuration of an ext4 filesystem.

I placed one each into a separate Raspi and they both enumerated correctly so I started to copy the rootfs contents from the SD card on each one to the memory stick.

One survived, albeit with huge numbers of dmesg errors. The other threw up similar dmesg errors and then the memory stick died with a suitable dmesg report. It has been unusable in any system since. Further investigation indicates that it's electrically OK but the internal management firmware on the memory stick is now corrupted.

I can't prove that the Raspi destroyed it, but "Occam's razor" applies...

Z.

Return to “Troubleshooting”