Unable to Suspend in Fedora 31

I have spent the last couple of months reading a variety of forum posts, installing different Fedora versions, and experimenting in an attempt to get suspend/resume to work properly on my laptop all without success. I finally decided that my best hope for resolving the issue was to work just on Fedora 31. However, I have been able to reproduce this same issue on Fedora 29, 30, 31, 32, Centos 7, Centos 8, Centos Stream, and Ubuntu. So bottom line is that I don’t think it is in any way distro related.

I have a Lenovo Ideapad 500-15ACZ and am running Fedora 31 Workstation w/ Gnome desktop.

The BIOS in the laptop is flashed to the most current version. There are no BIOS options to control power management.

The laptop does suspend and resume properly under Windows 10 so I do not believe that it is a hardware issue.

For a brief period of time I was running Fedora 28 and suspend / resume seemed to be working properly there. However when Fedora 28 hit end-of-life I decided to do a clean build with Fedora 29 and that’s when my issues started.

I am on currently on kernel 5.6.6-200 but I am able to reliably reproduce this issue on the 5.3.7 kernel which is initially installed from the downloaded live image.

uname -a

Linux lenovo-ideapad 5.6.6-200.fc31.x86_64 #1 SMP Tue Apr 21 15:34:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

This is an AMD A10 based system:

cat /proc/cpuinfo | grep ‘model name’ | sort -u

model name : AMD A10-8700P Radeon R6, 10 Compute Cores 4C+6G

All of my packages are up to date using dnf upgrade.

Here is my current boot commandline:

cat /proc/cmdline

BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.6.6-200.fc31.x86_64 root=UUID=9e6a52de-0ff1-49de-a5af-bbae2b868c2a ro resume=/dev/sda4 default_mem_sleep=deep amdgpu.dc=0 rhgb quiet

I have 8GB of physical RAM:

free -h

          total        used        free      shared  buff/cache   available

Mem: 7.3Gi 1.3Gi 4.6Gi 95Mi 1.4Gi 5.6Gi
Swap: 7.4Gi 0B 7.4Gi

And I have two swap partitions configured, one for normal use (/dev/sda3) sized the same as physical RAM:

swapon

NAME TYPE SIZE USED PRIO
/dev/sda3 partition 7.4G 0B -2

And a second swap partition (/dev/sda4) dedicated for use in suspend / hibernate / resume which is 2x physical RAM (following from fdisk partition listing):

Device Start End Sectors Size Type
/dev/sda4 108185600 143837183 35651584 17G Linux swap

Here is what I see in /sys/power/mem_sleep:

cat /sys/power/mem_sleep

s2idle [deep]

I have confirmed that I am using the AMDGPU kernel driver:

lspci -k | grep amd

Kernel driver in use: amdgpu
Kernel modules: amdgpu

I have added this line to dracut.conf:

add_dracutmodules+=“resume”

Also worth noting is that the same behavior occurs regardless of whether I boot into graphical.target or multi-user.target. So it doesn’t seem to be related to my desktop environment.

I have not yet tried booting into single-user mode to test this.

Despite all of this which I have pieced together from different posts and articles, my system fails to suspend every time. I run “sudo systemctl suspend” from the shell, the screen goes dark, and the system hangs such that a hard reset (hold power switch for 10 seconds) is necessary. I am unable to ssh to the laptop from another PC, it does not respond to ping, pressing the power key to resume does nothing, the num lock and caps lock indicator LEDs do not toggle when I press them, the system fan continues to spin, but nothing else happens.

Here is what is displayed from “journalctl -b -1 -r” when I boot the laptop back up and access it:

