You are not logged in.
So my laptop hangs when going into hibernating (Lenovo x120e). The page on it in the Arch Wiki says to get around this, in pm-utils I would have to set the following at
/etc/pm/config.d/hibernate_modeHIBERNATE_MODE="shutdown"However, this article is a little outdated, and the cool new thing is to use systemd to handle all this. Unfortunately though, I'm having trouble finding exactly what exactly would be the equivalent to this.
My first guess would be a service file that specifically tells the computer to power-off after initiating hibernate, but I'm not sure.
Anyone have any insight on this?
Offline
Not clear above, have you actually tried 'systemctl hibernate', and if so, what was the result?
Offline
You can configure the actions for suspend, hibernate and hybrid-sleep using /etc/systemd/sleep.conf, see systemd-sleep.conf (5) for details.
The defaults are (taken from code):
* suspend:
... no mode
... state: try mem then standby then freeze
* hibernate:
... mode: try platform then shutdown
... state: disk
* hybrid-sleep:
... mode: try suspend then platform then shutdown
... state: disk
source:
http://cgit.freedesktop.org/systemd/sys … p-config.c
explanations for state and mode:
https://www.kernel.org/doc/Documentatio … states.txt
https://www.kernel.org/doc/Documentatio … swsusp.txt
PS: If you want to use uswsusp or tuxonice, you'll have to create a custom executable similar to systemd-sleep, then disable e.g. the systemd-hibernate.service and replace it with a service that calls your custom handler instead.
Last edited by progandy (2013-08-24 00:59:25)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Not clear above, have you actually tried 'systemctl hibernate', and if so, what was the result?
Oh right of course, yes, what I've described is what happens when I run
systemctl hibernateAnd thanks progandy, I'll look into what you've posted and update the wiki article once I've figured it out.
Offline
Im not sure what your question is Ownaginatious.. are you saying systemctl hibernate doesnt shut off?
and or you want to write a new service cant tell...maybe systemctl hybrid-sleep or systemctl suspend will fill your needs
end ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'the machine is not the end to the means., we are. In history, in board rooms and politic the greatest decision and effort
evolves from passion, lust for life, and a common sense of humanity. Never forget what you are and why'. -me
Offline
Im not sure what your question is Ownaginatious.. are you saying systemctl hibernate doesnt shut off?
and or you want to write a new service cant tell...maybe systemctl hybrid-sleep or systemctl suspend will fill your needs
Sorry, I should have been more specific. My laptop in particular (Lenovo x120e) has a known issue where when hibernating under Linux, it enters the "hibernating process", in which the screen turns off, but the computer itself doesn't turn off. I guess it gets stuck somewhere. Forcing it off isn't good enough either; the hibernation image gets corrupted.
The way around it is that setting for pm-utils I mentioned above, but since pm-utils is kind of obsolete with systemd around, I was wondering how to setup something similar with systemd.
Last edited by Ownaginatious (2013-08-25 23:45:07)
Offline
I ran into the same problem with a new computer today. In case you are still wondering, write the following to /etc/systemd/sleep.conf
[Sleep]
HibernateState=disk
HibernateMode=shutdownYou can checkout its meaning in systemd-sleep.conf man page
Offline