Slackware 14.2 - how to suspend when closing the lid on the laptop?
how to suspend when closing the lid on the laptop? As of now nothing happens at all, the computer is still on.
|
I use KDE, there it 'just works'
you might want to fine adjust KDE settings in system settings, power management there you can define you actions what happens if you close the laptop lid. |
Ok i'm using i3 window manager, so maybe i need todo something to get it to work.
|
Hi. Just create file /etc/acpi/events/lid
Code:
event=button/lid (LID) |
You can also add "pm-suspend" and "pm-hibernate" to you sudoers configuration and execute suspend/hibernate from a terminal window. I do not run i3wm, but this method works well in Fluxbox.
Code:
xlock & sleep 5 ; sudo pm-suspend Code:
xlock & sleep 5 ; sudo pm-hibernate If you have an encrypted hard drive, there is no need for the "xlock & sleep5" portion since a password is required when resuming the OS from a hibernate. It still applies though if you are running "pm-suspend." |
imitis: Thank you! that solved my problem, now when i close the lid it goes to suspend mode :)
|
Quote:
|
ewlabonte,
I use pm-suspend. You might have a look at my solution here: https://www.linuxquestions.org/quest...6/#post5587173 I think you might need not only a "lid close" but a "lid open" script as well. Obviously my solution is different, but you might be able to edit things to suit your use case. HTH |
Thank you, that was it.
event=button/lid LID close action=/usr/sbin/pm-hibernate works. Thanks for your response. |
All times are GMT -5. The time now is 01:29 AM. |