Sam440ep_setup breaks USB with Update 3

A forum for general AmigaOS 4.x support questions that are not platform-specific
User avatar
ChrisH
Beta Tester
Beta Tester
Posts: 920
Joined: Mon Dec 20, 2010 9:09 pm
Contact:

Sam440ep_setup breaks USB with Update 3

Post by ChrisH »

EDIT: My theories for this problem have been revised several times, so please see the second page for more recent developments. But if you want to know all the details which lead me to my conclusions, then please DO read all the posts I made!


I've always had problems with my USB keyboard & mouse stop working occasionally on my Sam440 (ITX). Originally it was bad, but I think some Sam440 bugs got fixed so that by Update 2 it was only a very rare occurance. But now with Update 3 it has become a lot more common again.

Chris Young has previously noticed (with Update 2 & earlier) that one of the two USB ports can be very flaky on (ITX) Sam440s, meaning that keyboard or mouse would typically stop working. The solution was with a USB hub - which a KVM typically provides for keyboard & mouse sharing, so I was automatically using this solution quite successfully (as I use a KVM). At the time we concluded it was probably a software not hardware issue.

With Update 3 the symptoms are that both keyboard & mouse stop working. Disconnecting & replugging them in usually gets one of them working again, but not both. Typically the mouse will work if I plug the KVM into the same USB port, and sometimes the keyboard (but not mouse) will work if instead I plug the KVM into the Sam's other USB port. Very rarely will both start working again, and sometimes neither will start working. If I use MUI-OWB then I can pretty much guarantee the problem appears after reading a few web pages - although it seems it can happen with heavy CPU usage from any app (e.g. Filer), or even for no obvious reason (e.g. typing text in CygnusEd - hardly a CPU hog!).

However, if I plug a (different) keyboard or mouse directly into those USB sockets, then they seem to work reliably. So it *seems* that USB keyboard & mouse are now UNreliable using a hub (which is unavoidable with a KVM).

Not sure if this a Sam440-specific driver problem, or a wider USB stack problem, as I've noticed some people (inc Deniil) report similar-sounding USB issues for AmigaOne's etc.

Please note that I have disabled the bootmouse & bootkeyboard, as they don't get on well with my KVM's simulated USB keyboard & mouse.

I have attached a USB log file showing where it stopped working, I then unplugged & replugged several times in different ports with partial success (only one worked), and then rather unusually I finally got both working again. I have inserted *** comments in two places, to show where it stopped working, and where it started working fully again. Dunno if this will help. Anything else I can provide?
Attachments
usb_1.log.zip
(1.87 KiB) Downloaded 340 times
Last edited by ChrisH on Sat Sep 17, 2011 10:50 am, edited 3 times in total.
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: USB keyboard & mouse freezing frequently since Update 3

Post by mechanic »

ChrisH wrote: Please note that I have disabled the bootmouse & bootkeyboard, as they don't get on well with my KVM's simulated USB keyboard & mouse.
Since you are disabling the boot mouse/kbd. you might want to also 'try' commenting out the UHCI module in
Kicklayout.
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
ChrisH
Beta Tester
Beta Tester
Posts: 920
Joined: Mon Dec 20, 2010 9:09 pm
Contact:

Re: USB keyboard & mouse freezing frequently since Update 3

Post by ChrisH »

Since I was wondering if USB hubs had anything to do with my KVM keyboard & mouse problems, I decided to try a USB hub I had (which previously worked brilliantly with OS4)....

... and guess what? I can't use any mice with it, and there may be some keyboard issues too. It's starting to look like Update 3 broke support for USB hubs (at least in relation to keyboards & (especially) mice).

EDIT: After a little use, USB keyboard (via hub) stopped working while using MUI-OWB. So it is definitely NOT my KVM which is at fault, but rather Update 3 seems to hate USB hubs. Hubs which worked fine with Update 2 (in fact hubs made keyboard & mouse much less likely to drop when using Update 2).

EDIT2: Just to reinforce this, using the keyboard & mouse withOUT a hub seems quite stable (even though using MUI-OWB).
User avatar
ChrisH
Beta Tester
Beta Tester
Posts: 920
Joined: Mon Dec 20, 2010 9:09 pm
Contact:

Re: USB keyboard & mouse freezing frequently since Update 3

Post by ChrisH »

@all
Can anyone else please confirm or deny if their keyboard & mouse become unstable if used via a hub? MUI-OWB seems to be a good "stress test" case (I'd suggest browsing for 30 min before being sure USB isn't going to drop, although 20 min might be enough). Not sure if it makes any difference, but I always have TuneNet playing music in the background.

It would be nice to see if this only affects Sam440s (or even only my machine...), or if it affects other hardware too.
Last edited by ChrisH on Thu Sep 08, 2011 5:11 pm, edited 3 times in total.
User avatar
ChrisH
Beta Tester
Beta Tester
Posts: 920
Joined: Mon Dec 20, 2010 9:09 pm
Contact:

Re: USB keyboard & mouse freezing frequently since Update 3

Post by ChrisH »

