You are not logged in.

#1 2018-07-26 17:14:56

leethaxor
Member
Registered: 2018-07-09
Posts: 31

Turn off power button?

I am running Arch Linux on a MacBook Air and the power button is dangerously close to the backspace button. At times I accidentally press the power button instead of the backspace button, which isn't very nice when you're in the middle of writing in a file. So is there a way to disable the power button from sending the power off signal to my computer? I've tried the following

/etc/systemd/logind.conf

HandlePowerKey=ignore

I edited logind.conf PowerKeyIgnoreInhibited to yes but it did nothing. And I've edited the  X11  file /usr/share/X11/xkb/symbols/inet and changed ALL XF86PowerOff to something other than XF86PowerOff, like XF86Save, and made sure that the POWR key is changed to something other than XF86PowerOff.

Last edited by leethaxor (2018-07-26 19:28:58)

Offline

#2 2018-08-03 00:44:43

2-d
Member
Registered: 2015-05-18
Posts: 6

Re: Turn off power button?

Which desktop environment are you using?  I noticed this section on the power management wiki (Wiki):

Power managers
Some desktop environments include power managers which inhibit (temporarily turn off) some or all of the systemd ACPI settings. If such a power manager is running, then the actions for ACPI events can be configured in the power manager alone. Changes to /etc/systemd/logind.conf or /etc/systemd/logind.conf.d/*.conf need be made only if you wish to configure behaviour for a particular event that is not inhibited by the power manager.

Note that if the power manager does not inhibit systemd for the appropriate events you can end up with a situation where systemd suspends your system and then when the system is woken up the other power manager suspends it again. As of December 2016, the power managers of KDE, GNOME, Xfce and MATE issue the necessary inhibited commands. If the inhibited commands are not being issued, such as when using acpid or others to handle ACPI events, set the Handle options to ignore. See also systemd-inhibit(1).

I use Cinnamon and the power manager seems to drive what the power button does.

Offline

#3 2018-08-05 17:50:03

leethaxor
Member
Registered: 2018-07-09
Posts: 31

Re: Turn off power button?

My WM is i3

Offline

#4 2018-08-06 16:14:26

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Turn off power button?

Check your journal for power key pressed events (after you have set HandlePowerKey=ignore and PowerKeyIgnoreInhibited=yes), it might give some hints as to what's going on.

Offline

Board footer

Powered by FluxBB