Garuda fails to Sleep to RAM

I have the disk automatically configured by the installer. I chose not to have SWAP as this is and SSD disk and ZRAM is anyway enabled. I want to be able to sleep the PC to RAM.
I tried with the default kernel-zen and also with kernel-lts (version is 5.4).
I suspect some driver is not able to unload. The same issue exists with other distros (Ubuntu, MX) but it works fine on some, e.g. Solus, Fedora 33.
What happens is the monitor is shut off, I hear the DVD is also off, but the PC itself keeps running and I need to eventually shut it down by holding the power button for a few seconds.
Please, help me debug the issue and make the PC properly Sleep!

Which driver? Why do you suspect this?

3 Likes

Because I went through this guide and the PC hangs on step 2 (Devices).
And there is no more detail on the guide for me to go and find which device fails to shut.

Step 2 specifically tells you how to find out which drivers prevented suspend... ?

1 Like

Nope, it just tells me the problem lies with "some" or "more" devices. But is not specific, how to find the device. I have no such expertise myself. That is why I am asking here, in the forum.
Here's what it says:

If the “devices” test fails, most likely there is a driver that cannot suspend or resume its device (in the latter case the system may hang or become unstable after the test, so please take that into consideration). To find this driver, you can carry out a binary search according to the rules:

  • if the test fails, unload a half of the drivers currently loaded and repeat (that would probably involve rebooting the system, so always note what drivers have been loaded before the test),
  • if the test succeeds, load a half of the drivers you have unloaded most recently and repeat.

Once you have found the failing driver (there can be more than just one of them), you have to unload it every time before hibernation.

Not even this part?

1 Like
sudo mount -t debugfs none /sys/kernel/debug
[sudo] Passwort für sgs:    
mount: /sys/kernel/debug: none ist bereits auf /sys/fs/bpf eingehängt.
❯ sudo cat /sys/kernel/debug/suspend_stats
success: 0
fail: 0
failed_freeze: 0
failed_prepare: 0
failed_suspend: 0
failed_suspend_late: 0
failed_suspend_noirq: 0
failed_resume: 0
failed_resume_early: 0
failed_resume_noirq: 0
failures:
  last_failed_dev:	
			
  last_failed_errno:	0
			0
  last_failed_step:	

1 Like

OK, but as I said, I do not have the expertise. I am missing something:

mount -t debugfs none /sys/kernel/debug
mount: /sys/kernel/debug: none already mounted on /sys/fs/bpf.
[root@pc me]# cat /sys/fs/bpf/suspend_stats
cat: /sys/fs/bpf/suspend_stats: No such file or directory
[root@pc me]# cat /sys/kernel/debug/suspend_stats
success: 0
fail: 0
failed_freeze: 0
failed_prepare: 0
failed_suspend: 0
failed_suspend_late: 0
failed_suspend_noirq: 0
failed_resume: 0
failed_resume_early: 0
failed_resume_noirq: 0
failures:
last_failed_dev:

last_failed_errno: 0
0
last_failed_step:

According to that output there are no devices preventing suspend.

2 Likes

OK, first, based on the mount command errorr, I am not sure the output in suspend_stats is correct.
Even if it is, then how do I debug the failing Sleep?

Do you know how to use modprobe -r <driver> or rmmod <driver>. Test unloading various drivers prior to suspending.

I would test deactivating your wifi and bluetooth first before suspending. Also try disabling your compositor prior to suspending as well.

2 Likes

Yes, i know how to modprobe. I will try those two.
How do I deactivate compositor?

OK, I have unloaded the wifi driver. I don't have Bluetooth on this PC.
Suspend to RAM failed again.

I also tried with disabled compositor. Same result. Now what?

systemctl suspend

You are trying with this command right?

Please post your system specs, perhaps I can find some less generic advice:

inxi -Fxxxza

Also, if you set your system up for hibernation, sometimes hibernation works when suspend doesn't. I know it's not as convenient as suspending, but it is a little better then your present situation.

Have you used suspension without issues on other distro's?

Is your bios up to date?

Have you tried setting different suspend states in your bios?

Have you chechecked dmesg to see if any drivers are not loading properly at boot?

That might be a device such as a MMC card reader that rarely gets used. Try rmmoding your MMC driver before a suspend attempt.

Also, be sure all USB periphetal devices you may use are all disconnected from the USB ports before attempting to suspend.

Please try to answer all my questions.

