fix: temporarily disable "turn off screen when idle" in kde for handhelds (#1771)

* Revert "chore: Update to kernel 6.11.2-201"

This reverts commit 6bac9811e3.

* Revert "chore: Kill X11 session for good"

This reverts commit b7ee250370.

* fix(legion go): remove lcd script (#1745)

It was not meant to be...

* fix: temporarily disable "turn off screen when idle" in kde for handhelds
Temp workaround until we can figure out what causes it to not come back upon input immediately on handhelds.
I was unable to reproduce this on a laptop(desktop image as laptop is too old for deck image) and a desktop (deck image)

* chore: run the command directly if the if statements are true

---------

Co-authored-by: Kyle Gospodnetich <me@kylegospodneti.ch>
Co-authored-by: Antheas Kapenekakis <5252246+antheas@users.noreply.github.com>
This commit is contained in:
HikariKnight 2024-10-25 19:30:25 +02:00 committed by GitHub
parent 65175733fc
commit a8a9513b07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,6 +64,17 @@ if [[ "${XDG_SESSION_TYPE}" = "wayland" ]]; then
|| true
fi
fi
# TEMP workaround for a bug causing the screen to not come back on input on handhelds
# if it was turned off from idling, this just disables the display idle in kde until
# we can figure out what causes the bug, as it does not happen on laptops/desktops.
# If this is valve hardware or a handheld that hhd supports (easiest way to just cover all handhelds)
# do not turn off the screen when idle (sleep still works normal)
if /usr/libexec/hwsupport/valve-hardware; then
perl -pi -e 's/TurnOffDisplayIdleTimeoutSec=\d{1,4}/TurnOffDisplayIdleTimeoutSec=-1\nTurnOffDisplayWhenIdle=false/g' ~/.config/powerdevilrc
elif /usr/libexec/hwsupport/hhd-supported-hardware; then
perl -pi -e 's/TurnOffDisplayIdleTimeoutSec=\d{1,4}/TurnOffDisplayIdleTimeoutSec=-1\nTurnOffDisplayWhenIdle=false/g' ~/.config/powerdevilrc
fi
elif [[ $BASE_IMAGE_NAME =~ "silverblue" ]]; then
# Set scale on GNOME desktops, rotation tends to work without issue.
if /usr/libexec/hwsupport/needs-100-scale; then