Page 2 of 2
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Thu Sep 09, 2021 10:58 am
by paulbnl
If changing loglevel from 4 to 9 makes it work then that indicates a timing issue. The extra logging probably delays something that is normally too fast for the hub.
Try to turn off hub auto suspend with v=loglevel=4 usbcore.autosuspend=-1 in u-boot.txt.
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Thu Sep 09, 2021 11:16 am
by OnCor
paulbnl wrote: ↑Thu Sep 09, 2021 10:58 am
If changing loglevel from 4 to 9 makes it work then that indicates a timing issue. The extra logging probably delays something that is normally too fast for the hub.
Try to turn off hub auto suspend with v=loglevel=4 usbcore.autosuspend=-1 in u-boot.txt.
I made the changes you suggested and it worked. That is so awesome! I also replaced your zimage_dtb file with the original one and it still functioned properly. The auto-suspend was totally to blame. I guess it just needs to be documented somewhere to add this line to u-boot.txt if you're having USB issues?
bazza_12 wrote: ↑Thu Sep 09, 2021 9:28 am
That's interesting... on my setup the u-boot.txt doesn't exist only u-boot.txt_example.
You have to create it yourself by removing the "_example" part of the filename so that it becomes "u-boot.txt". Just make sure you add usbcore.autosuspend=-1 in there as recommended by paulbnl above.
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Thu Sep 09, 2021 11:45 am
by paulbnl
Nice! So something has changed with auto suspend in kernel version 5.
I don't know what else is affected by disabling auto suspend or if it is even needed. If it is not needed then Sorgelig could disable it by default.
You can also try to change usbcore.autosuspend=3 or higher to see if longer delay times also fix it. It says here that the default should be 2(seconds):
https://www.kernel.org/doc/html/v5.0/dr ... delay-time
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Thu Sep 09, 2021 11:52 am
by bazza_12
I just found it interesting cos I don't have any of these issues listed.
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Thu Sep 09, 2021 12:25 pm
by NerdENerd
usbcore.autosuspend=-1 also fixed my issues.
My main SD card had a u-boot.txt that contained
v=loglevel=4 usbhid.jspoll=1 xpad.cpoll=1
it did not work on release_20210906 but changing it to
v=loglevel=4 usbcore.autosuspend=-1 usbhid.jspoll=1 xpad.cpoll=1
seems to have made the hub work.
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Thu Sep 09, 2021 5:51 pm
by paulbnl
NerdENerd wrote: ↑Thu Sep 09, 2021 12:25 pm
usbcore.autosuspend=-1 also fixed my issues.
Can you also try if usbcore.autosuspend=3 or 5 also fixes it?
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Thu Sep 09, 2021 9:08 pm
by NerdENerd
Neither 3 or 5 work.
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Fri Sep 10, 2021 9:33 am
by Merlkir
v=loglevel=4 usbcore.autosuspend=-1 usbhid.jspoll=1 xpad.cpoll=1
Made both a gamepad and keyboard work, but the inputs are kinda weird, like randomly sluggish and delayed, or some of them seem to not register entirely.
edit: Turning on fast USB polling via a Script breaks this again, no kb or gp functionality.
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Fri Sep 10, 2021 10:29 am
by NerdENerd
I just spent a few hours playing with an 8BitDo wireless adaptor plugged into my hub and a PS5 controller and didn't see any random sluggishness. I actually cracked out a few good scores in some games. Typing on the keyboard also feels perfectly responsive.
This was on release_20210906 with usbcore.autosuspend=-1
If you look at the fast polling script
https://github.com/MiSTer-devel/Scripts ... ling_on.sh
It writes
Code: Select all
open("/media/fat/linux/u-boot.txt","w") as file:
file.write("v=loglevel=4 usbhid.jspoll=1 xpad.cpoll=1\n")
so it is not surprising it stops working as it overwrites the usbcore.autosuspend=-1. You already have fast polling on with the entries usbhid.jspoll=1 xpad.cpoll=1 in u-boot.txt.
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Fri Sep 10, 2021 1:40 pm
by ash2fpga
Merlkir wrote: ↑Fri Sep 10, 2021 9:33 am
v=loglevel=4 usbcore.autosuspend=-1 usbhid.jspoll=1 xpad.cpoll=1
Made both a gamepad and keyboard work, but the inputs are kinda weird, like randomly sluggish and delayed, or some of them seem to not register entirely.
edit: Turning on fast USB polling via a Script breaks this again, no kb or gp functionality.
On a whim, maybe try 500hz (2ms) polling instead of 1000hz (1ms) polling?
1 -> 1000hz (1ms)
2 -> 500hz (2ms)
4 -> 250hz (4ms)
8 -> 125hz (8ms)
Several months back, I tried 500hz (2ms) and I felt like I got more consistent controller response (tested with 8bitdo m30 2.4g / NES / Contra).
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Fri Sep 10, 2021 4:06 pm
by Merlkir
Just 500 Hz on its own - not working.
Changing v=loglevel=4 to v=loglevel=9 - also not working.
v=loglevel=4 usbcore.autosuspend=-1 usbhid.jspoll=1 xpad.cpoll=1 - works, even my wifi dongle lights up, but the keypresses are inconsistent.
v=loglevel=4 usbcore.autosuspend=-1 usbhid.jspoll=2 xpad.cpoll=2 - same thing, works inconsistently.
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Fri Sep 10, 2021 9:31 pm
by NerdENerd
Merlkir wrote: ↑Fri Sep 10, 2021 4:06 pm
Just 500 Hz on its own - not working.
Changing v=loglevel=4 to v=loglevel=9 - also not working.
v=loglevel=4 usbcore.autosuspend=-1 usbhid.jspoll=1 xpad.cpoll=1 - works, even my wifi dongle lights up, but the keypresses are inconsistent.
v=loglevel=4 usbcore.autosuspend=-1 usbhid.jspoll=2 xpad.cpoll=2 - same thing, works inconsistently.
What about if you roll back to release_20210711?
Is the controller still inconsistent?
https://github.com/MiSTer-devel/SD-Inst ... n64_MiSTer
Download release_20210711.rar and run the installer, selecting Update Boot+Files will roll you back and leave the rest of you installation alone. Or you could do a full install to a different SD card.
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Sat Sep 11, 2021 2:59 pm
by Merlkir
I think I had this issue before, but not quite to this extent.
(it's possible my USB hub is bad, or poorly supported, but it wasn't as bad before the kernel update)
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Sun Sep 12, 2021 1:42 pm
by Bear
Having this issue with a BlisSTer, even when the BlisSTer is upgraded to latest firmware. I'll try changing the usbcore.autosuspend and see if that does anything.
Re: Powered USB hub and devices connected to it no longer functioning after update
Posted: Sun Sep 19, 2021 2:14 pm
by kerobaros
My USB hard drive hasn't been working through my USB hub board for... several updates, not sure how many. Hard drive works fine attached to my laptop.
Read through this thread and tried adding the 'usbcore.autosuspend=-1' flag, rebooted; no luck.
Changed v=loglevel from 4 to 9, rebooted again: hard drive is seen and mounts just fine.
Went back into u-boot.txt, removed the usbcore.autosuspend flag, but left the loglevel at 9: hard drive still works.
What does this mean? I have no idea! But tl;dr: changing 'v=loglevel=4' to 'v=loglevel=9' in /media/fat/linux/u-boot.txt was all I needed to get my USB hard drive working through my USB hub board again.