USB stalling - is there a workaround/fix for this?

A forum for general AmigaOS 4.x support questions that are not platform-specific
kas1e
Beta Tester
Beta Tester
Posts: 543
Joined: Sat Jun 18, 2011 8:56 am
Contact:

Re: USB stalling - is there a workaround/fix for this?

Post by kas1e »

@chris
An acknowledgement that this has been logged as a bug would be a start.
Check pm.
User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: USB stalling - is there a workaround/fix for this?

Post by ssolie »

kas1e wrote:@chris
An acknowledgement that this has been logged as a bug would be a start.
Check pm.
Why the cloak and dagger?

I think everyone would like to know what is being discussed.
ExecSG Team Lead
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 1:06 am

Re: USB stalling - is there a workaround/fix for this?

Post by xenic »

ssolie wrote: Why the cloak and dagger?

I think everyone would like to know what is being discussed.
Yes, I would like to know since I have the same or similar problem. However, since I switched my mouse to a wireless one connected to a front USB port on my SAM Flex, it's just my keyboard that stalls (disconnects?). It's been happening for so long that I have placed an icon in AmiDock that calls USBCtrl to reset USB. SInce the mouse still works when the keyboard i/o disappears, I can just click the icon to get the keyboard back.
EDIT: I haven't upgraded to update5 yet so I don't don't know if the problem still exists.
AmigaOne X1000 with 2GB memory - OS4.1 FE
kas1e
Beta Tester
Beta Tester
Posts: 543
Joined: Sat Jun 18, 2011 8:56 am
Contact:

Re: USB stalling - is there a workaround/fix for this?

Post by kas1e »

@all
Its nothing really important in our mails, i just offer to Chris a help to make a normal bugreport, but if it make sense to continue here, then why not. There is relevant parts from our mails (hope Crhis doesn't mind):

====
my mail #1

I will be glad to report it to BZ (if it currently not in, because pretty possible that is already reported, just wasn't fixed). So, if you in interest to make some step by step, 100% reproducable test case, without too much words (just 1-2-3-4 steps), then i can bring it to BZ. Just sadly that i have peg2, without usb devices, so i can't test it myself and your problems can be SAM related only.
====

====
chris answer:

Yes, it may well be a SAM440EP problem only, I haven't seen anybody else report it - however you can see in those threads that there are quite a few people affected.

The steps to reproduce are, unfortunately, as easy as switching the computer on and letting it boot up. Invariably either the keyboard or mouse will not work from boot, and disconnecting/reconnecting the affected device usually makes it work again (at least momentarily).

My USB setup is as follows:
SAM => USB hub => Apple keyboard (with integrated hub) => mouse

Reducing the number of hubs seems to help matters, so it may well be hub related - however the keyboard having an integrated hub means I can't get rid of them completely. Removing the EHCI driver also reduces the frequency considerably.

I suggest you grab the usb.log from the post you replied to too.

If there is any further information or logs required let me know.
====

====
my mail #2

The hard part there is that there is USB hub + appple keyboard with intergated hub + mouse combo involved. I just fear, that no developers/testers will have that combo, and even if i, let's say, will open now such a BZ:

"USB: Invariably either the keyboard or mouse will not work from boot"

And add your information to it, then there will be 2 ways: 1) its just will die in silence (as none of testers / devs will have that) 2) there can be answers like "didn't use apple keyabord" and variations like didn't use usb hub or so. So we need somehow reduce the involved parts. For example if we can reproduce it 100% in let's say just attached usb mouse, or just attached usb keyboard (any of them, not expectually apple one), then we have big chance that it will get fixed.

Or at least we need to find out if it only with apple happens, or with hub + apple, etc, etc. Because the less harder it to reproduce, the less parts involved, the more chances we have to fix bugs.
====

In other words its now understanable that SAM users have USB problems at startup, as their devices just didn't works and need to restart one/or many times the machine. Just now need to make normal , proper report, like 1) 2) 3). I can't test it myself, but at least i can put it to BZ if everything will be 100% reproducable. If we will now , lets say, make a BZ like "sometime, randomly, devices not works" then how developer will make a test case for it, if let's say for him all just works with his usb HW ?
User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: USB stalling - is there a workaround/fix for this?

Post by ssolie »

