Status of Suspend for Librem 5

No, unfortunately not. :confused:
I tried to search around but I never really found a clue how to do something about it.
I’m happy to know if anyone have a clue where these are configured/generated.

1 Like

I think the L5 is waking up from suspend with system notifications. I’ve noticed it come out with Signal desktop notifications anyways. Anyone else notice?

No, I haven’t. Just with SMS and phone calls.

Odd. Maybe it was coincidental timing being triggered by a button press in my pocket or something.

That and wishful thinking :laughing:

2 Likes

…and MMS and Alarm will. And more…
Purism :wink:

1 Like

I Dust Off my Librem 5 Yesterday para Probar, and i noticed Que the Modem doesn’t go into Suspend Mode.

1 Like

@dos one bug I’ve been encountering with suspend specifically on the Librem 5, is that after coming out of suspend, often my LUKS encrypted microSD card cannot be read/written to. It is set up to decrypt automatically using the mechanism provided in the Disks application. It says there is an input/output error, and when I try to navigate to it via files, no files appear under the microSD in the file explorer. For the flatpaks I have installed on it, I always need to restart my phone twice for them to appear in the desktop menu of apps again for some reason, rather than just once.

I tried doing a swap test into the Librem 14, and it doesn’t encounter this issue with suspend. MicroSD card is known good, recently purchased official SanDisk high performance 1 GB card. Being able to have more space is important to be able to use it for a daily driver. If there are any logs I can provide, please let me know how to do so. Appreciate all the efforts you and the rest of the team at Purism have, and continue to put into this device.

1 Like

Not just you: Sdcard becomes read-only after waking up from suspend

From that link, there is an Issue to follow.

Note that, according to that topic, this is not unique to using encryption on the uSD card.

5 Likes

I do use my L5 as daily driver with enabled suspend to 2 minutes idle time on battery and 2 hours on AC. From “time to time” (say once a day) I face the problem that the L5 does not work correctly after coming back from suspend, mostly when the AC is plugged into the suspended phone, or when it is disconnected from AC and it was in suspend after 2h.

does not work correctly means:

  • the lock screen comes up
  • phone can be unlocked
  • terminal app echoes chars but no command starts and Ctrl-C has no visible effect
  • upper bar can be pulled down, but changing Wifi has no reaction
  • reboot or power of dims the display, but does not shutdown the phone

Only long press on power button and an additional press bring it fully back to life.

Btw: Are the any suspend hook scripts to log the entry to suspend and it return to a file with something like echo bla bla bla >> ~purism/suspend.log?

1 Like

Maybe this would work: Power management - ArchWiki

2 Likes

This sounds similar to what I described here. Seems to mostly happen while connecting the L5 to an external dock. Must be software related as I have the exact same behaviour on both of my L5’s.

I managed to catch the attached journalctl log this morning, but I couldn’t do dmesg as every sudo command in the terminal is blocked.

