Score:1

Ubuntu 22.04.01 shuts down after closing lid

za flag

My Ubuntu 22.04.01 (dual booted along with windows on my HP laptop) keeps shutting down when I close the lid. I tried some ways of preventing this, like modifying the /etc/systemd/logind.conf file, checking power settings and using Tweaks. But none of them worked. My laptop still shuts down after closing the lid every time. Here is my config file just in case:

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#HandlePowerKey=poweroff
HandleSuspendKey=suspend
HandleHibernateKey=suspend
HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=suspend
#HandleRebootKey=reboot
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodesMax=400k
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192``````

Screenshot of Tweaks gnome general settings

Please help me guys!

us flag
have you run `systemctl restart systemd-logind.service` since you changed the configuration file? Although I guess if it restarts each time you close the lid so eventually it should work. Also what does `sudo systemctl hibernate` do? Does it send your laptop to sleep or just shut it down?
Goutham Vinjamuri avatar
za flag
@RobertLongson I just tried ```sudo systemctl hibernate``` . It shut down my laptop.
Goutham Vinjamuri avatar
za flag
@RobertLongson I went through the link you sent. I see references to a script sleep.sh in /etc/acpi/ . I wanted to see what that script does and checked /etc/acpi to realize that /etc/acpi doesn't contain a sleep.sh file! Do you think that's causing a problem or it's just somewhere else
ChanganAuto avatar
us flag
@RobertLongson "hibernate" is supposed to shut down. The OP is talking about suspension which is quite different.
I sit in a Tesla and translated this thread with Ai:

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.