FOSDEM 2024 talk by Sebastian Krzyszkowiak about USB suspend/resume bug affecting Librem 5

So this isn’t related to the half hang issue?

1 Like

Not at all. This issue was about USB resets happening occasionally when the modem attempted to wake itself up from USB suspend. You would see it disappearing from the bus and appearing back a moment later.

Was the talk not clear enough? Let me hear some feedback :wink:

3 Likes

No the talk was clear but I thought this half hang issue was related to the USB bus. My mistake.

EDIT: I see the new “Network Problems” issue you created. Thank you! I guess it’s actually this issue you created:

1 Like

The “half hang” (the problem that can result all sorts of erratic behavior, such as “sudo” hanging, the phone not suspending anymore etc.) is a result of use-after-free that’s happening in CDC-NCM gadget that implements the network interface over USB-C port. I haven’t really traced the whole execution path yet, but I found a recent patch on Linux mailing lists that was described to fix such an issue: Draft: usb: gadget: f_ncm: Fix Kernel Panic due to access of invalid gadget ptr (!769) · Merge requests · Librem5 / linux · GitLab. This is a USB gadget, but ultimately the problem is not really related to USB - the same bug with the same consequences could end up in any other driver.

There’s also the issue with cellular network connection getting stale (not receiving any incoming packets). This is actually related to USB power management (as in: this is what can trigger it), but so far it looks like the problem actually happens on the modem side rather than the host (but I don’t have any conclusive proof yet).

8 Likes

She is paid for work on something that could benefit PureOS in 2025. No tears.

2 Likes

I commented in usb: gadget: f_ncm: Fix Kernel Panic due to access of invalid gadget ptr (!769) · Merge requests · Librem5 / linux · GitLab

I moved on May 30 from one L5 to another. The new L5 has the SparkWLAN card, the older Redpine. Both are otherwise identical in kernel and below /home/purism. Since this, I faced no hangup when returning from suspend.

Another observation (as feeling) is, that the new L5 with this card draws more battery power when the L5 acts as Internet AccessPoint and is otherwise unused (display off, no apps running). I will do an exact measure when the device returns from display swap.

2 Likes

@JCS
Any ETA to bring back @dos for Purism?

I’m very nervous about losing @dos and dos go far away for other company.

6 Likes

Senior leadership at Purism greatly appreciates @dos’s work and is eager to ramp up billable hours as soon as financially viable. I scheduled a meeting with leadership for Thursday to sync up and kick off planning R&D efforts (more from a financial planning and high-level project management perspective at this time).

8 Likes

Thank you.

3 Likes

If anyone can solve the resume from suspend and half hang issues it would be him.

2 Likes

Yeap.

Just thank you for new patches Sebastian Krzyszkowiak. :pray:

1 Like

Do we have new patches for the USB problem?

1 Like

It is fixes for Data from S2R, so gsm-internet and mms will more reliable.

What usb problem issues that i do not know?

1 Like

Watching this now

2 Likes

The half hang thing which I thought had something to do with the USB port issues. When I connect my Nexdock it will do this when I unplug or replug it.

2 Likes

Tested and it really work amazing. ( ! ) s2r.data bug it gone.

Fixed too.

If u want testing downloads packages below then install all: ‘sudo dpkg -i *.deb’ on Librem 5 then Reboot, check gsm.data box before and after s2r.

Gnu Byzantium download only.

sbvpcfkr3orp8nmx

All packages were processed from Petitboot System.

Gnu | Purism
Libre Software
Sebastian Krzyszkowiak

1 Like

So these fixes are not mainstreamed yet?

1 Like

No really. This is a quick opportunity for your device to perform better. :wink:

1 Like

Ok so what breaks when I do this?

1 Like

Nothing brakes, just reupdates some system packages.

1 Like