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

A forum for general AmigaOS 4.x support questions that are not platform-specific
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 »

ChrisH wrote: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!)
SAM440EP_Setup makes no difference whatsoever to this issue.

I've tried connecting the keybaord and mouse directly to the SAM, and on first boot the keyboard failed to work - and that was without the EHCI driver as I have removed that by default given that USB is unuseable with it enabled.

'twas my Apple keyboard though with the built-in hub, I just eliminated my other hub (which is in the chain mainly because it generally improves matters)
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 »

chris wrote:I just eliminated my other hub (which is in the chain mainly because it generally improves matters)
FWIW, I found that prior to Update 3 (I think), a hub did reduce the chance of it dropping, but after that Update hubs tended to actually make matters worse. i.e. Direct connection worked best (especially for keyboards with built-in hubs).
SAM440EP_Setup makes no difference whatsoever to this issue.
So you may think, but there are technical reasons why it MAY cause problems. So it is best if you just avoid using it. All it can do is complicate understanding the problem.
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 »

ChrisH wrote:
chris wrote:I just eliminated my other hub (which is in the chain mainly because it generally improves matters)
FWIW, I found that prior to Update 3 (I think), a hub did reduce the chance of it dropping, but after that Update hubs tended to actually make matters worse. i.e. Direct connection worked best (especially for keyboards with built-in hubs).
Well, that's not what I've found in recent experimentation, but the point is that this shouldn't have happened. USB was working more-or-less flawlessly before Update 3, so whatever was changed needs to be looked at and reverted back.

What I have noticed is that the problem gets worse the more USB devices I attach - regardless of whether they are hubs or not.
SAM440EP_Setup makes no difference whatsoever to this issue.
So you may think, but there are technical reasons why it MAY cause problems. So it is best if you just avoid using it. All it can do is complicate understanding the problem.
I get the same problems whether it is running or not - it's not a factor.
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 »

chris wrote:USB was working more-or-less flawlessly before Update 3, so whatever was changed needs to be looked at and reverted back.
All I can say from my own earlier careful tests: I found that it worked much better overall since Update 4, but in certain cases it was worse than Update 2. (Personally I would be against having the USB changes reversed.)

There is obviously something different between your situation & mine that is causing you to have worse problems. I don't know what that could be. My tests were done with a Mini-ITX (not Flex) Sam440. I think I used a modern Apple keyboard with 'flat' keys, rather than the old one with chunky keys.
I get the same problems whether it is running or not - it's not a factor.
I'm not saying it IS a factor at this exact point, but rather that it COULD easily be a factor when someone asks you to try a different test.
Spectre660
Posts: 1538
Joined: Sat Jun 18, 2011 3:16 pm
Location: Montserrat

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

Post by Spectre660 »

On theory on Sam USB issues is that some issues may be caused by the power supply not being able to handle small loads properly.

ChrisH wrote:
chris wrote:USB was working more-or-less flawlessly before Update 3, so whatever was changed needs to be looked at and reverted back.
All I can say from my own earlier careful tests: I found that it worked much better overall since Update 4, but in certain cases it was worse than Update 2. (Personally I would be against having the USB changes reversed.)

There is obviously something different between your situation & mine that is causing you to have worse problems. I don't know what that could be. My tests were done with a Mini-ITX (not Flex) Sam440. I think I used a modern Apple keyboard with 'flat' keys, rather than the old one with chunky keys.
I get the same problems whether it is running or not - it's not a factor.
I'm not saying it IS a factor at this exact point, but rather that it COULD easily be a factor when someone asks you to try a different test.
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 »

ChrisH wrote:
chris wrote:USB was working more-or-less flawlessly before Update 3, so whatever was changed needs to be looked at and reverted back.
All I can say from my own earlier careful tests: I found that it worked much better overall since Update 4, but in certain cases it was worse than Update 2. (Personally I would be against having the USB changes reversed.)

There is obviously something different between your situation & mine that is causing you to have worse problems. I don't know what that could be. My tests were done with a Mini-ITX (not Flex) Sam440. I think I used a modern Apple keyboard with 'flat' keys, rather than the old one with chunky keys.
Mine's an EP, with one of the older keyboards. I've had it that long as well, and don't recall any problems before Update 3 (except for an occasional case of USB giving up shortly after boot, but that was a reconnect and never re-occured in that session). My entire USB chain hasn't changed since about 2005; I leave everything other than keyboard and mouse disconnected as I find the stack tends to ignore the keyboard or mouse more often on boot if anything else is plugged in.

The EHCI driver exaggerates the problem to the point of unuseability, which suggests it might be timing related. I actually had less problems with USB on my AmigaOne-XE (although I never got as far as installing Update 3 on that).

You are welcome to witness the problems at the next ANT if I can get to it.
danwood
Posts: 18
Joined: Mon Aug 29, 2011 7:37 pm

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

Post by danwood »

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.

There is a longer thread about it here (I didn't bump it because the title is misleading/wrong): http://forum.hyperion-entertainment.biz ... f=14&t=338

An acknowledgement that this has been logged as a bug would be a start.

...and there goes my mouse. I had to reconnect my keyboard before I started typing this. Mouse still not working after a re-connect. Re-connect again... both items now working. That's how annoying and how frequent this is.

usb.log attached.
I'm affected by the same problem using several different USB cards with my Apple slimline keyboard and mighty mouse.

I disabled ehci in kicklayout to return to USB 1,1 and the problem has gone away.

Seems USB 2.x is still very glitchy. Isn't Posedion now open source? Any reason we can't just use that! Works flawlessly for me with the same mouse/kb on MorphOS, AROS and OS3.
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 »

After some extensive testing with Chris H last week, I've been running with EHCI enabled and both keyboard and mouse plugged directly into the back of the SAM, with no problems since then.

The problem does seem to be linked to the USB hub drivers.
Post Reply