kas1e wrote:@all
Its nothing really important in our mails, i just offer to Chris a help to make a normal bugreport, but if it make sense to continue here, then why not. There is relevant parts from our mails (hope Crhis doesn't mind):
Good stuff. Please continue to share this kind of stuff. It helps everyone.
ExecSG Team Lead
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1483
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: USB stalling - is there a workaround/fix for this?

Post by tonyw »

Is there anything relevant in the type or brand of hub? Any extra info we can give the developer?

My own experience is that I also get USB dropouts on my Sam 440ep, although I don't use a hub. Sometimes I just find the USB system stopped: replugging both mouse and keyboard starts them up again. I'm sure that it's caused by static/RF noise, since I know that switching lights/appliances on or off nearby will often make it fail.

I don't get the same problem on the Sam 440 Flex, nor the Sam 460, but they are in metal cases. The Sam 440ep is in an open plastic case.

[edit]
It just occurred to me that the Sam 440ep is also the only computer I have running from an unearthed plug pack. I'll try earthing the power supply zero volt line and see if it makes a difference.
[/edit]
cheers
tony
User avatar
eliyahu
Beta Tester
Beta Tester
Posts: 63
Joined: Sat Jun 18, 2011 12:13 am

Re: USB stalling - is there a workaround/fix for this?

Post by eliyahu »

chris wrote:*sigh* this is still present in Update 5. Can somebody please, please, please as a priority, fix this incredibly irritating bug, which often makes OS4 unuseable.
agreed. this is still extant on update 5 -- both on my SAM440ep-flex and pegasos 2 systems. under heavy CPU loading the USB stack starts receiving -35 errors and eventually gives up on the devices (in this case the A-EON branded keyboard and mouse). sometimes unplugging and replugging the devices works, sometimes not; but it's always frustrating.

is there some way to ensure the USB stack always has highest priority in the scheduler? that seems to be the issue.

-- eliyahu
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: USB stalling - is there a workaround/fix for this?

Post by chris »

kas1e wrote:@all
Its nothing really important in our mails, i just offer to Chris a help to make a normal bugreport, but if it make sense to continue here, then why not. There is relevant parts from our mails (hope Crhis doesn't mind):
And here's my latest reply that I sent before reading the updated thread:

"I'm pretty sure it has happened with just my Apple keyboard and a mouse attached (directly to the back). I think it only occurs if there is a hub involved, I'll try my non-Apple keyboard via the hub and see what happens."

I'm just about to try that and will report back.

The hub is a USB 2.0 powered one I bought from Maplins when I got my AmigaOne (2005?). It worked absolutely flawlessly until Update 3, even on the AmigaOne where USB problems were rife. It's an own-brand one so I can't provide much more information about that.

@eliyahu
I think that's an unrelated problem which I've also seen reported frequently.
chris
Posts: 564
Joined: Sat Jun 18, 2011 12:05 pm
Contact:

Re: USB stalling - is there a workaround/fix for this?

Post by chris »

My other keyboard (a mini Keysonic ACK-3400U) I couldn't get to work at all with the EHCI driver enabled (without it, it was working OK). The USB stack recognised it (device insertion pop-up) but it didn't initialise. I have noticed that the USB problems seem to persist across reboots unless I switch off completely for a while (ie. if I'm having problems with devices only working for a few seconds, this will continue to be a problem unless I completely power off for several minutes). They also get worse the more things I have attached. To get my USB working again I had to power off completely, plug in only my Apple keyboard and power up. Even then it didn't work until I'd disconnected and reconnected. I then put the mouse back in (which has stopped working again whilst I've been typing). It's much worse with the EHCI driver - if I remove that (as I'm about to do) the problems are less frequent.

Disconnecting and reconnecting the entire chain, rather than one device, also is more effective at getting things working again. Except, that isn't working now with my mouse.
User avatar
ChrisH
Beta Tester
Beta Tester
Posts: 920
Joined: Mon Dec 20, 2010 9:09 pm
Contact:

Re: USB stalling - is there a workaround/fix for this?

Post by ChrisH »

BEWARE that I found Sam440ep_setup causes USB stability problems (reported as bug 7284), so please do not use it!

As far as I recall (before I stopped using my Sam440 regularly), Update 3 or 4 mostly got rid of the problem of the keyboard/mouse *randomly* stopping working. HOWEVER, I did find that since Update 3 or 4, some keyboard & mice simply do not work at all through a hub. It MAY be that this is actually the same problem, but just happening a lot faster (rather than taking some time), so I'll comment on this possibly related bug (7283) in case it helps:

As far as I was able to tell: Mice & keyboard *without* built-in hubs seem to work fine through all of my hubs (and this includes my KVM's "virtual keyboard", which hides the fact that my Apple keyboard actually has a built-in hub). HOWEVER, using an Apple keyboard (which has a built-in hub), the results are more mixed - it works with some hubs, but not others.

So if anyone has problems with USB keyboards (especially with built in hubs) not working through a hub, I suggest that they try buying a different USB hub. (Although there is no guarantee it will work better - it may actually be worse!)
Post Reply