Apr 28 19:03:15 lenovo-ideapad systemd-sleep[2858]: Suspending system…
Apr 28 19:03:15 lenovo-ideapad systemd[1]: Starting Suspend…
Apr 28 19:03:15 lenovo-ideapad systemd[1]: Reached target Sleep.
Apr 28 19:03:14 lenovo-ideapad NetworkManager[824]: [1588118594.0914] manager: NetworkManager state is now ASLEEP
Apr 28 19:03:14 lenovo-ideapad NetworkManager[824]: [1588118594.0867] device (p2p-dev-wlp2s0): state change: disconnected -> unmanaged (reason ‘sleeping’, sys-iface-state: ‘managed’)
Apr 28 19:03:14 lenovo-ideapad audit[2843]: CRED_DISP pid=2843 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_localuser,pam_unix acct=“root” exe="/usr/bin/sudo" hostname=>
Apr 28 19:03:14 lenovo-ideapad audit[2843]: USER_END pid=2843 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,p>
Apr 28 19:03:14 lenovo-ideapad sudo[2843]: pam_unix(sudo:session): session closed for user root
Apr 28 19:03:14 lenovo-ideapad NetworkManager[824]: [1588118594.0693] device (enp1s0): state change: unavailable -> unmanaged (reason ‘sleeping’, sys-iface-state: ‘managed’)
Apr 28 19:03:14 lenovo-ideapad NetworkManager[824]: [1588118594.0680] manager: sleep: sleep requested (sleeping: no enabled: yes)
Apr 28 19:03:14 lenovo-ideapad audit[2843]: USER_START pid=2843 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,>
Apr 28 19:03:14 lenovo-ideapad sudo[2843]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 28 19:03:14 lenovo-ideapad audit[2843]: CRED_REFR pid=2843 uid=0 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_localuser,pam_unix acct=“root” exe="/usr/bin/sudo" hostname=>
Apr 28 19:03:14 lenovo-ideapad audit[2843]: USER_CMD pid=2843 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/[ubfuscated]" cmd=73797374656D63746C2073757370656E64 exe="/usr/bin/sudo" terminal>
Apr 28 19:03:14 lenovo-ideapad sudo[2843]: [obfuscated] : TTY=pts/0 ; PWD=/home/[obfuscated] ; USER=root ; COMMAND=/usr/bin/systemctl suspend

I have replaced my username with [obfuscated] where needed but otherwise that is the complete journal from the point at which I issue the suspend command to where the journal ends for that boot.

Seems that many many people have similar issues but I am yet to find a solution.

Can anyone assist or point me in the right direction?

   Try suspend in Live Session of Gentoo installation iso: if that works, then trouble is in some Kernel module (Gentoo’s iso are “spartan”; once i’d found that my ex-PC do power-off correctly without nouveau).

I created liveDVD for Gentoo (based on latest available multilib from 2016) and booted, then attempted to suspend using /usr/sbin/pm-suspend however nothing at all happens. Script simply returns 1 if I do “echo $?” following the run. Nothing in /var/log/messages other than the “sudo /usr/sbin/pm-suspend” and nothing in dmesg. I am thinking that maybe liveDVD for Gentoo does not support suspend at least with the supplied 4.5 kernel.

As another test I created liveUSB image for Fedora 28 (which I mentioned was previously working fine when installed). Booted into liveUSB without issue. This has kernel 4.16.3-301. Now if I run “sudo systemctl suspend” it works as expected. Here are the corresponding entries from journalctl:

