I would like to understand what is wrong with my linux system (or hardware). Sometimes I lose my session when the system is suspended, instead, it restarts then instantly without restoring anything.
I managed to find out the following:
-
pm-suspend
: worked alwaysecho -n mem >/sys/power/state
(invoked bypm-suspend
): worked always
- suspension when closing the lid: works most of the time
- suspension after x minutes idling: does crash most of the time
systemctl suspend
does work sometimes, sometimes is crashes my session./lib/systemd/systemd-sleep suspend
, which is invoked bysystemctl suspend
(as it seems) works just as often as the command above
What's the difference between those commands/actions? why is pm-suspend reliable but the others are not? How can I get a verbose log?
Could someone explain me how sending the system into suspend mode works currently? I am on Ubuntu 21.10 but I guess a general explanation would be fine too.
I just need a hint to get started somewhere :)
-n
on echo. I also discovered I need to sleep for a couple seconds in order to avoid thinking I'm already awake. In case it may be of help to others, my implementation is here: https://github.com/JeffAbrahamson/dotfiles/blob/master/i3/i3/bin/i3-lock-suspend – jma Dec 26 '21 at 09:02