Skip to main content
Topic: Need help with s2idle (Read 164 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Need help with s2idle

I have problems running suspend on my laptop, so I have been looking at alternatives. It seems that there are two userspace options available: s2idle and standby.

Standby is easy, it is not available on my pc:
Code: [Select]
$ cat /sys/power/state
freeze mem disk

Suspend-to-Idle (s2idle, freeze) seems promising. So I can run s2idle by writing 'freeze' directly to /sys/power/state:
Code: [Select]
$ echo freeze | sudo tee /sys/power/state
freeze
The second method is to write 's2idle' to /sys/power/mem_sleep and then to write 'mem' to /sys/power/state.

However to get elogind (loginctl) to run s2idle on suspend I will need to edit elogind.conf
There is an artix edit already at /etc/elogind/sleep.conf.d/50-artix.conf:
Code: [Select]
$ cat 50-artix.conf 
[Sleep]
SuspendMode=deep s2idle
According to the man page this will try writing 'deep' to /sys/power/disk and if that fails then it will try 's2idle'
However /sys/power/disk does not recognise these options:
Code: [Select]
$ cat /sys/power/disk
platform shutdown reboot [suspend] test_resume
Again according to the man page SuspendState lists the string to be written to /sys/power/state so I would have expected:
Code: [Select]
SuspendState=mem freeze
assuming that /sys/power/mem_sleep is set to 'deep', which it is:
Code: [Select]
$ cat /sys/power/mem_sleep 
s2idle [deep]

So, I am not understanding something. Can someone tell me where I have gone wrong?

Sources:
https://www.kernel.org/doc/html/v4.18/admin-guide/pm/sleep-states.html
man 5 sleep.conf

Artix: Linux acer 6.10.6-artix1-1 #1 SMP PREEMPT_DYNAMIC Tue, 20 Aug 2024 02:43:37 +0000 x86_64 GNU/Linux