Forum › Forums › Orphaned Posts › antiX-17 “Heather Heyer, Helen Keller” › Suspend on closing lid?
- This topic has 5 replies, 3 voices, and was last updated May 20-5:17 am by wean_irdeh.
-
AuthorPosts
-
May 18, 2018 at 11:09 am #10342Member
wean_irdeh
Right now after closing the lid, the laptop will be locked on opening the lid.
Is it possible to make the laptop suspend instead of lock it?
If possible also please post the command for suspend and lock the laptop
ThanksMay 18, 2018 at 6:50 pm #10343Memberwean_irdeh
::Ah I’ve found the command to suspend and lock the screen.
To suspend the laptop:pm-suspend
To lock the screen:xlock
But the question remain on how to suspend the laptop after closing the lid..May 19, 2018 at 7:07 am #10359Moderator
caprea
::This is what i did to make my laptop shutdown, when closing the lid.
Created a folder in etc/acpi called actions
mkdir -p /etc/acpi/actionsin this folder created a file called lid.sh
etc/acpi/actions/lid.sh
with the following script
#!/bin/bash echo "$1" | grep -q open /proc/acpi/button/lid/LID0/state && exit 0 sleep 2 /sbin/poweroff -fMade the script executable
chmod +x /etc/acpi/actions/lid.shThen I changed the file etc/acpi/events/lidbtn to this
# /etc/acpi/events/lidbtn # Called when the user closes or opens the lid #old #event=button[ /]lid #action=/etc/acpi/lid.sh #new event=button/lid action=/etc/acpi/actions/lid.sh %eRebooted.
To make your laptop suspend when closing the lid you have to change the last line from the script etc/acpi/actions/lid.sh
from /sbin/poweroff -f
to/usr/sbin/pm-suspendBUT I’m not sure, if this is the most expedient and easiest way to do this on antiX.
Maybe you wait for another suggestion, anyway for me it works.May 19, 2018 at 11:56 am #10363Member
isminaki
::I had the same question and found this:
https://antixlinux.com/forum-archive/laptop-suspend-solved-t5071.html
It works for me.
May 19, 2018 at 1:56 pm #10365Moderator
caprea
May 20, 2018 at 5:17 am #10373Memberwean_irdeh
::I had the same question and found this:
https://antixlinux.com/forum-archive/laptop-suspend-solved-t5071.html
It works for me.
Ah thanks, editing /etc/default/acpi-support and removing hash (#) from #LID_SLEEP=true works for me! I can even disable lock screen by adding hash (#) in LOCK_SCREEN=true
Thanks a lotAnd thanks to caprea for trying to help me
-
AuthorPosts
- You must be logged in to reply to this topic.