RPi 4B with RISC-OS 5.28 & 5.29 Lockups
Paolo Fabio Zaino (28) 1882 posts |
@ Alan Adams
Aren’t the USB ports of the ARMX6 already obtained by using a USB HUB internally? Sorry I do not remember, but on the back of my head I have this thought. If my rusty memory is correct, it may be worth checking if that internal hub is powered on not. |
Jeff Blyther (1856) 47 posts |
Hi David, |
Jeff Blyther (1856) 47 posts |
Hi Paolo, |
Paolo Fabio Zaino (28) 1882 posts |
Hummm I wonder if it’s something happening in ehci_intr1…
I have a Rock 5B too! It’s an awesome SBCs, I have got the 16GB RAM model, it’s totally awesome to run Linux, yes the Radxa kernel is a bit of a mess. What I meant with the “always on” mentioning in one of my earlier post is that my KVM leaves the HDMI port on and copies the EDID on it, so I handle that problem this way. I started to have a look at that kernel to list all the fixes and eventually port them to 6.10, but had no time yet, plus given I solved the issue using my KVM, it’s now a lover priority for me. |
David J. Ruck (33) 1635 posts |
The USB switching lock up isn’t an electrical issue. With two identical Raspberry Pi 4B’s ONLY the RISC OS one locks up, the Linux one doesn’t. With an ARMx6 mini.m ONLY when running RISC OS does it lock up, Linux doesn’t. There’s only one place to look at for this fault, and that’s the software. |
Paolo Fabio Zaino (28) 1882 posts |
Druck, please, don’t take it like I am trying to prove you wrong jeez. I am trying to figure out what is happening with your USB Switch. For your remark Linux is fine and RO is not, while I believe you, there is also a tons of folks that had similar issues with Linux on the Raspberry Pi 4: https://forums.raspberrypi.com/viewtopic.php?t=275492 https://forums.raspberrypi.com/viewtopic.php?t=18195 In general it seems that the Pis B+ are more suitable for this type of things. I am not saying that there isn’t a problem on the RISC OS USB Stack, but it’s very much likely that the issue IS being triggered by an electrical or signal problem from which the RISC OS USB stack doesn’t recover well. If it was just a bug in the RISC OS USB stack, then it should manifest with ALL switching, not just with specific devices, don’t you agree? Hence, I mentioned with my KVM I have never experienced this (not even once). |
Steve Pampling (1551) 8170 posts |
Speaking as a support person of a little number of years – no. It very much depends on the mode you’re using the USB interface and the timings of switching edges vs. the timing loops/delays of the software. Equally, I wouldn’t agree with Druck in the assumption that it absolutely is not a power issue, if it is even remotely possible that the reduced power level rounds off/delays switching edges. Change what can be changed easily and if that makes a difference then you have a contributory item to the perceived fault – which may not be the fault1 but a factor that exacerbates an edge case into out of spec. 1 Anyone who believes in singular faults in a system is living a life of self-delusion. |
David J. Ruck (33) 1635 posts |
Here’s the USB events from kern.log, connecting:
Disconnecting:
The mice and keyboard wireless from a Logitech dongle which is plugged in to the monitor’s USB 2 hub which is plugged in to the switch (legacy from when I needed wired keyboard and mouse both connected and the switch only switches one device). |
Steve Fryatt (216) 2105 posts |
No, that’s nonsense. There can be variations in the way that different hardware (such as KVMs) implement USB, which all fall within the standard but don’t all play well with the (some of) the USB implementation(s) used by RISC OS. I know that firmware and software engineers like to blame the hardware engineers, but over the years that I’ve been (primarily) a hardware engineer, I reckon the score has probably been about even. :-) FWIW, I thought at least one common factor was the XHCI module on the Pi 4 and Titanium? I can certainly get neither machine to switch with my KVM (the system freezes on the first return of the keyboard and mouse to the RISC OS box, requiring an Alt-Break to clear it and naming the aforementioned module in the process). The same KVM is happy with the non-XHCI USB on a couple of Beagleboards, however. |
Stuart Swales (8827) 1357 posts |
Interesting, as my FOURtress (a Pi 4 based system) has been the most reliable switching of the set of Pi 1, Pi 3B, ARMX6 with my KVM. I do have a powered hub between the keyboard/mouse and the RISC OS systems though. |
Paolo Fabio Zaino (28) 1882 posts |
@ Steve
What is nonsense, sorry? You do realise we are saying the same thing right? My point was, there can be a number of things on the device (either firmware or hardware) that can be causing a behaviour that is not fully expected by the USB stack (or even causing side effects in the USB stack code). Certainly is not a behaviour triggered by every device and so it’s something on the device that is triggering the problem. Now, if we need to insist of “commas”, “dots”, “semantics”, sure let’s have fun talking about nothing useful, I am sure this type of activity is going to be very valuable also for who may have similar issues in the future. XD |
Steve Fryatt (216) 2105 posts |
As far as I can see, I’m saying the same thing as Steve P and Druck – and they appear to be disagreeing with you, too… :-) |
Paolo Fabio Zaino (28) 1882 posts |
That is surelly an interesting statement Steve, given Steve P doesn’t seems to agree with Druck as per his words:
In any case, I am not 100% sure they have read my comments through, in the end this forum is quite famous for that, so I give up, clearly you’re interested in something else but finding the problem someone is having. As a technical info: my 2 RPi4 are working fine also with a USB Switch (just finished testing), so probably it’s the case that someone with desire to help the two users looks at a bit more details on the USB Switch being used by them. Hope this post have enough commas, dots and sematics for Steve Fryatt to actually understand what I meant :) |
Steve Pampling (1551) 8170 posts |
Disagreeing with Druck too, in that absolutely ruling something out on slim or no evidence is always a bad idea. Too many non-binary items around. |
Rick Murray (539) 13840 posts |
While I would agree that the little boards are made to a budget, these days I’m not sure I’d agree that the big boards are necessarily any better. They’re just in a nicer looking box… |
André Timmermans (100) 655 posts |
On the subject of software USB lockups, since KinoAmp can read DVDs just fine, I have experimented at home with a little program to backup my DVDs. Since it doesn’t cope well with DVDs were the copy protection consists of bad sectors (the time spend on trying to read each of these bad sectors is far too long), I tried to interrupt the program but the machine freezes, sometime instantly, sometimes after a delay that never exceeds 30 seconds. This suggest to me that something in the CD driver → SCSI → USB chain leave some background routines in a bad state. |
David J. Ruck (33) 1635 posts |
On the contrary, I can provide plenty of evidence that on two entire different machines (Raspberry Pi 4B and ARMx6 Mini.m) which can run both RISC OS and Linux, it is only under RISC OS that crashes when the USB is switched. What more do you need? A clap of thunder and a big booming voice from the sky? |
Chris Hughes (2123) 336 posts |
Just for some balance. I have an ATEN VGA/USB switch which has a wired Keyboard and a wireless mouse connected (no VGA connection in use nowadays) and this works without fail between a Windows 10 PC, a Windows 10 Laptop, an ARMX6 and a 4te2 now (was a Raspbeery Pi 1B). I am also using a UGREEN 3 way HDMI switch and this also switches fine been the laptop/ARMX6/4te2 But I had one switch previously for the USB they simply would not pickup the connection on switching between computers. |
David J. Ruck (33) 1635 posts |
Had a couple of errors when switching USB input devices on a Mini.m which may be related to hang on the Pi 4B.
|
Colin (478) 2433 posts |
I just discovered this thread but having spent 10 days throwing everything at a serialusb bug that freezes the machine when it is receiving data and you close the usb endpoints only for the problem to disappear when plugged into the dwcdriver my money is on the xhcidriver – the usbdriver module is the same for both backends. As druck says linux has no problems so it’s not the devices that are attached. A freeze while switching a keyboard/mouse may be due to the device bouncing when connecting and the xhci driver having problems with disconnecting in certain situations. I run my pi4 from the charger connection of a powered hub. Since picking up riscos again, and updating roms, the pi4 won’t start with the data connector of the powered hub connected via xhci but it does if connected via the dwcdriver. And linux has no problems either way. When starting connected to xhci it stops where usb is enumerating devices the screen is blank after the bootloader flash screen disappears and no usb device is enumerated. |