From f7d55d961b793409870d80ae1aff569d5a2aea33 Mon Sep 17 00:00:00 2001 From: INSUN PYO Date: Tue, 5 Nov 2019 11:51:19 +0900 Subject: [PATCH] logind: change the power key to disabled 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 --- src/login/70-power-switch.rules | 18 +++++++++--------- src/login/logind.conf.in | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/login/70-power-switch.rules b/src/login/70-power-switch.rules index e2855b5..70cf60a 100644 --- a/src/login/70-power-switch.rules +++ b/src/login/70-power-switch.rules @@ -5,14 +5,14 @@ # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. -ACTION=="remove", GOTO="power_switch_end" +#ACTION=="remove", GOTO="power_switch_end" -SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch" -SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch" -SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch" -SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="tps65217_pwr_but", TAG+="power-switch" -SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="* WMI hotkeys", TAG+="power-switch" -SUBSYSTEM=="input", KERNEL=="event*", \ - SUBSYSTEMS=="platform", DRIVERS=="gpio-keys", ATTRS{keys}=="*,116|116,*|116|*,116,*", TAG+="power-switch" +#SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch" +#SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch" +#SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch" +#SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="tps65217_pwr_but", TAG+="power-switch" +#SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="* WMI hotkeys", TAG+="power-switch" +#SUBSYSTEM=="input", KERNEL=="event*", \ +# SUBSYSTEMS=="platform", DRIVERS=="gpio-keys", ATTRS{keys}=="*,116|116,*|116|*,116,*", TAG+="power-switch" -LABEL="power_switch_end" +#LABEL="power_switch_end" diff --git a/src/login/logind.conf.in b/src/login/logind.conf.in index 6f720b7..26dd9b0 100644 --- a/src/login/logind.conf.in +++ b/src/login/logind.conf.in @@ -18,11 +18,11 @@ #KillOnlyUsers= #KillExcludeUsers=root #InhibitDelayMaxSec=5 -#HandlePowerKey=poweroff -#HandleSuspendKey=suspend -#HandleHibernateKey=hibernate -#HandleLidSwitch=suspend -#HandleLidSwitchDocked=ignore +HandlePowerKey=ignore +HandleSuspendKey=ignore +HandleHibernateKey=ignore +HandleLidSwitch=ignore +HandleLidSwitchDocked=ignore #PowerKeyIgnoreInhibited=no #SuspendKeyIgnoreInhibited=no #HibernateKeyIgnoreInhibited=no -- 2.7.4