F35 Not waking up/booting after suspend

I have intermittent problems with my computer not waking up after auto suspend.
After power off and on, the reboot hangs indefinitely.

Fedora Linux 35.20211212.0 (Silverblue)
Power setting: Automatic suspend/power saver/dim screen on. Power mode - balanced.
GNOME version: 41.2
Windowing system: Wayland

HW: Intel® Celeron(R) N4000 CPU @ 1.10GHz × 2,
Mesa Intel® UHD Graphics 600 (GLK 2)

Workaround:
USB Boot - select troubleshooting and ‘rescue a Fedora system’.
Issue summary (initial output) on-screen is below.
Soft lock-up
systemd-udevd:1306
(…long lines - I’m not proficient to extract GRUB/related logs.)

$ systemctl status systemd-resolved.service - this does not show relevant information.

Rebooted and works now.

This happens every other month. Can you advise what might be the cause?

Thanks. H.

1 Like

Soft lockup CPU stuck two days in a row.
A different message spitted out - systemd-udevd: 1315

Hi, could you give the result of cat /sys/power/mem_sleep, cat /sys/power/state and sudo grubby --info=ALL?

Rescued again yesterday and this is the result after I log into i3 windows manager.

$ cat /sys/power/mem_sleep
s2idle [deep]

$ cat /sys/power/state
freeze mem disk

$ sudo grubby --info=ALL

index=0
kernel="/boot/ostree/fedora-2ea58f767f05b6809c110399ff6382ca165ea2b5083653cc2df5c1832598af89/vmlinuz-5.15.7-200.fc35.x86_64"
args=“rhgb quiet rootflags=subvol=root ostree=/ostree/boot.0/fedora/2ea58f767f05b6809c110399ff6382ca165ea2b5083653cc2df5c1832598af89/0”
root=“UUID=9d855212-d42f-4bfa-8775-6b1c78d25ead”
initrd="/boot/ostree/fedora-2ea58f767f05b6809c110399ff6382ca165ea2b5083653cc2df5c1832598af89/initramfs-5.15.7-200.fc35.x86_64.img"
title=“Fedora Linux 35.20211215.0 (Silverblue) (ostree:0)”
id=“ostree-2-fedora”
index=1
kernel="/boot/ostree/fedora-1a775c3cc7cb7e5c04a3dcddc48fd4454bb2e45327b4c428c6da35e6978fae2c/vmlinuz-5.15.6-200.fc35.x86_64"
args=“rhgb quiet rootflags=subvol=root ostree=/ostree/boot.0/fedora/1a775c3cc7cb7e5c04a3dcddc48fd4454bb2e45327b4c428c6da35e6978fae2c/0”
root=“UUID=9d855212-d42f-4bfa-8775-6b1c78d25ead”
initrd="/boot/ostree/fedora-1a775c3cc7cb7e5c04a3dcddc48fd4454bb2e45327b4c428c6da35e6978fae2c/initramfs-5.15.6-200.fc35.x86_64.img"
title=“Fedora Linux 35.20211212.0 (Silverblue) (ostree:1)”
id=“ostree-1-fedora”

I believe the disk state should not be there. It’s only there if you enable the hibernate or sleep then hibernate. By default I believe Fedora didn’t enable the hibernate. Also if we’re using default partition layout, the physical swap will not present and Fedora only using zram generator as swap.

Maybe when your system go to sleep after a while if there no trigger to wake up it will go to hibernate state. Since by default there’s no physical swap, when it’s wake up it failed to load saved session.

Could you give the result of cat /etc/systemd/sleep.conf and lsblk?

1 Like

Much appreciated for finding the cause.
I recall automatic partition was used in the Fedora Media Writer when I first installed F34.

$ cat /etc/systemd/sleep.conf

[Sleep]
#AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
#SuspendMode=
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=180min

$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
mmcblk0 179:0 0 58.2G 0 disk
├─mmcblk0p1 179:1 0 1G 0 part /boot
└─mmcblk0p2 179:2 0 57.2G 0 part /var/home
/var
/usr
/
/sysroot
mmcblk0boot0
179:8 0 4M 1 disk
mmcblk0boot1
179:16 0 4M 1 disk
zram0 252:0 0 3.6G 0 disk [SWAP]