Apr 29 22:58:37 localhost sudo[2403]: liveuser : TTY=pts/0 ; PWD=/home/liveuser ; USER=root ; COMMAND=/usr/bin/systemctl suspend
Apr 29 22:58:37 localhost audit[2403]: USER_CMD pid=2403 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/liveuser>
Apr 29 22:58:37 localhost audit[2403]: CRED_REFR pid=2403 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred granto>
Apr 29 22:58:37 localhost sudo[2403]: pam_systemd(sudo:session): Cannot create session: Already running in a session
Apr 29 22:58:37 localhost sudo[2403]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 29 22:58:37 localhost audit[2403]: USER_START pid=2403 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open >
Apr 29 22:58:37 localhost NetworkManager[1205]: [1588215517.4214] manager: sleep: sleep requested (sleeping: no enabled: yes)
Apr 29 22:58:37 localhost NetworkManager[1205]: [1588215517.4223] device (wlp2s0): state change: disconnected -> unmanaged (reason ‘sleeping’, sys-iface-stat>
Apr 29 22:58:37 localhost audit[2403]: USER_END pid=2403 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close g>
Apr 29 22:58:37 localhost sudo[2403]: pam_unix(sudo:session): session closed for user root
Apr 29 22:58:37 localhost audit[2403]: CRED_DISP pid=2403 uid=0 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred granto>
Apr 29 22:58:37 localhost NetworkManager[1205]: [1588215517.4271] device (wlp2s0): set-hw-addr: reset MAC address to B8:86:87:53:87:B3 (unmanage)
Apr 29 22:58:37 localhost wpa_supplicant[1388]: nl80211: deinit ifname=p2p-dev-wlp2s0 disabled_11b_rates=0
Apr 29 22:58:37 localhost NetworkManager[1205]: [1588215517.4393] manager: NetworkManager state is now ASLEEP
Apr 29 22:58:37 localhost wpa_supplicant[1388]: nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0
Apr 29 22:58:38 localhost systemd[1]: Reached target Sleep.
Apr 29 22:58:38 localhost systemd[1]: Starting Suspend…
Apr 29 22:58:38 localhost systemd-sleep[2413]: Suspending system…
Apr 29 22:58:38 localhost kernel: PM: suspend entry (deep)
Apr 29 22:58:38 localhost kernel: PM: Syncing filesystems … done.

Now press power button to resume and works as expected:

Apr 29 22:58:54 localhost kernel: Freezing user space processes … (elapsed 0.003 seconds) done.
Apr 29 22:58:54 localhost kernel: OOM killer disabled.
Apr 29 22:58:54 localhost kernel: Freezing remaining freezable tasks … (elapsed 0.002 seconds) done.
Apr 29 22:58:54 localhost kernel: Suspending console(s) (use no_console_suspend to debug)
Apr 29 22:58:54 localhost kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
Apr 29 22:58:54 localhost kernel: sd 0:0:0:0: [sda] Stopping disk
Apr 29 22:58:54 localhost kernel: PM: suspend devices took 0.213 seconds
Apr 29 22:58:54 localhost kernel: ACPI: EC: interrupt blocked
Apr 29 22:58:54 localhost kernel: ACPI: Preparing to enter system sleep state S3
Apr 29 22:58:54 localhost kernel: ACPI: EC: event blocked
Apr 29 22:58:54 localhost kernel: ACPI: EC: EC stopped
Apr 29 22:58:54 localhost kernel: PM: Saving platform NVS memory
Apr 29 22:58:54 localhost kernel: Disabling non-boot CPUs …
Apr 29 22:58:54 localhost kernel: smpboot: CPU 1 is now offline
Apr 29 22:58:54 localhost kernel: smpboot: CPU 2 is now offline
Apr 29 22:58:54 localhost kernel: smpboot: CPU 3 is now offline
Apr 29 22:58:54 localhost kernel: ACPI: Low-level resume complete
Apr 29 22:58:54 localhost kernel: ACPI: EC: EC started
Apr 29 22:58:54 localhost kernel: PM: Restoring platform NVS memory
Apr 29 22:58:54 localhost kernel: LVT offset 0 assigned for vector 0x400
Apr 29 22:58:54 localhost kernel: Enabling non-boot CPUs …
Apr 29 22:58:54 localhost kernel: x86: Booting SMP configuration:
Apr 29 22:58:54 localhost kernel: smpboot: Booting Node 0 Processor 1 APIC 0x11
Apr 29 22:58:54 localhost kernel: cache: parent cpu1 should not be sleeping
Apr 29 22:58:54 localhost kernel: microcode: CPU1: patch_level=0x06006110
Apr 29 22:58:54 localhost kernel: CPU1 is up
Apr 29 22:58:54 localhost kernel: smpboot: Booting Node 0 Processor 2 APIC 0x12
Apr 29 22:58:54 localhost kernel: cache: parent cpu2 should not be sleeping
Apr 29 22:58:54 localhost kernel: microcode: CPU2: patch_level=0x06006110
Apr 29 22:58:54 localhost kernel: CPU2 is up
Apr 29 22:58:54 localhost kernel: smpboot: Booting Node 0 Processor 3 APIC 0x13
Apr 29 22:58:54 localhost kernel: cache: parent cpu3 should not be sleeping
Apr 29 22:58:54 localhost kernel: microcode: CPU3: patch_level=0x06006110
Apr 29 22:58:54 localhost kernel: CPU3 is up
Apr 29 22:58:54 localhost kernel: ACPI: Waking up from system sleep state S3
Apr 29 22:58:54 localhost kernel: ACPI: EC: interrupt unblocked
Apr 29 22:58:54 localhost kernel: ACPI: EC: event unblocked
Apr 29 22:58:54 localhost kernel: [drm] PCIE GART of 1024M enabled (table at 0x000000F400040000).
Apr 29 22:58:54 localhost kernel: sd 0:0:0:0: [sda] Starting disk
Apr 29 22:58:54 localhost kernel: ACPI: button: The lid device is not compliant to SW_LID.
Apr 29 22:58:54 localhost kernel: r8169 0000:01:00.0 enp1s0: link down
Apr 29 22:58:54 localhost kernel: usb 1-1.3: reset high-speed USB device number 4 using ehci-pci
Apr 29 22:58:54 localhost kernel: usb 2-2: reset full-speed USB device number 4 using xhci_hcd
Apr 29 22:58:54 localhost kernel: usb 1-1.4: reset high-speed USB device number 5 using ehci-pci
Apr 29 22:58:54 localhost kernel: ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Apr 29 22:58:54 localhost kernel: ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Apr 29 22:58:54 localhost kernel: ata1.00: configured for UDMA/133
Apr 29 22:58:54 localhost kernel: ata2.00: configured for UDMA/100
Apr 29 22:58:54 localhost kernel: psmouse serio1: synaptics: queried max coordinates: x […5670], y […4794]
Apr 29 22:58:54 localhost kernel: psmouse serio1: synaptics: queried min coordinates: x [1314…], y [1098…]
Apr 29 22:58:54 localhost kernel: [drm] UVD initialized successfully.
Apr 29 22:58:54 localhost kernel: [drm] VCE initialized successfully.
Apr 29 22:58:54 localhost kernel: PM: resume devices took 2.535 seconds
Apr 29 22:58:54 localhost kernel: acpi LNXPOWER:05: Turning OFF
Apr 29 22:58:54 localhost kernel: OOM killer enabled.
Apr 29 22:58:54 localhost kernel: Restarting tasks … done.
Apr 29 22:58:54 localhost kernel: PM: suspend exit
Apr 29 22:58:54 localhost audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-suspend comm=“systemd>
Apr 29 22:58:54 localhost audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-suspend comm=“systemd”>
Apr 29 22:58:54 localhost bluetoothd[1047]: Endpoint unregistered: sender=:1.29 path=/MediaEndpoint/A2DPSource
Apr 29 22:58:54 localhost kernel: Bluetooth: hci0: using rampatch file: qca/rampatch_usb_00000200.bin
Apr 29 22:58:54 localhost kernel: Bluetooth: hci0: QCA: patch rome 0x200 build 0x299, firmware rome 0x200 build 0x111
Apr 29 22:58:54 localhost NetworkManager[1205]: [1588215534.5378] bluez5: NAP: removed interface B8:86:87:53:87:B4
Apr 29 22:58:54 localhost bluetoothd[1047]: Endpoint unregistered: sender=:1.29 path=/MediaEndpoint/A2DPSink
Apr 29 22:58:54 localhost systemd[1]: Starting Load/Save RF Kill Switch Status…
Apr 29 22:58:54 localhost dbus-daemon[1049]: [system] Rejected send message, 1 matched rules; type=“error”, sender=”:1.29" (uid=1000 pid=1351 comm="/usr/bin/pulseaud>
Apr 29 22:58:54 localhost systemd-sleep[2413]: System resumed.
Apr 29 22:58:54 localhost dbus-daemon[1049]: [system] Rejected send message, 1 matched rules; type=“error”, sender=":1.29" (uid=1000 pid=1351 comm="/usr/bin/pulseaud>
Apr 29 22:58:54 localhost systemd[1]: Started Suspend.
Apr 29 22:58:54 localhost dbus-daemon[1049]: [system] Rejected send message, 1 matched rules; type=“error”, sender=":1.29" (uid=1000 pid=1351 comm="/usr/bin/pulseaud>
Apr 29 22:58:54 localhost systemd[1]: sleep.target: Unit not needed anymore. Stopping.
Apr 29 22:58:54 localhost dbus-daemon[1049]: [system] Rejected send message, 1 matched rules; type=“error”, sender=":1.29" (uid=1000 pid=1351 comm="/usr/bin/pulseaud>
Apr 29 22:58:54 localhost systemd[1]: Stopped target Sleep.
Apr 29 22:58:54 localhost systemd[1]: Reached target Suspend.
Apr 29 22:58:54 localhost systemd[1]: suspend.target: Unit not needed anymore. Stopping.
Apr 29 22:58:54 localhost systemd[1]: Stopped target Suspend.
Apr 29 22:58:54 localhost systemd-logind[1058]: Operation ‘sleep’ finished.

Key packages for the Fedora 28 liveUSB:

Installed Packages
kernel.x86_64 4.16.3-301.fc28 @anaconda
kernel-core.x86_64 4.16.3-301.fc28 @anaconda
kernel-headers.x86_64 4.16.3-301.fc28 @anaconda
kernel-modules.x86_64 4.16.3-301.fc28 @anaconda
kernel-modules-extra.x86_64 4.16.3-301.fc28 @anaconda
systemd.x86_64 238-7.fc28.1 @anaconda
systemd-bootchart.x86_64 233-1.fc28 @koji-override-0
systemd-container.x86_64 238-7.fc28.1 @anaconda
systemd-libs.x86_64 238-7.fc28.1 @anaconda
systemd-pam.x86_64 238-7.fc28.1 @anaconda
systemd-udev.x86_64 238-7.fc28.1 @anaconda

I installed kernel-4.16.3-301 on my laptop and it boots fine. Left systemd alone at 243.8-1.

No change in behavior of “sudo systemctl suspend” - still hangs after screen goes dark just like under the newer kernel.

Suspect systemd but cannot confirm.

Attempted to install systemd using packages listed above from Fedora 28 but failed dependency checks and complained about protected packages. So I feel like that’s a non-starter.

Also tried downloading the source for systemd-238 from git and compile but after several hours of debugging the make I have given that up for now.

1 Like

Try to give … about 2 GiB more of Swap space than your ram. In your case, I would suggest 8 Gb + 2 Gb = about 10 Gb… because RAM is copied to swap before suspending to disk.

If you’re steel have the Gentoo iso: what do
cat /sys/power/state   prints?
If there is mem, you can try
echo mem > /sys/power/state   to test suspend-to-ram…  IDK about pm-stuff in Gentoo, and how it works : ).

Thanks - checked again and my swap partition specified in resume= commandline option (/dev/sda4) is already 17GB:

Device Start End Sectors Size Type
/dev/sda4 108185600 143837183 35651584 17G Linux swap

cat /proc/cmdline

BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.6.6-200.fc31.x86_64 root=UUID=9e6a52de-0ff1-49de-a5af-bbae2b868c2a ro resume=/dev/sda4 default_mem_sleep=deep amdgpu.dc=0 rhgb quiet

Maybe the following may help you:
https://www.kernel.org/doc/html/latest/power/basic-pm-debugging.html

@vits95 in Gentoo here is what I see:

kernel is 4.5.2
there is no systemd

cat /sys/power/state

–> this is an empty file

cat /sys/power/mem_sleep

–> this file does not exist

echo mem > /sys/power/state

–> write error: function not implemented

Checked System Settings…Power Management in GUI and found that there are no options to enable suspend or hibernate.

Under the Leave menu there is only log off, restart, and shut down.

I think that this is because power management is not implemented for Gentoo liveDVD.

I tested with Arch Linux liveUSB and this is what I found:

kernel version is 5.5.13
systemd version is 245…3-2

cat /sys/power/state

freeze mem disk

cat /sys/power/mem_sleep

s2idle [deep]

echo mem > /sys/power/state

–> suspends almost immediately but on wake just shows black screen with backlight activated. Must hard power-off to restart. No access to the running session via ssh and journal doesn’t persist through a restart of the liveUSB so no way to see what is in the journal or dmesg.

1 Like

@pauld thanks for the link. I’ve read through it and much of the information relates to SUSPEND-TO-DISK or HIBERNATE. For me I am having issues with SUSPEND-TO-RAM. Caps used to indicate names of functions, not yelling. :slight_smile:

The section on SUSPEND-TO-RAM references another tool called S2RAM which has been deprecated for quite some time. I tried to follow the documentation links but they seem to be dead ends.

Anyone have any other suggestions?

Any advice on reverting SYSTEMD to 238-7 which is the working version from Fedora 28?

Confirmed that the problem still exists with kernel 5.6.8-200 and most current Linux firmware packages.

Confirmed that problem still exists with Fedora 32 and kernel 5.6.13-300

Hi, it has nothing to do with none of the things mentioned above. IT’S A KERNEL PROBLEM. I’ve passed this problem for a long time. Resuming after suspend works ok but I always lost the keyboard when doing so (the keyboard turns unresponsive after resuming from suspend to RAM). I’ve tested on 5 laptops with ALL Linux distribuitons: Arch, Mint, Fedora, Ubuntu, KDE, Zorin, etc. And, to have the proof, installed Windows too on this computers, and guess what? EVERYTHING WORKED FLAWLESSLY, so, no hardware problem. Another proof is that i used Ubuntu Mate 16.04 and didn’t have this problem. One day the kernel have been updated: the problem appears. Sadly, there is no universal workaround or temporary fix, i’ve tried everything: kernel boot parameters, increasing swap memory, display, installing another kernel, keyboard, etc, NOTHING RESOLVED. You won’t face this problem on desktop (at least on the majority of them, cause they use external keyboard). For me, I discovered that on my personal laptop, when the computer is resuming, pressing the “CapsLock” key wakes the keyboard (don’t ask me why, I don’t know why this happens), I only know it functions and works very well, so I have fully functional resume/suspend PC. In my case was the keyboard, but trough all my “Linux using life” I’ve seen a lot of issues and people complaining about suspend/resume in all communities. It’s a kernel problem that appears a time ago and yet they didn’t fixed. So annoying