the-modem-distro / pinephone_modem_sdk

Pinephone Modem SDK: Tools to build your own bootloader, kernel and rootfs
GNU General Public License v3.0
597 stars 64 forks source link

After modem randomly goes dead, 30% of the time it won't recover #210

Open ell1e opened 1 year ago

ell1e commented 1 year ago

After a while on my Allwinner 3GB PinePhone with postmarketOS 23.06, the modem will disappear and then have a chance of staying dead of maybe roughly 30%, and when it does it'll just be gone forever from the notifications bar and gnome control center, and never come back even with hours of waiting. This is a definite downside and worsening compared to Quectel stock, where for me the modem will similarly die e.g. after suspend multiple times a day but only very rarely (maybe once every 1-2 weeks) ever not come back a minute or two later.

2023-07-39-dmesg-oss-modem-resume.txt

Alaraajavamma commented 1 year ago

I did have the same problem with PP/pmos/Phosh/edge but I tried to enable all recommended udev settings and it did the trick. Before the changes I did get maybe 2-6 hours reliable modem and after changes I have now three days without zero issues (zero dropdowns and I get all calls and sms because I can monitor them trough my carrier network interface also)

ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ATTR{power/control}="on" ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ATTR{power/persist}="1" ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ATTR{avoid_reset_quirk}="0"

ell1e commented 1 year ago

Is this a postmarketOS packaging bug then? Should those rules be used by everyone? I wonder what the "persist" does, wouldn't that effectively disable the modem from suspending, is that actually a good thing to do?

I still wonder if at the very least eg25-manager should be taught to detect this state, and manually cycle the modem again after some waiting time for safety. Because then this would go from effectively stranding an uninformed user entirely and requiring them to reboot the device to merely an odd brief unavailability of the modem that resolves itself. That would be a lot more newbie friendly, even if there still happens to be a problem on the udev rules side that should be addressed by the distribution, or possibly some other bug on the firmware side, or who knows.