You are not logged in.

#1 2018-11-30 00:23:17

haashgizh
Member
Registered: 2018-02-22
Posts: 4

Time to hold power button

I'm running a arch on a samsung chromebook 3. The power button is really close to the backspace key and I often hit it by accident. I can't seem to find out how to configure my system so I have to hold the button for a few seconds before it powers off.

Offline

#2 2018-11-30 07:55:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,701

Re: Time to hold power button

You can configure the soft power off (ie. on a brief touch), but the hard power off that kicks in after usually 4 seconds (dunno about the particular device, though) is a HW rescue feature.
The soft power off is in doubt controlled by the entry in /etc/systemd/logind.conf, but ultimately depends on your setup (desktop environment, acpid, … which will provide more dynamic handling like a dialog asking what to do)

Offline

#3 2018-11-30 20:28:53

haashgizh
Member
Registered: 2018-02-22
Posts: 4

Re: Time to hold power button

It's a soft power off. I don't have desktop environment: I start twm with X when I need GUI applications.

Based on the man page for logind.conf, I sounded like I needed to set HoldoffTimeoutSec=8 but that hasn't  worked

Offline

#4 2018-11-30 20:36:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,701

Re: Time to hold power button

The manpage says: "on reacting to lid events"
My suggestion would be to have logind ignore the button and configure yourself a nice acpid script, https://wiki.archlinux.org/index.php/Acpid
You could eg show a dialog or check the timestamp on a file (and touch it) so that you've to hit the button twice within 1 second or so topower off.
You'll probably not be able to impact the event generation.

Offline

#5 2018-11-30 20:44:43

haashgizh
Member
Registered: 2018-02-22
Posts: 4

Re: Time to hold power button

Love it, thanks~

Offline

Board footer

Powered by FluxBB