jan 23 08:56:26 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:56:26 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:56:26 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:56:26 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:08 pureos phoc[806]: [libinput] event9  - SIPODEV USB Composite Device: client bug: event processing lagging behind by 14ms, your system is too slow
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 08:57:44 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 08:58:16 pureos phoc[806]: [libinput] event9  - SIPODEV USB Composite Device: client bug: event processing lagging behind by 14ms, your system is too slow
jan 23 08:58:31 pureos org.gnome.Geary[2283]: *[wrn] 08:58:31.0816 Geary.Imap: [account_02] [imap] [closed:INBOX selected RW] GearyImapClientSession: Keepalive error: ---- noop: Disconnected
jan 23 08:58:43 pureos phoc[806]: [libinput] event9  - SIPODEV USB Composite Device: client bug: event processing lagging behind by 15ms, your system is too slow
jan 23 08:59:34 pureos phoc[806]: [libinput] event9  - SIPODEV USB Composite Device: client bug: event processing lagging behind by 15ms, your system is too slow
jan 23 08:59:34 pureos phoc[806]: [libinput] event9  - SIPODEV USB Composite Device: WARNING: log rate limit exceeded (5 msgs per 60min). Discarding future messages.
jan 23 09:00:00 pureos kernel: usb 3-1: USB disconnect, device number 2
jan 23 09:00:01 pureos kernel: usb 3-1.1: USB disconnect, device number 3
jan 23 09:00:01 pureos kernel: [drm] hpd irq
jan 23 09:00:01 pureos kernel: xhci-hcd xhci-hcd.5.auto: remove, state 4
jan 23 09:00:01 pureos kernel: usb usb4: USB disconnect, device number 1
jan 23 09:00:01 pureos kernel: tps6598x 0-003f: The interrupt is masked , how did it fire ?? 380100a
jan 23 09:00:01 pureos kernel: bq25890-charger 3-006a: Upstream supply changed: 0.
jan 23 09:00:01 pureos kernel: bq25890-charger 3-006a: Disabling OTG_EN pin
jan 23 09:00:01 pureos kernel: xhci-hcd xhci-hcd.5.auto: USB bus 4 deregistered
jan 23 09:00:01 pureos kernel: xhci-hcd xhci-hcd.5.auto: remove, state 1
jan 23 09:00:01 pureos kernel: usb usb3: USB disconnect, device number 1
jan 23 09:00:01 pureos kernel: bq25890-charger 3-006a: Upstream supply changed: 0.
jan 23 09:00:01 pureos kernel: bq25890-charger 3-006a: Disabling OTG_EN pin
jan 23 09:00:01 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 09:00:01 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 09:00:01 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 09:00:01 pureos phoc[806]: [types/output/cursor.c:223] Failed to get cursor display formats
jan 23 09:00:01 pureos phoc[806]: [types/output/cursor.c:269] Failed to pick cursor format
jan 23 09:00:01 pureos phoc[806]: [types/output/cursor.c:354] Failed to render cursor buffer
jan 23 09:00:01 pureos kernel: [drm] Connector status: 0
jan 23 09:00:01 pureos kernel: [drm] HDMI/DP Cable Plug Out
jan 23 09:00:01 pureos phoc[806]: invalid unclassed pointer in cast to 'PhocOutput'
jan 23 09:00:01 pureos kernel: [drm] Connector status: 0
jan 23 09:00:01 pureos kernel: usb 3-1.2: USB disconnect, device number 4
jan 23 09:00:01 pureos gsd-xsettings[1251]: Failed to get current UI legacy scaling factor
jan 23 09:00:01 pureos gsd-xsettings[1251]: Failed to get current UI legacy scaling factor
jan 23 09:00:01 pureos sm.puri.OSK0.desktop[1391]: Debug: Tried file "/home/purism/.local/share/squeekboard/keyboards/terminal/se.yaml", but it's missing: Filen eller katalogen finns inte (os error 2)
jan 23 09:00:01 pureos sm.puri.OSK0.desktop[1391]: Warning: Failed to load layout from Resource: terminal/se: Missing resource, skipping
jan 23 09:00:01 pureos sm.puri.OSK0.desktop[1391]: Debug: Tried file "/home/purism/.local/share/squeekboard/keyboards/terminal/us.yaml", but it's missing: Filen eller katalogen finns inte (os error 2)
jan 23 09:00:01 pureos phoc[806]: [libseat] [libseat/backend/logind.c:148] Could not close device: Device not taken
jan 23 09:00:01 pureos phoc[806]: [backend/session/session.c:357] Failed to close device 109: Resursen tillf?lligt otillg?nglig
jan 23 09:00:01 pureos sm.puri.OSK0.desktop[1391]: Info: Loaded layout Resource: terminal/us
jan 23 09:00:01 pureos kernel: xhci-hcd xhci-hcd.5.auto: USB bus 3 deregistered
jan 23 09:00:01 pureos kernel: bq25890-charger 3-006a: Upstream supply changed: 0.
jan 23 09:00:01 pureos kernel: bq25890-charger 3-006a: Disabling OTG_EN pin
jan 23 09:00:01 pureos gsd-color[1215]: unable to get EDID for xrandr-DSI-1: unable to get EDID for output
jan 23 09:00:01 pureos phoc[806]: [libseat] [libseat/backend/logind.c:148] Could not close device: Device not taken
jan 23 09:00:01 pureos phoc[806]: [backend/session/session.c:357] Failed to close device 114: Lyckat
jan 23 09:00:02 pureos pulseaudio[854]: ALSA väckte oss för att skriva ny data till enheten, men det fanns inget att skriva.
jan 23 09:00:02 pureos pulseaudio[854]: Förmodligen är detta ett fel i ALSA-drivrutinen ”snd_soc_simple_card”. Vänligen rapportera detta problem till ALSA-utvecklarna.
jan 23 09:00:02 pureos pulseaudio[854]: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
jan 23 09:00:29 pureos systemd[818]: Started Run MMSmonitor.

