Modem gets disabled on every suspend
#3
Unfortunately, this is a well-known issue that has not been fixed yet. To mitigate this, I run the following shell script as a systemd service with root privileges:

Code:
#! /bin/sh is_modem_available() {         if [ -z "$(lsusb | grep "2c7c:0125")" ]; then                 return 1         fi         return 0 } is_data_available() {         if ! nmcli c show --active | grep -e internet -e gsm > /dev/null; then                 return 1         fi         return 0 } TRY=0 while :; do         if ! is_modem_available ; then                 TRY=$((TRY + 1))                 echo $(date) Restarting modem, $TRY try                 systemctl restart eg25-manager                 systemd-inhibit --what=sleep --why="Modem reset" sleep 60         elif [ $TRY -ne 0 ]; then                 echo $(date): Modem restarted successfully                 TRY=0         elif ! is_data_available; then                 echo $(date): Restarting mobile data                 systemd-inhibit --what=sleep --why="Restart mobile data" sleep 5                 nmcli c up internet         fi         sleep 5 done

This will restart the eg25-manager service if the modem disappears, as well as restarting mobile data connection if it drops. The latter issue seems to occur often during calls (at least, on my OG PP).

Remember to replace "internet" with whatever name is used by your APN.

I hope you find this useful!
  Reply


Messages In This Thread
Modem gets disabled on every suspend - by jojuma - 03-12-2023, 12:57 PM
RE: Modem gets disabled on every suspend - by xavi92 - 03-12-2023, 06:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Modem crashes worsening from daily to multiple times a day + sms delaysFor people car bacydentir85 2 4,253 02-03-2025, 01:34 PM
Last Post: biketool
  Can't complete update of manjaro: wwan0 stays disabled; no phone/text gilford 3 4,660 12-05-2024, 06:42 AM
Last Post: gilford
  Modem white list aular 7 7,482 02-13-2024, 04:35 PM
Last Post: aular
  qcell modem id aular 6 6,595 01-15-2024, 10:05 PM
Last Post: aular
  Temporary fix for Modem Not Coming Back on in SXMO Postmarketos Pinephone kebab 2 5,975 07-16-2023, 11:14 AM
Last Post: kebab
  Modem audio settings jack1 2 4,129 02-04-2023, 04:01 PM
Last Post: jack1
  Phone won't suspend, battery drains quickly nelstomlinson 12 17,221 04-05-2022, 06:11 AM
Last Post: Anna
  The modem switch affects the connection to battery? JohnDoe 2 5,476 03-30-2022, 12:02 AM
Last Post: JohnDoe
  Modem disabled, can't enable: Invalid transition pac 4 8,910 03-23-2022, 01:08 PM
Last Post: Firewave
Question Modem problems with the distros I tried UltraBlack_ 9 12,427 02-21-2022, 01:57 PM
Last Post: KNERD

Forum Jump:


Users browsing this thread: 1 Guest(s)