Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] suspend on lid close but NOT unsuspend on open?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jroth
n00b
n00b


Joined: 08 Aug 2017
Posts: 53

PostPosted: Fri Jul 06, 2018 9:36 pm    Post subject: [Solved] suspend on lid close but NOT unsuspend on open? Reply with quote

I'm running Gentoo with SystemD, and currently my laptop is configured to suspend on lid close and then wake up on lid open:

/etc/systemd/logind.conf
Code:

[Login]
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
HandleLidSwitchDocked=suspend
LidSwitchIgnoreInhibited=yes


but what I'm wondering if I can set it up to do is have it go to suspend when the lid is closed, but not have it wake up when the lid is opened. This is because I've noticed my laptop lid sometimes opens a crack while in my bag, and even opening by a few degrees is enough to trigger it to wake up when I don't want it to.


Last edited by jroth on Sat Jul 07, 2018 3:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14158

PostPosted: Sat Jul 07, 2018 12:13 am    Post subject: Reply with quote

Resume is controlled by your firmware, not by the system. In some cases, the system might be able to tell the firmware what forms of resume are permitted. In other cases, you need to configure this through the firmware's own control interface. In the worst case, the firmware will not accept this configuration at all and will always awaken.

What model laptop is this?
Back to top
View user's profile Send private message
jroth
n00b
n00b


Joined: 08 Aug 2017
Posts: 53

PostPosted: Sat Jul 07, 2018 1:24 am    Post subject: Reply with quote

Hu wrote:

What model laptop is this?


A Dell XPS 13, model 9370
Back to top
View user's profile Send private message
jroth
n00b
n00b


Joined: 08 Aug 2017
Posts: 53

PostPosted: Sat Jul 07, 2018 3:59 pm    Post subject: Reply with quote

Hu wrote:
Resume is controlled by your firmware, not by the system. In some cases, the system might be able to tell the firmware what forms of resume are permitted.


Wait a minute, I just realized that I already solved a version of this problem about a year ago, when I configured my desktop to not wake up on mouse events. It turns out that you access the firmware interface by sending text to /proc/acpi/wakeup, and I wrote (and you simplified) a script in that thread to do this automatically.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum