logind: change the power key to disabled
authorINSUN PYO <insun.pyo@samsung.com>
Tue, 5 Nov 2019 02:51:19 +0000 (11:51 +0900)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Fri, 15 Mar 2024 12:01:12 +0000 (13:01 +0100)
Tizen does not support power off without deviced.
So, you need to turn off the power key function in logind.

1. Disable TAG+="power-switch" uevent rules because logind uses "power-switch" uevent to recognize the power key.
2. Change default behavior for power key to ignore.

Change-Id: I0523d4cc46ce2edd05e479e9101c6d20f70b4296

packaging/systemd.spec
src/login/logind.conf.in

index 806946f..23ab0fd 100644 (file)
@@ -602,6 +602,8 @@ fi
 %{_bindir}/wait-default-target.sh
 %{_bindir}/wait-delayed-target.sh
 
+%exclude %{_sysconfdir}/udev/rules.d/70-power-switch.rules
+
 %files -n libsystemd
 %manifest %{name}.manifest
 %license LICENSE.LGPL2.1
index e5fe924..962502b 100644 (file)
 #KillExcludeUsers=root
 #InhibitDelayMaxSec=5
 #UserStopDelaySec=10
-#HandlePowerKey=poweroff
+HandlePowerKey=ignore
 #HandlePowerKeyLongPress=ignore
 #HandleRebootKey=reboot
 #HandleRebootKeyLongPress=poweroff
-#HandleSuspendKey=suspend
+HandleSuspendKey=ignore
 #HandleSuspendKeyLongPress=hibernate
-#HandleHibernateKey=hibernate
+HandleHibernateKey=ignore
 #HandleHibernateKeyLongPress=ignore
-#HandleLidSwitch=suspend
+HandleLidSwitch=ignore
 #HandleLidSwitchExternalPower=suspend
-#HandleLidSwitchDocked=ignore
+HandleLidSwitchDocked=ignore
 #PowerKeyIgnoreInhibited=no
 #SuspendKeyIgnoreInhibited=no
 #HibernateKeyIgnoreInhibited=no