Score:1

How to configure lid close action as hibernate in Ubuntu 20.04?

cn flag

I want to configure my laptop (ASUS UX461UN) to go to hibernate when I close the lid. I tried 3 basic suggestions that I saw as a result of my research.

  1. Run command sudo -H gedit /etc/systemd/logind.conf and configure #HandleLidSwitch=suspend line for hibernate,
  2. Increase swap space,
  3. Disable secure boot.

None of these worked. Hibernate is an important feature for me, especially for keeping ongoing tasks. How do I get my laptop to go into hibernate mode when I close the lid? Is including this a big problem for Ubuntu? Since hibernate is totally removed after some versions.

SimpliFixed avatar
us flag
did you leave the # in front of HandleLidSwitch as listed above?
Salim Azak avatar
cn flag
I removed #, that's what I mean by configure.
Salim Azak avatar
cn flag
And of course replaced "suspend" with "hibernate".
Shivanshu avatar
cz flag
Did you restart the systemd login service. `sudo systemctl restart systemd-logind.service`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.