Asked on Super User by Abram Saulli, 2 years ago. No reply there for at least a week.
Have pressing the power button briefly immediately shutdown the laptop?
I am on Ubuntu 24.04 LTS, and I want even briefly pressing the power button to immediately shut down my laptop (preferrably even when the laptop is locked and the screen is off) I have tried setting it in Settings Power, modifying logind.conf with HandlePowerKey=poweroff and PowerKeyIgnoreInhibited=yes, deleted logind.conf, now it's gone though, not coming back it seems. And using acpi cat /etc/acpi/events/powerbtn event=button[ /]power action=/sbin/poweroff none of these seem to enable the power button to do anything when (briefly) pressed. No LSB modules are available. Distributor ID: Ubuntu
This question is one of 1 report of the same problem:
Have pressing the power button briefly immediately shutdown the laptop?
Nobody has answered it yet, here or anywhere.
Related problems
Question by Abram Saulli on Super User, licensed CC BY-SA. We show a short excerpt and link to the original thread as credit.