Hi, everyone! I’m trying to disable power button on my laptop. Currently if I press it, my system suspends. I’ve tried to google and find out that systemd should be able to do just that. All I had to do - is just edit /etc/systemd/logind.conf. From logind.conf man page I find out, that in order to disable power button I should set “HandlePowerKey” to “ignore”. I rebooted but it didn’t work, so I thought maybe system sees button not like “PowerKey” but like “SuspendKey” or “HibernateKey” so just to be sure I set both of them to “ignore”. But nothing changed - after I press “power button” system suspends. I started to think maybe this file is ignored by “systemd-logind” for some reason, but then I tried to change “HandleLidSwitch” to “lock” and it worked! (well, kind of - default action when I close the lid is suspend now it locks but the screen turns off). So it means that logind.conf is not ignored but for some reason it doesn’t work for power button.
Edit: Couldn’t figure out how to add proper “solved” badge, so I just edited question’s title.
Sorry for my poor English.