3 Likes
    inxi -Fxxxza
    System: Kernel: 5.4.77-1-lts x86_64 bits: 64 compiler: gcc v: 10.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-lts root=UUID=e1f18013-613e-4f49-875c-b912ea1d7f3b rw
    rootflags=subvol=@ quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    systemd.unified_cgroup_hierarchy=1 loglevel=3
    Desktop: KDE Plasma 5.20.3 tk: Qt 5.15.1 info: latte-dock wm: kwin_x11 dm: SDDM Distro: Garuda Linux
    Machine: Type: Desktop System: Dell product: Dell XPS430 v: N/A serial: Chassis: type: 7 serial:
    Mobo: Dell model: 0G254H v: A00 serial: BIOS: Dell v: A01 date: 02/20/2009
    CPU: Info: Quad Core model: Intel Core2 Quad Q8400 bits: 64 type: MCP arch: Penryn family: 6 model-id: 17 (23)
    stepping: A (10) microcode: A0B L2 cache: 2048 KiB
    flags: lm nx pae sse sse2 sse3 sse4_1 ssse3 vmx bogomips: 21280
    Speed: 2621 MHz min/max: 2000/2667 MHz Core speeds (MHz): 1: 2023 2: 2056 3: 1995 4: 1995
    Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages
    Type: l1tf mitigation: PTE Inversion; VMX: EPT disabled
    Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
    Type: meltdown mitigation: PTI
    Type: spec_store_bypass status: Vulnerable
    Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
    Type: spectre_v2 mitigation: Full generic retpoline, STIBP: disabled, RSB filling
    Type: srbds status: Not affected
    Type: tsx_async_abort status: Not affected
    Graphics: Device-1: NVIDIA GT218 [GeForce 210] vendor: Gigabyte driver: nouveau v: kernel bus ID: 01:00.0 chip ID: 10de:0a65
    Display: x11 server: X.Org 1.20.9 compositor: kwin_x11 driver: modesetting unloaded: fbdev,vesa
    alternate: nouveau,nv display ID: :0 screens: 1
    Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9")
    Monitor-1: HDMI-1 res: 1920x1080 hz: 60 dpi: 92 size: 531x299mm (20.9x11.8") diag: 609mm (24")
    OpenGL: renderer: NVA8 v: 3.3 Mesa 20.2.2 direct render: Yes
    Audio: Device-1: Intel 82801I HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:293e
    Device-2: NVIDIA High Definition Audio vendor: Gigabyte driver: snd_hda_intel v: kernel bus ID: 01:00.1
    chip ID: 10de:0be3
    Sound Server: ALSA v: k5.4.77-1-lts
    Network: Device-1: Intel 82566DC-2 Gigabit Network vendor: Dell driver: e1000e v: 3.2.6-k port: eca0 bus ID: 00:19.0
    chip ID: 8086:294c
    IF: enp0s25 state: up speed: 100 Mbps duplex: full mac:
    Device-2: Qualcomm Atheros AR5416 Wireless Network Adapter [AR5008 802.11bgn]
    vendor: D-Link System DWA-547 802.11n RangeBooster N 650 driver: ath9k v: kernel port: dc80 bus ID: 07:04.0
    chip ID: 168c:0023
    IF: wlp7s4 state: down mac:
    Drives: Local Storage: total: 1.02 TiB used: 18.28 GiB (1.7%)
    SMART Message: Unable to run smartctl. Root privileges required.
    ID-1: /dev/sda vendor: Intel model: SSDSC2BW120A4 size: 111.79 GiB block size: physical: 512 B logical: 512 B
    speed: 3.0 Gb/s serial: rev: DC32 scheme: MBR
    ID-2: /dev/sdb vendor: Hitachi model: HDS721010CLA332 size: 931.51 GiB block size: physical: 512 B logical: 512 B
    speed: 3.0 Gb/s rotation: 7200 rpm serial: rev: A3EA scheme: MBR
    ID-3: /dev/sdc type: USB vendor: Generic model: Flash Disk size: 3.91 GiB block size: physical: 512 B
    logical: 512 B serial: rev: 8.07 scheme: MBR
    SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
    Partition: ID-1: / raw size: 111.79 GiB size: 111.79 GiB (100.00%) used: 18.28 GiB (16.3%) fs: btrfs dev: /dev/sda1
    ID-2: /home raw size: 111.79 GiB size: 111.79 GiB (100.00%) used: 18.28 GiB (16.3%) fs: btrfs dev: /dev/sda1
    ID-3: /var/log raw size: 111.79 GiB size: 111.79 GiB (100.00%) used: 18.28 GiB (16.3%) fs: btrfs dev: /dev/sda1
    ID-4: /var/tmp raw size: 111.79 GiB size: 111.79 GiB (100.00%) used: 18.28 GiB (16.3%) fs: btrfs dev: /dev/sda1
    Swap: Kernel: swappiness: 10 (default 60) cache pressure: 75 (default 100)
    ID-1: swap-1 type: zram size: 744.8 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram0
    ID-2: swap-2 type: zram size: 744.8 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram1
    ID-3: swap-3 type: zram size: 744.8 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram2
    ID-4: swap-4 type: zram size: 744.8 MiB used: 0 KiB (0.0%) priority: 32767 dev: /dev/zram3
    Sensors: System Temperatures: cpu: 37.0 C mobo: N/A gpu: nouveau temp: 55.0 C
    Fan Speeds (RPM): N/A
    Info: Processes: 221 Uptime: 10m Memory: 11.64 GiB used: 2.08 GiB (17.9%) Init: systemd v: 246 Compilers: gcc: 10.2.0
    Packages: pacman: 1807 lib: 505 flatpak: 0 Shell: Zsh v: 5.8 running in: yakuake inxi: 3.1.06

Please use three ~ in first and last line from terminal output.

Why would I be using a command? :slight_smile: No, I am with KDE, and I use the Leave -> Sleep from the menu. But I have tried with systemctl suspend. It acts the same

Yes, I have. Suspend works perfectly in Solus and Fedora. The PC suspends in a few seconds and then It wakes up properly for 5-6 seconds after I press the Power button.
Here, when the suspension fails, I can wait for a long time, like 15 or 20 minutes, I am not precise here. The PC does stop after some time. But after I switch it on, it is unresponsive and only shows snowflakes on the screen. I must restart with a long press on the power button.

Yes. Version A01 that was published in 3/26/2009, is the latest BIOS version for the XPS 430.