Power button. Power off delay

Hello,

My Lenovo Chromebook 100e with Arch and Openbox turns off immediately even if I touch the power button accidentally. Is there a way to create a delay of 2-3 seconds to power off the laptop by the power button?

Thank you.

I think if you find a general Arch Linux answer you can use that answer. There is no special answer for Chromebooks. Feel free to Google adding a delay to shutting down when you press the power button in Arch.

1 Like

While popular desktop interfaces like KDE or Cinnamon offers to choose what the power button does in the system settings (default action is to show Shut Down/Reboot/Log out menu), Openbox does not have a GUI configuration for it.

However, you can set up a power management tool Power management - Openbox

For example, if you use acpid, check out acpid - ArchWiki and Power management - ArchWiki.

However, this is really an Arch+Openbox question rather than a Chromebook issue (my chromebook with Arch+KDE does not shut down immediately after pressing the power button, it asks what to do). Please ask a question in https://unix.stackexchange.com/ or https://bbs.archlinux.org/ if you are unable to figure out from the Wiki.

I found this: You can ignore the short press of power key with linux - How to change Power button shutdown action to run a script under systemd - Unix & Linux Stack Exchange, and a long press will always shut down the computer anyway, in case of emergencies (e.g. not responding).

Thank you!