systemd: don't power off when power button is pressed #2658
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Kodi is already handling KEY_POWER and as it's currently grabbing input devices it prevents systemd-logind from receiving power button events.
If kodi and eventlircd are stopped though, eg when testing IR remote configurations, systemd-logind receives KEY_POWER events and immediately inits a shutdown - which is rather annoying.
So change the HandlePowerKey setting in /etc/systemd/logind.conf from the default (poweroff) to ignore and add the possibility to override systemd-logind settings via /storage/.config/logind.conf.d/*.conf files by users.
@lrusak with this change it should be safe to disable input grabbing in libinput