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

Thanks for clarifying us doubts.

  • I have plans to start ASAP a fundraiser of 5,000.00 thousand dollars for you dos. I will be the first one to donate $500 to the fundraiser. We need to work together to push Librem 5 development.

  • My main wish is to quick release newer Redpine driver v2.6.1 for Librem 5 via downstream and upstream.

220px-Redpine_Signals

.

Thanks 0xd05

5 Likes

There is an MR by Angus to update it to 2.5.1 in our tree: https://source.puri.sm/Librem5/linux/-/merge_requests/578 that wasnā€™t pushed any further because of licensing issues. Seems like this got resolved in 2.6.1, so updating it in the downstream tree shouldnā€™t be a big problem.

Upstreaming is, however, a completely different matter. I donā€™t think Iā€™d be able to do that, at least not without spending a lot of time getting familiar with mac80211 drivers first, and then Iā€™m pretty sure there would be plenty of reworking needed to put that driver into upstreamable state. I can work on upstreaming some of our changes to drivers such as tps6598x, max170xx, bq25890, wm8962ā€¦ or the thing I talked about at FOSDEMā€¦ but Redpine driver is out of my competence.

8 Likes

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