Librem Mini v2: USB tuning preview, episode 3

I have a new USB tuning build for Librem Mini v2. As before, this is coreboot+SeaBIOS only for now, if it works out well it will go into a proper release for PureBoot. Also Mini v2 only at the moment, it’s likely this will apply to v1 also but I have not tested that yet.

As always, use the preview branch’s coreboot_util.sh to flash:

mkdir ~/updates
cd ~/updates
wget https://source.puri.sm/firmware/utility/-/raw/4.22.01-Purism-1-Preview-Mini-USB2-202405/coreboot_util.sh
sudo bash coreboot_util.sh

This resulted in measurable improvements on various boards I tested. Even on a device that was not showing any problems, this change produced improvements in signal integrity.

This build also has a related change addressing some sudden shutoffs that had been reported when plugging in bus-powered USB hard disks.

Please let me know what results you get! I am optimistic that this will address a lot of issues, but if you do still see issues, please try the peripherals in different ports to see if there is variation among the ports.

@bugcity , @Kite , @howil - please give these a try for the USB 2.0 issues reported in various threads, and thanks as always for your feedback.

1 Like

Any ETA for Coreboot v24.02.01 for Librem 14?

Thanks

1 Like

Should be within the next couple of weeks for coreboot/SeaBIOS and then a PureBoot release after that.

2 Likes

Thank you.

1 Like

@jonathon.hall Thanks for your work on this.

I successfully flashed the Coreboot+SeaBIOS option from “4.22.01-Purism-1-Preview-Mini-USB2-202405” today using a fully updated debian 12.5.0 installed on NVME.

Overall it seems like an improvement. The system is able to reboot or shut down fully and then boot with flash drives and hdds left plugged in. Before it was failing to boot unless I unplugged the drives or unplugged the power supply. My USB 3.0 flash drives seem to be working consistently now. Here is what I am seeing:

Debian 12.5 checking in both Nautilus and Gnome Disks:

Working devices:

  • USB mouse - Zowie ZA11
  • USB keyboard - Fenek Mother Membrane - have not run into sticky keys issue again yet, but have only been using for one day.
  • ADATA S102 USB 3.0 32GB flash drive - works in front and back USB 3.0 ports (blue). Not detected in front USB 2.0 ports (black)
  • Sandisk Cruzer Glide USB 3.0 32GB flash drive - same as ADATA

Not working devices:

  • Kingston Datatraveler USB 2.0 8GB flash drive - not detected in any port

Partially working devices:

  • Librem vault 32GB USB drive (has backup .asc file on it) - sporadic, sometimes detected, sometimes not detected in all ports. Plugging into the type C port shows it repeatedly connecting/disconnecting
  • IOCrest 2.5" USB 3.0 to SATA hard drive external enclosure (bus powered) - still crashes entire system to power off when plugged into front and back USB 3.0 ports (blue). When it crashes, the system will fail to boot again until I unplug the PSU. When plugged into front USB 2.0 ports (black) the power LED comes on, but it is not detected and does not crash the system. Same as before; if I plug the HDD in before plugging in the PSU, then boot, it operates normally. Only hot-plugging seems to cause the crash.
  • USB audio DAC/amp Nuforce icon (has external power supply) - Detected in all ports, but USB audio is still crackling badly during audio playback. Unusable through headphones. This amp works fine with my other computers. The mini’s headphone jack is usable with less noise.
1 Like

Thank you for the detailed test report @bugcity . For the two problems described:

USB 2.0 high speed not working well - it sounds like the peripherals that are not working are all this speed, or are falling back to it when plugged into the black ports since those are 2.0-only. (Low or full speed sounds OK, and super speed is OK.) I had high hopes that the latest tuning improvement would address this, since it did work on the affected device that I have, but unfortunately it sounds like this iteration does not. Still, I appreciate the detailed report and test effort.

USB SATA disk enclosure causing shutoff - this device could be actually overcurrenting the Librem Mini USB ports or +5V rail. The fact that the system will not power on again until power is removed can be caused by this.

Many peripherals play fast and loose with USB power limits, which is OK a lot of the time because many hosts don’t have per-port overcurrent protection, which means they just hope that you don’t damage the system by overcurrenting. Librem Mini does have per-port overcurrent though (one for each pair of A ports).

The overcurrent detection signaling was disabled in this build (the actual protection still applies, just the signaling to the host which was causing some false positives). That helped, but since some shutoffs remain, it seems likely that the hard disk is actually overcurrenting either the USB-A port pair or the +5V rail, which causes the device to shut off to protect itself from damage.

Does it have an option to self-power (plug in a power supply to the enclosure itself)? Could you check the current rating on the disk installed in the enclosure? (Probably says something like 5V 800 mA, 5V 1.0 A, or 5V 0.55 A, something along those lines.)

You can gain a little bit of current headroom by using a particular port pair (two stacked ports) for just this hard disk, leave the other port empty. The overcurrents are shared per stacked port pair on Mini so you can effectively borrow the current from the other port this way, though I’m not sure this will be enough for this disk. Or, if you have a self-powered USB hub that tolerates whatever current this hard disk needs, you could use that.

Thanks again for the detailed report, I hope this helps.

1 Like

@jonathon.hall

I tested utilizing only one port in a stacked port pair. However, as you suspected, the abrupt power off still happens when hotplugging a hdd.

The Toshiba model MQ04ABF100 hdd in the IOCrest enclosure says DC+5v 1.0A on the sticker. The enclosure model is Syba SY-ENC25057.

The other one was a Segate BUP Slim model ‎B07MY4KWFK 1TB. The drive is not easily removable to check the voltage/amperage rating.

Neither enclosure has the option to power externally. However, I just tested with the drive plugged into this IOGear USB 3.0 4-port switch (model GUS434) (bus powered) which says it has overcurrent protection on the box. It works in the blue 3.0 ports (front and back) without causing the system to power off on hotplug. However, it is still not detected in the black 2.0 ports. The hub itself works fine in all ports. I tested with a mouse plugged into the hub.

I also tested a few more USB 2.0 devices:

  • Schiit Fulla (original) USB 2.0 audio DAC/amp (bus powered): not detected in any port. Not listed in lsusb -v
  • Logitech C910 USB 2.0 web cam: Works in all ports, audio is crackling but it may just be the linux driver
  • Dell U2311H USB 2.0 monitor hub: Not detected in any port
  • HP Laserjet P1006 Printer USB 2.0: Not detected in any port. Doesn’t show via lsusb -v. Detected and works fine on my other computers running linux.
1 Like


Nothing changed… Tested Logitech-Webcam and a couple of USB-stick-drives I did also test before.

Any other hints? Changing the hardware?

2 Likes

@howil and others - this needs a hardware rework, change one capacitor. The ODM was very helpful in troubleshooting this, but we cannot address it in firmware since the tuning improvements above were not sufficient.

Please contact support@puri.sm if you would like to discuss an RMA or out-of-warranty repair. If you are comfortable replacing an SMT capacitor, you can make the change below.

This capacitor on the bottom of the board needs to be replaced with 22 uF 6.3V 0603 on affected devices.

My apologies for taking so long to reach this solution. I was very hopeful for a firmware fix since the changes each showed measurable improvements on devices I have, but there’s no farther we can go in firmware. This change fixed the issue on both affected devices that I have with the current firmware release, no tuning changes were needed.

1 Like