You are not logged in.

#1 2020-01-22 13:44:22

jones
Member
Registered: 2013-03-14
Posts: 276

How to make laptop suspend if lid is closed and cable pulled?

If my laptop is connected to external power and I close the lid, it locks the screen. So far, so good. However, if I then unplug it from the energy source, it stays on.

Is it possible to make it suspend when I pull out the cable for external power with the lid already closed?

logind.conf:

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

Offline

#2 2020-01-22 14:48:03

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,702

Re: How to make laptop suspend if lid is closed and cable pulled?

What are using to manage your power?  Systemd?  acpid?

What desktop environment are you using?  Gnome? KDE? i3?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2020-01-22 15:45:02

jones
Member
Registered: 2013-03-14
Posts: 276

Re: How to make laptop suspend if lid is closed and cable pulled?

I have both systemd and acpid installed, and TLP.
I am using XFCE.

I am using the energy settings within XFCE's options, as well as the options in the op. As far as I can tell, they seem to override/trump XFCE's settings. Or rather, closing the lid with external power did not have the intended effect (i.e. screenlock) until I set "HandleLidSwitchExternalPower" to lock.

Offline

Board footer

Powered by FluxBB