Suspend/sleep not working

Hi there Garuda staff and members,

I’m a total noob here, after only a few days of installing Dr460nized KDE on my old desktop PC (see specs below).
When I tried the live USB suspend/sleep seemed to work pretty well, and so it did for a day or two. After that, maybe for sume update, suspend seems to be broken.
I updated all the updatable (I think, with the System Update Assistant), but my suspend just won’t work anymore. :unamused: Keyboard and mouse stay lights on, monitor goes black for a while and then goes back to login screen. Or, more rarely, it seems to suspend and then never wake the monitor up.

After a suspend fail I rebooted and logged the journal here, as suggested by a kind Garuda Telegram channel member: https://termbin.com/uqfv
You can find my garuda-inxi info below.

Thanks for your help in advance!

Ezahn

System:
Kernel: 6.5.9-zen2-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
clocksource: tsc available: hpet,acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=1930b164-e875-487b-9e15-d08dfb606021 rw rootflags=subvol=@
quiet quiet rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
ibt=off
Desktop: KDE Plasma v: 5.27.9 tk: Qt v: 5.15.11 wm: kwin_x11 vt: 2
dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop Mobo: ASRock model: P67 Extreme4 serial: <superuser required>
BIOS: American Megatrends v: P3.10 date: 04/24/2012
Battery:
Device-1: hidpp_battery_0 model: Logitech G604 Wireless Gaming Mouse
serial: <filter> charge: 100% (should be ignored) rechargeable: yes
status: discharging
CPU:
Info: model: Intel Core i5-2500K bits: 64 type: MCP arch: Sandy Bridge
gen: core 2 level: v2 built: 2010-12 process: Intel 32nm family: 6
model-id: 0x2A (42) stepping: 7 microcode: 0x2F
Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB
desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB
desc: 1x6 MiB
Speed (MHz): avg: 1598 high: 1600 min/max: 1600/5900 scaling:
driver: intel_cpufreq governor: schedutil cores: 1: 1600 2: 1600 3: 1596
4: 1596 bogomips: 26339
Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Graphics:
Device-1: NVIDIA GM204 [GeForce GTX 970] vendor: ZOTAC driver: nvidia
v: 545.29.02 alternate: nouveau,nvidia_drm non-free: 545.xx+ status: current
(as of 2023-10; EOL~2026-12-xx) arch: Maxwell code: GMxxx
process: TSMC 28nm built: 2014-2019 pcie: gen: 2 speed: 5 GT/s lanes: 16
bus-ID: 01:00.0 chip-ID: 10de:13c2 class-ID: 0300
Display: x11 server: X.Org v: 21.1.9 with: Xwayland v: 23.2.2
compositor: kwin_x11 driver: X: loaded: modesetting,nvidia
alternate: fbdev,nouveau,nv,vesa gpu: nvidia display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 97 s-size: 503x283mm (19.80x11.14")
s-diag: 577mm (22.72")
Monitor-1: DP-1 size-res: N/A modes: N/A
Monitor-2: DVI-I-1 pos: primary res: 1920x1080 dpi: 96
size: 510x287mm (20.08x11.3") diag: 585mm (23.04") modes: N/A
Monitor-3: None-1-1 size-res: N/A modes: N/A
API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
drv: swrast gbm: drv: nvidia surfaceless: drv: nvidia x11: drv: nvidia
inactive: wayland,device-1
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 545.29.02
glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce GTX 970/PCIe/SSE2
memory: 3.91 GiB
API: Vulkan v: 1.3.269 layers: 5 device: 0 type: discrete-gpu
name: NVIDIA GeForce GTX 970 driver: nvidia v: 545.29.02
device-ID: 10de:13c2 surfaces: xcb,xlib
Audio:
Device-1: Intel 6 Series/C200 Series Family High Definition Audio
vendor: ASRock 6 driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
chip-ID: 8086:1c20 class-ID: 0403
Device-2: NVIDIA GM204 High Definition Audio vendor: ZOTAC
driver: snd_hda_intel v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 16
bus-ID: 01:00.1 chip-ID: 10de:0fbb class-ID: 0403
Device-3: Logitech G430 Surround Sound Gaming Headset
driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
lanes: 1 mode: 1.1 bus-ID: 2-1.2:4 chip-ID: 046d:0a4d class-ID: 0300
Device-4: M-Audio AIR 192 6 driver: snd-usb-audio type: USB rev: 2.0
speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-2.3:4 chip-ID: 0763:410c
class-ID: fe01
API: ALSA v: k6.5.9-zen2-1-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: PipeWire v: 0.3.84 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: ASRock driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
port: b000 bus-ID: 0c:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: enp12s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) driver: btusb
v: 0.8 type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-1.6:4
chip-ID: 0a12:0001 class-ID: e001
Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 4.0
lmp-v: 6 status: discoverable: no pairing: no class-ID: 1c0104
Drives:
Local Storage: total: 2.85 TiB used: 586.28 GiB (20.1%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 1TB
size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
tech: SSD serial: <filter> fw-rev: 3B6Q scheme: MBR
ID-2: /dev/sdb maj-min: 8:16 vendor: Crucial model: M4-CT128M4SSD2
size: 119.24 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
tech: SSD serial: <filter> fw-rev: 070H scheme: MBR
ID-3: /dev/sdc maj-min: 8:32 vendor: Seagate model: ST2000DX001-1NS164
size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 3.0 Gb/s
tech: HDD rpm: 7200 serial: <filter> fw-rev: CC41 scheme: MBR
ID-4: /dev/sdd maj-min: 8:48 vendor: Generic model: Flash Disk
size: 3.73 GiB block-size: physical: 512 B logical: 512 B type: USB rev: 2.0
spd: 480 Mb/s lanes: 1 mode: 2.0 tech: SSD serial: <filter> fw-rev: 8.07
scheme: GPT
SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
ID-1: / raw-size: 50 GiB size: 46.57 GiB (93.13%) used: 16.35 GiB (35.1%)
fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-2: /home raw-size: 431.51 GiB size: 431.51 GiB (100.00%)
used: 148.23 GiB (34.4%) fs: btrfs dev: /dev/sda3 maj-min: 8:3
ID-3: /var/log raw-size: 50 GiB size: 46.57 GiB (93.13%)
used: 16.35 GiB (35.1%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-4: /var/tmp raw-size: 50 GiB size: 46.57 GiB (93.13%)
used: 16.35 GiB (35.1%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 15.58 GiB used: 0 KiB (0.0%) priority: 100
comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 4 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 38.0 C mobo: N/A gpu: nvidia temp: 36 C
Fan Speeds (rpm): N/A gpu: nvidia fan: 32%
Info:
Processes: 221 Uptime: 15m wakeups: 0 Memory: total: 16 GiB
available: 15.58 GiB used: 3.24 GiB (20.8%) Init: systemd v: 254
default: graphical tool: systemctl Compilers: gcc: 13.2.1 clang: 16.0.6
Packages: pm: pacman pkgs: 1421 libs: 444 tools: octopi,paru Shell: fish
v: 3.6.1 default: Bash v: 5.2.15 running-in: konsole inxi: 3.3.31
Garuda (2.6.17-1):
System install date:     2023-10-26
Last full system update: 2023-11-07 ↻
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut nvidia-dkms
Windows dual boot:       <superuser required>
Failed units:            systemd-suspend.service

Hey Ezahn thanks for reporting on forum. I looked through the journal logs and sadly it’s only filled with onedriver and telegram-desktop error messages.

It also seems that your suspend service has failed as you reported. Can you do a,

journalctl -u systemd-suspend | tb

and post the link. No need to intentionally crash your system this time. :wink:

Edit,
Sorry just noticed but

You neither have resume kernel parameter here

Nor a swap partition here. I am surprised that suspend was working before.

Please make a swap partition following archwiki and use it’s UUID for resume parameter. If you had created a swap partition while installing garuda then can you please post the output of,

lsblk -f
4 Likes

Hi NaN and thanks for replying.

As soon as I will be with the system again (home desktop ^^) Ì will try the route you suggested.
I did not create a Swap partition, only Root and Home, since I did not create it before when installing Fedora on my laptop and susped worked fine. I supposed - erroneously, it seems - that the Swap partition was a thing of the past.
I’ll check the wiki and I hope I’ll be able to manage it.

What do you mean by “use its UUID for resume parameter”?
Sorry to ask basic/silly questions, but I really am a noob, not joking there. :wink:

I meant it quite literally create swap and then use

lsblk -f

To get swap’s UUID as can be seen here,

NAME        FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
zram0                                                                              [SWAP]
nvme0n1
├─nvme0n1p1 vfat   FAT32       C49B-DE4E                             298.8M     0% /boot/efi
├─nvme0n1p2 btrfs              6a7bcee6-f3ae-4c03-b6b0-7cb27fb4c8d4  260.4G    43% /var/tmp
│                                                                                  /root
│                                                                                  /var/cache
│                                                                                  /var/log
│                                                                                  /srv
│                                                                                  /home
│                                                                                  /
└─nvme0n1p3 swap   1     swap  1b9b6f2d-a19b-4eee-b2bf-6af31dfdf566                [SWAP]

Once you have the UUID (1b9b6f2d-a19b-4eee-b2bf-6af31dfdf566 in my case). Go to garuda boot options and in the field kernel parameters append this

resume=UUID=<UUID-of-swap-partition>

eg, for me this would be,

resume=UUID=1b9b6f2d-a19b-4eee-b2bf-6af31dfdf566

to the start of the kernel parameters string. once done click apply. It will regenerate grub.cfg.

Sure, take your time. :+1:

Here from kernel.org,

resume=         [SWSUSP]
                        Specify the partition device for software suspend
                        Format:
                        {/dev/<dev> | PARTUUID=<uuid> | <int>:<int> | <hex>}

In case you wanna read more about the various kernel command line parameters that we use → The kernel's command-line parameters — The Linux Kernel documentation

3 Likes

Thank you again, you’re being really clear and helpful. :slightly_smiling_face:
Having 16 Gb of RAM is it ok to create a 16 Gb Swap? The wiki seems to indicate so, at least if I read it correctly.

Yes it is.

3 Likes

The ‘swish’ says you haven’t rebooteed since your last update. Sometimes KDE does not want to cooperate unless you do.

3 Likes

I created the swap partition using the Linux Swap filesystem. Applied the kernel parameter in Garuda Boot Options as you wrote.
Unfortunately all went wrong - or I committed a capital crime - and now the system is no longer booting. :face_holding_back_tears:
I tried starting in recovery mode from GRUB but it throws me there as well.
Don’t really know what to do now…

@Ezahn it sounds like you decided to set up a swap partition (as opposed to a swap file), is that right? Did you activate the new swap device with swapon?

Grab the USB stick you used to install and boot to the live environment, then mount the system disk and show the contents of /etc/fstab. A swap device should be added like this:

UUID=*device_UUID* none swap defaults 0 0

Double-check it says “none” for the mount point.

Just to clarify something: a swap file or swap partition is needed for enabling hibernation, not suspend. They are two different power management states: Power management/Suspend and hibernate - ArchWiki

Hibernation is typically set up on a laptop so you can shut the lid and stick it in your bag or whatever, then when you open it up later the session you had can be restored. Since you have a desktop computer, hibernation is considerably less useful. You can still set it up if you want to, but it is not relevant for solving your original issue.

6 Likes

Hmm :thinking: I thought the s3sleep state (the default sleep state for mostly everyone) suspends to disk doesn’t it? Unless we are passing the acpi_sleep= param to explicitly tell the kernel to use s2sleep and thus stopping it from using the s3sleep state. Sorry if I am mistaken.

Yes, it is right: swap partition. I did Not activate it with swapon… How should I do it? (from the emergency command line, the only thing I can reach now).
Tried to follow your instructions in live usb, see img below for etc/fstab results (but I’m pretty sure the swap partition, sda4, is formatted as Linux Swap, not btrfs… see second image)

And, more importantly: since the system is not booting anymore is there something I can do that is not formatting and reinstalling from scratch? :cry:


S3 is power-on suspend, the mobo is in a lower-power state but still active.

i actually lock my mobo to S3 only to prevent a hibernation file from using up 24gb of space due to my small (120gb) primary ssd size.

Don’t worry nothing is lost. You just need to chroot into your system using live USB and do the swapon. To chroot,

garuda-chroot -a

Should do it but incase it fails (happens when you have ventoy on your usb) you can follow the steps to manually chroot. → How to chroot Garuda Linux this post goes on to reinstall grub you don’t need to do that.

If you so wish you can just remove the fstab entry for swap and everything will go back to normal.

Please remember to do everything from within this chroot terminal only then the changes you make will be reflected in your actual system and not the liveusb.

Moving on if the fstab file info has been taken from the chrooted terminal then yes your fstab file has quite a few errors.

Notably the top 2 lines Nuova partizione ... /etc/fstab : ... have you written this yourself there? Remove them, then the actual swap partition on the last line.

here is my fstab file for comparision,

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=C49B-DE4E                            /boot/efi      vfat    umask=0077 0 2
UUID=6a7bcee6-f3ae-4c03-b6b0-7cb27fb4c8d4 /              btrfs   subvol=/@,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=6a7bcee6-f3ae-4c03-b6b0-7cb27fb4c8d4 /home          btrfs   subvol=/@home,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=6a7bcee6-f3ae-4c03-b6b0-7cb27fb4c8d4 /root          btrfs   subvol=/@root,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=6a7bcee6-f3ae-4c03-b6b0-7cb27fb4c8d4 /srv           btrfs   subvol=/@srv,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=6a7bcee6-f3ae-4c03-b6b0-7cb27fb4c8d4 /var/cache     btrfs   subvol=/@cache,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=6a7bcee6-f3ae-4c03-b6b0-7cb27fb4c8d4 /var/log       btrfs   subvol=/@log,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=6a7bcee6-f3ae-4c03-b6b0-7cb27fb4c8d4 /var/tmp       btrfs   subvol=/@tmp,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=1b9b6f2d-a19b-4eee-b2bf-6af31dfdf566 swap           swap    defaults,noatime 0 0
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

as you can see the swap partition has swap not btrfs fstype. Its mounted at swap not /swap. Using /dev/sda4 is fine but please correct the rest. you can follow my fstab as an example and just replace the UUID with your swap partition’s UUID that can be obtained with

lsblk -f
2 Likes

Thank you! It seems it worked: I managed to reboot the system.
I corrected the faulty lines (I don’t know how those first two lines got there…) using nano - luckily I remembered nano existed. ^^
But I could not have the UUID from lsblk -f: no UUID was shown. So I manually corrected mount point and file system, then saved, leaving /dev/sda4 instead of the UUID.

I don’t know if my swap will be working (do I need to do something using the swapon command?) but at least I could have my system back, and for that I’m very grateful for all your help! :slight_smile:

By the way, if I just type “swapon” in the terminal, I get this now:

NAME       TYPE       SIZE USED PRIO
/dev/zram0 partition 15,6G   0B  100
/dev/sda4  partition 16,6G   0B   -2

And this below is the disk partions as shown in KDE:

That’s fine. It looks about right. Can you check if you still can’t see swap’s UUID with

lsblk -fa

now that you are in your system?
If you can get it’s UUID then, following the above post → Suspend/sleep not working - #4 by NaN add it to resume parameter for your kernel if you can’t get it’s UUID then,

resume=/dev/sda4

should work as well. Although bluishHumility mentioned you don’t need swap for suspend it seems a little wasteful to not use it now that you have created it.

Once done reboot and see if anything changes? If you still face suspend related issues do a,

journalctl -u systemd-suspend | tb

I got the UUID now:

NAME   FSTYPE FSVER LABEL                    UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1 ntfs         EzaEvo                   01DA05C8ED0C5F20
├─sda2 btrfs                                 1930b164-e875-487b-9e15-d08dfb606021                /var/log
├─sda3 btrfs                                 6b4364ec-6139-4161-9610-5b41251c9ce5  264,9G    36% /home
└─sda4 swap   1                              290da5e7-6510-4b46-9fa1-14463cba09cf                [SWAP]
sdb
├─sdb1 ntfs         Riservato per il sistema AAFC1184FC114C47
├─sdb2 ntfs                                  409E1EEA9E1ED86C
└─sdb3 ntfs                                  201CA01A1C9FE954
sdc
└─sdc1 ntfs         EzaHybrid                28DE583CDE58050A
sr0
zram0                                                                                            [SWAP]

To append the resume info in the Garud Boot Options kernel I should just paste the text using the correct UUID at the end of the line, right?
If so, I think the UUID was already correct and for now the suspend does not work, exactly as before. :-/
I’ll try a few reboots…

If you mean this,

resume=UUID=290da5e7-6510-4b46-9fa1-14463cba09cf

then yes,

By the end of the line do you mean after this # Modified by garuda-migrations: ? if you have placed your resume param after this then it’s getting commented out and not used. Also you can check garuda-inxi and see if your resume param shows up there.

If all is in order please,

1 Like

if you want to use the normal sleep function - power-on suspend (suspend to RAM) - then set your BIOS power saving sleep option to ‘S3’.

s4 is hibernation/suspend to disk - you do not need this in a desktop unless your area has a bad power grid, as s3 needs power to resume and not end up with your machine rebooting due to a power grid outage.

s5 is a hybrid of s3 and s4 which uses hibernation as a backup to s3 in case of battery depletion in laptops.

2 Likes

Ehm… I guess I got it commented out, sorry. Now I cut and pasted the resume line before the # part, so the final part of my kernel parameters are like this:

ibt=off resume=UUID=290da5e7-6510-4b46-9fa1-14463cba09cf # Modified by garuda-migrations: splash 

In garuda.inxi I now see this:

Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 15.58 GiB used: 0 KiB (0.0%) priority: 100
comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 4 dev: /dev/zram0
ID-2: swap-2 type: partition size: 16.6 GiB used: 0 KiB (0.0%)

Yep, I still have suspend problems. Same as before.
This is the journalctl output: https://termbin.com/fofkn

I’ll now check if the BIOS have the option to S3 suspend like suggested by Michael_joseph (thank you! :slight_smile: )

1 Like