LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-05-2016, 10:52 PM   #1
ewlabonte
Member
 
Registered: Mar 2005
Distribution: Debian Stretch
Posts: 127

Rep: Reputation: 15
Hibernation on laptop lid close action.


I'm running pekwm window manager. I want hibernate the laptop when I close the lid. I googled and found a linuxquestions.org thread that gave instructions, which I followed. They were to create a file "/etc/acpi/events/lid" with the following content:

event=button/lid
action=/usr/sbin/pm-hibernate

Now when I close the lid, it does hibernate. But when I resume, the first time it will shut down again after a few seconds. I have to start it up a second time to get it to resume properly. It does resume to where I left it, but I have to start it twice. Does anyone know why it's doing this?
 
Old 09-05-2016, 10:58 PM   #2
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
ewlabonte,
I replied in the other thread:
Quote:
Originally Posted by STDOUBT View Post
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
 
1 members found this post helpful.
Old 09-05-2016, 11:28 PM   #3
ewlabonte
Member
 
Registered: Mar 2005
Distribution: Debian Stretch
Posts: 127

Original Poster
Rep: Reputation: 15
The solution was to add LID close to the event line:

event=button/lid LID close
action=/usr/sbin/pm-hibernate

solved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Laptop lid close suspend with i3 lzhiren Slackware 4 02-04-2015 01:35 AM
Custom action on lid close zylak007 Linux - Hardware 1 02-02-2013 01:32 PM
Hanged when i close lid ob my laptop sauravrukd Linux - Laptop and Netbook 2 11-25-2011 08:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration