pine64-pinephone: eg25-manager does not actually recover the modem when it dies
tl;dr: PinePhone users: Does eg25-manager automatically recovery the modem for you? Please post a comment.
Describe your issue
When the PinePhone modem dies for any reason (*), eg25-manager is supposed to automatically recover it. I think it even used to do it successfully at some point in the past. But at least for the last six months it hasn't been doing that on my phone. I have had to manually service eg25-manager restart
to bring the modem back.
What I have done instead is add a udev rule that runs service eg25-manager restart
when the modem USB device disconnects. This has been working 100% reliably for me for the last three months, as in I have observed the modem gone when the phone wakes up from suspend and then a minute later it comes back as eg25-manager finishes restarting. The udev rule is:
# 99-restart-eg25-manager.rules
SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}="2c7c/125/318", RUN+="/sbin/rc-service eg25-manager restart"
(udev shouldn't be used for spawning long-lasting processes, but both OpenRC rc-service start
and systemd systemctl start
will parent the service to the service manager and themselves exit, so that's fine. They do take a few seconds during which udev is blocked and can't process other events, which udev also recommends against, but in this case it's not a big deal IMO.)
Does eg25-manager automatically recovery the modem for any other PinePhone users? If not, and if no one has a better idea, then I will add this rule to device-pine64-pinephone
.
(*): For my phone, the common triggers for it dying are:
-
When the phone wakes up from suspend.
-
When an incoming call is disconnected, especially if the disconnect happens very quickly after the call started, which is what happens when phosh-antispam identifies it as spam.
-
When plugging or unplugging from USB power, and plugging or unplugging other USB devices like keyboards from connected dock.
What device are you using?
pine64-pinephone, 1.2b
On what postmarketOS version did you encounter the issue?
-
edge (
master
branch) -
v23.12
-
v23.06
(supported until 2024-01-18) -
I confirm that the issue still is present after running
sudo apk upgrade -a
On what environment did you encounter the issue?
Environments
- GNOME Shell on Mobile
- Phosh
- Plasma Mobile
-
Sxmo (Wayland/Sway) Please post the output of
sxmo_version.sh
- Other: Please fill out
How did you get postmarketOS image?
- from https://images.postmarketos.org
- I built it using pmbootstrap
- It was preinstalled on my device
Additional information
eg25-manager remains running when the modem disconnects and logs nothing.