How to disable power-off/standby via remote control on raspbian buster

1

I've recently upgraded from a raspberry pi 3 with raspbian stretch to a pi 4 with raspbian buster. Now, same as before, I also have a remote control attached via USB, and I use thd to hook up certain actions for home automation.

However since upgrading to pi4/buster, the power-button on the remote control now shuts down my raspberry pi!

How can I disable this? I completely fail to google this question, all I find is guides on how to do this on gnome, however I am running raspbian lite (headless) without any desktop.

So how can I make the raspberry pi ignore the power button of the remote control?

user826955

Posted 2019-08-23T12:29:22.027

Reputation: 113

Answers

1

This worked for me:

https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=261257&p=1591568#p1591568

sudo nano /etc/systemd/logind.conf

Search for the line

#HandlePowerKey=WhateverTheValueWasBefore

Change it to

HandlePowerKey=ignore

And restart systemd-logind

sudo systemctl restart systemd-logind

Michi

Posted 2019-08-23T12:29:22.027

Reputation: 126