Your sleep.conf look ok. Other things we can check are systemctl status hibernate.target and systemctl status hybrid-sleep.target. Both of them should be inactive.

i logged into GNOME 41.2 when the problem started. Here is the output in GNOME.

$ systemctl status hibernate.target
○ hibernate.target - System Hibernation
Loaded: loaded (/usr/lib/systemd/system/hibernate.target; static)
Active: inactive (dead)
Docs: man:systemd.special(7)

$ systemctl status hybrid-sleep.target
○ hybrid-sleep.target - Hybrid Suspend+Hibernate
Loaded: loaded (/usr/lib/systemd/system/hybrid-sleep.target; static)
Active: inactive (dead)
Docs: man:systemd.special(7)

I put it computer into hibernate several times in GNOME and it wakes up okay.

No, above only checking the status. I believe it will not resolve your problem. I mark it as unresolve again.

You need to run sudo systemctl mask hibernate.target hybrid-sleep.target and then enable secure boot on your BIOS to prevent any app on your system using disk state in /sys/power/state.

Then just use it as usual. If after some days the problem didn’t comeback, please back again to mark it as resolve.

Ok, I ran sudo systemctl mask hibernate.target hybrid-sleep.target, but after I select secure boot in BIOS, the computer does not boot. I recall when I remove Windows partitions, the legacy boot was left there.

Referring to the guide in F35 Not waking up/booting after suspend - #9 by hankuoffroad

I ran

# ls -l /boot/efi/EFI/fedora

ls: cannot access ‘/boot/efi/EFI/fedora/.’: No such file or directory

I see. You could disable the secure boot then. Hopefully by masking only hibernate.target and hybrid-sleep.target are enough to prevent any apps to activate hibernate or hybrid-sleep by altering the disk state in your /sys/power/state.

Let see for some times. Hopefully the problem gone.

Update:

Maybe if you want, you could also change /etc/systemd/sleep.conf.

[Sleep]
#AllowSuspend=yes
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
#SuspendMode=
....
```

The system is okay for two weeks since the update.

Running Fedora 35 with latest kernel 5.15, Wayland and Gnome 41.2. All commands suggested above (cat /sys/power/mem_sleep, cat /sys/power/mem_sleep, sudo grubby --info=ALL) result in same results.

Followed all above steps:

  • secure boot on (no problem with laptop not being able to boot)
  • run “sudo systemctl mask hibernate.target hybrid-sleep.target”
  • edited “/etc/systemd/sleep.conf” as suggested above

Suspend still does not work.

Temporary solution for me is to downgrade kernel to 5.14.10. Only doing this makes Suspend to work every time.

Back to previous state - not waking up after suspend.
Will sosreport logs be of any help to diagnose?

Yes please. What kind of hardware is it? Are this NUC with monitor connected via HDMI?

It is a laptop without an external monitor attached.
Never sent the sos report before.
How can I send it securely? There are two files (one tar, the other checksum file).

I’m sorry, I though it’s error report that you found and just copy and paste it here. I don’t understand then about sos report you mention.

I suggest you create a bug report to https://bugzilla.redhat.com/ specific to kernel.

Meanwhile, if you are using Gnome, you can use Gnome extension Caffeine to disable suspend.

I enabled Caffeine to disable suspend.
I realize the difference between hibernate and suspend in a way the system manages swap.

I use a low memory (4GB) laptop.

I ran
/sbin/zramctl

Step 1. The system has been running for a few days without a restart.
I have lots of browser tabs open and other apps running in the background (DejaDup).
It shows a 2.9:1 ratio of ZRAM compression (Data 1.7G / Compression 587M). The compression ratio is close to the range of 2:1.

NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle 3.6G 1.7G 587M 614.7M 2 [SWAP]

Step 2. After a restart
Data 4K / Compression 80B

I’ll watch it from time to time and close the browser tabs when finished working.
I withheld creating a bug report.

https://fedoraproject.org/wiki/Changes/Scale_ZRAM_to_full_memory_size#How_To_Test

1 Like

:thinking: Maybe let say your computer failed to waking up, the next boot (if you end up with hard reseting) you could save the journal with journalctl -b -1 > journal.txt (-b -1 option for previous boot and -b 0 for current boot). Then post the journal to pastebin.com and share the link here. Maybe someone can help.

2 Likes