I will try to catch more next time it happens.

Edit: sudo being blocked means no response from any sudo command and have to force kill the terminal.

1 Like

Interesting. Just tried suspend from indicator menu while connected to Nexdock 360. Couldn’t wake it properly from suspend. I heard the charger sound when reconnecting it, but L5 screen wouldn’t wake up at all. Had to do 4 sec power button press and then restart.

2 Likes

I will list and do an ongoing update of the list here in this comment; maybe this helps in two directions:

  1. if there is a pattern;
  2. show the urgency of the issue

UPDATE: The pattern seems to be the USB-C plugin/out of an AC or laptop. If I wake-up the L5 with the power-button, it comes from suspend fine.

# egrep -a 'Booting |Suspending sys' /var/log/syslog | grep -a -B1 Booting
Jan 23 06:06:41 pureos systemd-sleep[30448]: Suspending system...
Jan 23 07:02:02 pureos kernel: [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]   (after disconnect AC) 
--
Jan 24 00:52:15 pureos systemd-sleep[6334]: Suspending system...
Jan 24 05:52:19 pureos kernel: [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]   (after disconnect AC)
--
Jan 24 11:33:39 pureos systemd-sleep[4103]: Suspending system...
Jan 24 12:14:00 pureos kernel: [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]   (after plugin USB-C to laptop)
--
Jan 25 06:04:56 pureos systemd-sleep[7411]: Suspending system...
Jan 25 06:44:56 pureos kernel: [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]   (on plugin USB-C to tether)
--
Jan 26 06:19:27 pureos systemd-sleep[6717]: Suspending system...
Jan 26 06:34:20 pureos kernel: [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]   (on plugin USB-C to tether)
--
Jan 26 08:39:25 pureos systemd-sleep[3576]: Suspending system...
Jan 26 09:40:19 pureos kernel: [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]   (on plug-in USB-C to tether)
2 Likes

After waking the phone overnight WWAN modem shows connected 4G but it is not and no data or internet is available. Toggling mobile data does not help. Toggling modem HKS brings it back.

Does anybody know of a script that will force reset/ restart modem on wake from suspend or resume when it detects loss of internet connection programmatically (phone suspended, user pushes power button, or suspend off phone hasnt been used in hours?

I have the newest modem firmware installed and up to date Librem 5 linux kernel.

Steps to repeat:

  1. disable suspend when plugged into power and charging
  2. confirm modem is on and mobile data works browsing a couple of websites
  3. use power button to turn off screen
  4. over night wait 8 hours
  5. turn screen on with power button and unlock phone
  6. try to browse websites

Observe it is not connected.

1 Like

Probably same issue behaviour.

1 Like

fixed the description as this happens even with suspend turned off. Suspend probably triggers this to happen just more frequently.

2 Likes

I’ve filed an issue now for this: Return from suspend locks the OS (#349) · Issues · Librem5 / OS-issues · GitLab

1 Like

There is but like you noticed Pure OS is not always aware when the connection is stale or hollow. For this reason I just made a script that I manually call to restart the modem. I’m at work but when I get home I’ll look at the contents of this and let you know.

1 Like

With this package installed you can at least see if the connection is lost: network-manager-config-connectivity-debian.

It would be cool if it could be connected to a script like this:

mmcli -m any --reset
service NetworkManager restart
sleep 30
echo 5000 > /sys/devices/platform/soc@0/38200000.usb/xhci-hcd.4.auto/usb1/1-1/1-1.2/power/autosuspend_delay_ms

Unfortunately, I do not know if this is possible.

Edit: maybe this package is even better: network-manager-config-connectivity-pureos/byzantium-updates.

1 Like

The script I am using contains these 2 lines. I call it modem.sh and call it using sudo sh modem.sh.

This restarts the modem and works usually the first time. Sometimes I’ll have to run it 2 or 3 times.

1 Like