Spectre660 reports that:
My first problem after rebooting with update 3 was no working keyboard or mouse. They were both connected to a hub so looks like Hub support is indeed broken.
I had this exact problem with my KVM, before I disabled "bootmouse" & "bootkeyboard" in the Kickstart. So looks like bootkeyboard/mouse simply can't work with hubs?
xenic
Posts: 1183
Joined: Sun Jun 19, 2011 12:06 am

Re: USB keyboard & mouse freezing frequently since Update 3

Post by xenic »

@ChrisH
I'm using a SAM Flex 800Mhz and the hub issue prevented me from using my Amiga after installing Update3. I keep my system partition write protected (lock command) from my user-startup. When the Update3 installer rebooted my system, Rhingio tried to write new prefs to my SYS: partition and when it could not, it threw up a requester that I could not cancel because my mouse didn't work! The mouse was connected through an external unpowered hub. Once I got over the initial panic I used the keyboard to move the mouse pointer and cancelled the requester. Strangely, with the mouse connected through the hub I ended up with one of the following situations:
1. The mouse would work after a reset but not after a warm reboot.
or
2. The mouse would work after a warm reboot but not after a reset.

I switched to another unpowered hub which initially seemed to work properly but later I discovered that when I first turned the computer on, the mouse didn't work but worked after a reset or warm reboot. Since then I have disconnected the hubs altogether and have the mouse connected directly to the USB port on the computer.

As far as the keyboard goes, the SAM Flex documentation states that the keyboard will only work if it is connected to one particular USB port on the rear of the computer. The keyboard doesn't work reliably or at all if it is connected to the correct USB port through a hub. My keyboard has always needed to be directly connected to the correct USB port regardless of what UBoot or OS4 update I am using. I did have occasional keyboard dropouts (stops working) with Update2 and placed a USB reset icon in AmiDock that I can click with the mouse to restore keyboard function.

I have also had 2 peculiar mouse quirks when moving the mouse pointer around a lot while the network is being established. I don't start my network at bootup but use a menu or icon to start it when I want to use the Internet. On 2 occasions the mouse pointer got slow and unresponsive when I moved the pointer a lot while the networking was being started. Replugging the mouse or plugging in another mouse didn't help. I had to move the mouse pointer with the keyboard and select my USB reset icon in AmiDock.
AmigaOne X1000 with 2GB memory - OS4.1 FE
chris
Posts: 555
Joined: Sat Jun 18, 2011 11:05 am
Contact:

Re: USB keyboard & mouse freezing frequently since Update 3

Post by chris »

I've had no problems with my hub - it's a USB2 powered one which I've owned since the dark ages, and has worked flawlessly on my AmigaOne G4-XE since the first USB-supporting pre-releases of 4.0, and on my SAM440 with all iterations of 4.1, plus any other computers running whichever OS that I happen to have plugged it into. It is currently on the back-end of a KVM and seems quite happy there too (my keyboard and mouse is no longer plugged into it though)
User avatar
ChrisH
Beta Tester
Beta Tester
Posts: 920
Joined: Mon Dec 20, 2010 9:09 pm
Contact:

Re: USB keyboard & mouse freezing frequently since Update 3

Post by ChrisH »

chris wrote:I've had no problems with my hub ... on my SAM440 ... (my keyboard and mouse is no longer plugged into it though)
The hub problem may be limited to mouse and (to a lesser degree) keyboard, so PLEASE try plugging them in to the hub!
Last edited by ChrisH on Mon Mar 09, 2015 12:54 pm, edited 1 time in total.
User avatar
ChrisH
Beta Tester
Beta Tester
Posts: 920
Joined: Mon Dec 20, 2010 9:09 pm
Contact:

Re: USB keyboard & mouse freezing frequently since Update 3

Post by ChrisH »

@all
Just discovered that I made a mistake when installing Update 3: I forgot how I had disabled bootkeyboard & bootmouse to work with my KVM, so I ended-up having an old (Update 2) "hid.usbfd" file loaded instead of Update 3. Sadly this has not fixed my keyboard and/or mouse dying after (up to) 30min of using MUI-OWB.

EDIT: However, it DOES explain why bootmouse/keyboard were not working at all (since I had moved/deleted those files, and Update 3 did not install any new ones!). Unfortunately they still do not like my buggy KVM, so I have to leave them disabled.
Last edited by ChrisH on Fri Sep 09, 2011 6:04 pm, edited 1 time in total.
User avatar
Stephen Robinson
Beta Tester
Beta Tester
Posts: 218
Joined: Mon Jan 31, 2011 8:43 pm

Re: USB keyboard & mouse freezing frequently since Update 3

Post by Stephen Robinson »

ChrisH wrote:@all
Can anyone else please confirm or deny if their keyboard & mouse become unstable if used via a hub? MUI-OWB seems to be a good "stress test" case (I'd suggest browsing for 30 min before being sure USB isn't going to drop, although 20 min might be enough). Not sure if it makes any difference, but I always have TuneNet playing music in the background.

It would be nice to see if this only affects Sam440s (or even only my machine...), or if it affects other hardware too.
On my Peg2 using an Apple keyboard/USB hub with a Microsoft usb mouse plugged into the back of the keyboard, I've had no problems at all.
Near at hand is your forgetting all; near, too, all forgetting you.
Post Reply