Disable power button

Oh I didn't commit this, probably why I still have the problem on the
Pinebook x)
This commit is contained in:
Geoffrey Frogeye 2022-11-04 14:15:01 +01:00
parent 9fac2c3701
commit eddb48e461
Signed by: geoffrey
GPG Key ID: C72403E7F82E6AD8
2 changed files with 18 additions and 0 deletions

View File

@ -39,3 +39,8 @@
debug:
msg: "The Panfrost display driver configuration was changed, but needs a reboot to be applied."
listen: panfrost config changed
- name: Reload systemd-logind
command: systemctl kill -s HUP systemd-logind
become: yes
listen: systemd-logind config changed

View File

@ -356,6 +356,19 @@
- etc changed
- systemd changed
- name: Disable power button
lineinfile:
path: /etc/systemd/logind.conf
line: 'HandlePowerKey=ignore'
regexp: '^#? *HandlePowerKey='
insertafter: '^\[Login\]$'
become: yes
notify: systemd-logind config changed
# Reason: I sometimes press it accidentally
# (hoping to start it when it's already started,
# or really accidentally on the Pinebook).
# Suspend would be nice, but it doesn't have the locker then
# TODO Hibernation, if that's relevant
# $ sudo blkid | grep 'TYPE="swap"'
# $ sudoedit /etc/default/grub