Suspend and hibernate

Hi everyone, I need help regarding hibernation and suspension of a laptop using clearlinux. As of right now, it hangs every time I close the lid. How can I debug this and ideally enable suspend?

Thank you.

Hibernation support is disabled by default. Clear Linux will use suspend instead by default if you close the lid.

man logind.conf explains how you can influence what happens on a lid switch event. For more info, read that (Convenient online link: https://www.freedesktop.org/software/systemd/man/logind.conf.html )

Thank you!

It seems I am plagued with a bug.

Journal ctl ends abrubptly:

18:34:13 wire systemd-sleep[1301]: Suspending system...
18:34:13 wire kernel: PM: suspend entry (deep)

Looks like the same problem as in here, which was solved with blacklisting nvidiafb .

  • But /etc/modprobe.d does not exist in my system, how do I blacklist a kernel module?

CL do not create defaults files in /etc that is part of stateless

Just simply create the missing files and directories and it will work.

1 Like

So I have been trying to figure out how to configure SUSPEND for the last week, to no avail. I will leave this here, so if anyone come across it and finds what I am missing, he/she can suggest something, as I am currently out of ideas.

My logind.conf:

luis@clr-3cff7be552b547d98e66420ee475658e ~ $ cat /etc/systemd/logind.conf
# /etc/systemd/logind.conf

[Login]
HandleLidSwitch=suspend
#HandleLidSwitch=ignore
#HandleLidSwitchExternalPower=suspend
HandleLidSwitchExternalPower=ignore

My sleep.conf:

#/etc/systemd/sleep.conf

# Settings for systemd how to hibernate and suspend.
# For more detailed info see
# - man systemd-sleep.conf
# - linux docs
# - - read them by running: cat /usr/lib/modules/$(uname -r)/build/Documentation/power/{swsusp{,-dmcrypt,-and-swap-files},userland-swsusp}.txt | less
# - - list all related documents: find /usr/lib/modules/$(uname -r)/build/Documentation/ -iname '*susp*'

# *Mode setting writes its value to /sys/power/disk
# *State setting writes its value to /sys/power/state


# Every configuration is under this "Sleep" -section.
[Sleep]

# Setting for suspend -action
SuspendState=freeze
SuspendMode=suspend

# Settings for hibernate -action
# Mode can be: suspend, platform, shutdown, reboot, test, testproc
# Which the three last ones are for testing (I think) 
HibernateMode=platform shutdown test
HibernateState=disk

# And finally settings for hybrid-sleep -action
HybridSleepMode=suspend platform
HybridSleepState=disk

But still, when I run systemctl sleep:

luis@clr-3cff7be552b547d98e66420ee475658e ~ $ systemctl suspend
Failed to suspend system via logind: Sleep verb "suspend" not supported
  • Ideas are welcome.

cat /sys/power/state should show you what the kernel supports.

Ref.: https://www.kernel.org/doc/Documentation/power/states.txt

Thank you @ahkok for the answer, it supports:

┌─[luis][][~]
└─λ sudo cat /sys/power/state
Senha: 
freeze mem

I started over, deleted the files for logind and now the behaviour is a bit distinct. It now hangs for some time and returns upon keypress. Fans continually working. journalctl now shows a distinct response:

jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e NetworkManager[435]: <info>  [1560379180.8677] device (wlp2s0): state change: activated -> failed (reason 'ssid-not-found', sys-iface-state: 'managed')
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e rtkit-daemon[1034]: Demoting known real-time threads.
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e systemd-sleep[2332]: Failed to suspend system. System resumed again: Device or resource busy
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e rtkit-daemon[1034]: Successfully demoted thread 1031 of process 1031 (/usr/bin/pulseaudio).
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e systemd[1]: systemd-suspend.service: Main process exited, code=exited, status=1/FAILURE
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e rtkit-daemon[1034]: Demoted 1 threads.
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e systemd[1]: systemd-suspend.service: Failed with result 'exit-code'.
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e dbus-daemon[432]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.1' (uid=0 pid=435 comm="/usr/bin/NetworkManager --no-daemon ")
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e systemd[1]: Failed to start Suspend.
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e dbus-daemon[432]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e systemd[1]: Dependency failed for Suspend.
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e nm-dispatcher[2362]: req:1 'down' [wlp2s0]: new request (1 scripts)
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e nm-dispatcher[2362]: req:1 'down' [wlp2s0]: start running ordered scripts...
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e systemd[1]: Stopped target Sleep.
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e nm-dispatcher[2362]: req:2 'connectivity-change': new request (1 scripts)
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e systemd-logind[416]: Operation 'sleep' finished.
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e nm-dispatcher[2362]: req:2 'connectivity-change': start running ordered scripts...
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e gnome-shell[959]: An active wireless connection, in infrastructure mode, involves no access point?
jun 12 19:39:40 clr-3cff7be552b547d98e66420ee475658e gnome-shell[959]: An active wireless connection, in infrastructure mode, involves no access point?

It seems the sleep target does not call anything, do not follow up with the order to suspend. The error is that it fails with result dependency.