From 69275f9ef13fd0720b6ad3ebf803460636d15f5b Mon Sep 17 00:00:00 2001 From: fewtarius Date: Fri, 4 Oct 2024 11:08:21 +0000 Subject: [PATCH] Enable panel power saving with a default of 1, configurable with steamfork-set-setting. Thanks to @uejji for research and initial proof of concept. --- PKGBUILD/steamfork-device-support/PKGBUILD | 2 +- .../devicequirks/DEFAULT/boot.d/001-display | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 PKGBUILD/steamfork-device-support/src/etc/lib/steamfork_hwsupport/devicequirks/DEFAULT/boot.d/001-display diff --git a/PKGBUILD/steamfork-device-support/PKGBUILD b/PKGBUILD/steamfork-device-support/PKGBUILD index 04876fd0..60e99971 100644 --- a/PKGBUILD/steamfork-device-support/PKGBUILD +++ b/PKGBUILD/steamfork-device-support/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Fewtarius pkgname=steamfork-device-support -pkgver=2024.10.01 +pkgver=2024.10.04 pkgrel=1 pkgdesc='Hardware support provider for PC handhelds.' arch=('any') diff --git a/PKGBUILD/steamfork-device-support/src/etc/lib/steamfork_hwsupport/devicequirks/DEFAULT/boot.d/001-display b/PKGBUILD/steamfork-device-support/src/etc/lib/steamfork_hwsupport/devicequirks/DEFAULT/boot.d/001-display new file mode 100644 index 00000000..5712b1f3 --- /dev/null +++ b/PKGBUILD/steamfork-device-support/src/etc/lib/steamfork_hwsupport/devicequirks/DEFAULT/boot.d/001-display @@ -0,0 +1,15 @@ +#!/bin/sh + +PANEL_POWER_SAVINGS=$(steamfork-get-setting amdgpu.panel_power_saving) +if [ -z "${PANEL_POWER_SAVINGS}" ] +then + PANEL_POWER_SAVINGS=1 +fi + +for NODE in /sys/class/drm/card?/*/amdgpu/panel_power_savings +do + if [ -e "${NODE}" ] + then + echo ${PANEL_POWER_SAVINGS} >${NODE} + fi +done