I would love for the lid closing behavior to "suspend" for a certain amount of time (1 or 2 hours) and then "hibernate" to save battery. Is there a way to change the settings of "suspend" so that it go into "hibernate" after some time?
Thank you!
I would love for the lid closing behavior to "suspend" for a certain amount of time (1 or 2 hours) and then "hibernate" to save battery. Is there a way to change the settings of "suspend" so that it go into "hibernate" after some time?
Thank you!
To start using this function you need to create a file /etc/systemd/sleep.conf with the next content:
Then you can test it by command:
(you can edit HibernateDelaySec to reduce delay to hibernate). If all works fine you can change Lid Close Action, to do it you need to edit the file /etc/systemd/logind.conf
You need to find option HandleLidSwitch=, uncomment it and change to HandleLidSwitch=suspend-then-hibernate. Then you need to restart logind service(wirning! you user session will be restarted) by the next command:
Thats all! Now you can use this nice function.