mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
Merge pull request #8180 from HiassofT/le11-kodi-poweroff
[le11] backport kodi power button / shutdown improvements
This commit is contained in:
commit
b48e2eeaaf
@ -0,0 +1,15 @@
|
||||
# Ignore power button input devices in libinput so logind can handle them
|
||||
ACTION=="remove", GOTO="end"
|
||||
SUBSYSTEM!="input", GOTO="end"
|
||||
KERNEL!="event*", GOTO="end"
|
||||
|
||||
IMPORT{parent}="KEY"
|
||||
|
||||
# match devices that only generate KEY_POWER (code 116) events
|
||||
ENV{KEY}=="10000000000000 0", ENV{LIBINPUT_IGNORE_DEVICE}="1"
|
||||
|
||||
# 32bit systems report the bitmap in 32bit chunks
|
||||
ENV{KEY}=="100000 0 0 0", ENV{LIBINPUT_IGNORE_DEVICE}="1"
|
||||
|
||||
LABEL="end"
|
||||
|
@ -408,6 +408,12 @@ post_makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/cache/libreelec
|
||||
cp ${PKG_DIR}/config/network_wait ${INSTALL}/usr/cache/libreelec
|
||||
|
||||
# GBM: install udev rule to ignore the power button in libinput/kodi so logind can handle it
|
||||
if [ "${DISPLAYSERVER}" = "no" ]; then
|
||||
mkdir -p ${INSTALL}/usr/lib/udev/rules.d/
|
||||
cp ${PKG_DIR}/config/70-libinput-ignore-power-button.rules ${INSTALL}/usr/lib/udev/rules.d/
|
||||
fi
|
||||
|
||||
# update addon manifest
|
||||
ADDON_MANIFEST=${INSTALL}/usr/share/kodi/system/addon-manifest.xml
|
||||
xmlstarlet ed -L -d "/addons/addon[text()='service.xbmc.versioncheck']" ${ADDON_MANIFEST}
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 5604be6a6701e0bd68cb36fadb05cecba57f7887 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Reichl <hias@horus.com>
|
||||
Date: Fri, 22 Sep 2023 23:41:51 +0200
|
||||
Subject: [PATCH] keymaps: change remote poweroff action to show shutdown menu
|
||||
|
||||
Signed-off-by: Matthias Reichl <hias@horus.com>
|
||||
---
|
||||
system/keymaps/remote.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/system/keymaps/remote.xml b/system/keymaps/remote.xml
|
||||
index c122b99188..baebf679c0 100644
|
||||
--- a/system/keymaps/remote.xml
|
||||
+++ b/system/keymaps/remote.xml
|
||||
@@ -50,7 +50,7 @@
|
||||
<volumeplus>VolumeUp</volumeplus>
|
||||
<volumeminus>VolumeDown</volumeminus>
|
||||
<mute>Mute</mute>
|
||||
- <power>ShutDown()</power>
|
||||
+ <power>ActivateWindow(ShutdownMenu)</power>
|
||||
<myvideo>ActivateWindow(Videos)</myvideo>
|
||||
<mymusic>ActivateWindow(Music)</mymusic>
|
||||
<mypictures>ActivateWindow(Pictures)</mypictures>
|
||||
--
|
||||
2.39.2
|
||||
|
@ -203,7 +203,11 @@ post_makeinstall_target() {
|
||||
|
||||
# tune logind.conf
|
||||
sed -e "s,^.*HandleLidSwitch=.*$,HandleLidSwitch=ignore,g" -i ${INSTALL}/etc/systemd/logind.conf
|
||||
if [ "${DISPLAYSERVER}" = "no" ]; then
|
||||
sed -e "s,^.*HandlePowerKey=.*$,HandlePowerKey=poweroff,g" -i ${INSTALL}/etc/systemd/logind.conf
|
||||
else
|
||||
sed -e "s,^.*HandlePowerKey=.*$,HandlePowerKey=ignore,g" -i ${INSTALL}/etc/systemd/logind.conf
|
||||
fi
|
||||
|
||||
# replace systemd-machine-id-setup with ours
|
||||
safe_remove ${INSTALL}/usr/lib/systemd/system/systemd-machine-id-commit.service
|
||||
|
Loading…
x
Reference in New Issue
Block a user