Fix display DPMS power-down and schedutil rate limit
Enable the X11 DPMS extension and force the DRM connector off/on on blank and wake, including the lid-close and lockscreen paths that write backlight sysfs directly (driven by a backlight change udev rule and a small sync helper). DPMS timeouts stay at zero so unlocked auto-blanking remains off. Re-apply schedutil rate_limit_us=40000 after every powersave to schedutil governor switch, which recreates the kobject with the 6.44 s default, and drop the writes to nonexistent up_rate_limit_us / down_rate_limit_us files. Remove the dead iw power-save call: NetworkManager wifi.powersave=3 and the wcn36xx WIPHY_FLAG_PS_ON_BY_DEFAULT patch already report "Power save: on".
This commit is contained in:
1 parent
691a989838
commit
7b6c6b25d4
9 files changed
+68
-14
No files matched your search
@@ -6,12 +6,12 @@ Section "ServerFlags"
|
||||
Option "StandbyTime" "0"
|
||||
Option "SuspendTime" "0"
|
||||
Option "OffTime" "0"
|
||||
Option "DPMS" "false"
|
||||
Option "DPMS" "true"
|
||||
EndSection
|
||||
|
||||
Section "Monitor"
|
||||
Identifier "DefaultMonitor"
|
||||
Option "DPMS" "false"
|
||||
Option "DPMS" "true"
|
||||
EndSection
|
||||
|
||||
Section "Device"
|
||||
|
||||
@@ -49,6 +49,8 @@ permit nopass :wheel as root cmd /usr/bin/bananarchy-bt-obex
|
||||
permit nopass :wheel as root cmd bananarchy-bt-obex
|
||||
permit nopass :wheel as root cmd /usr/bin/bananarchy-privacy-ctl
|
||||
permit nopass :wheel as root cmd bananarchy-privacy-ctl
|
||||
permit nopass :wheel as root cmd /usr/bin/bananarchy-display-power-sync
|
||||
permit nopass :wheel as root cmd bananarchy-display-power-sync
|
||||
permit nopass :wheel as root cmd /usr/bin/plymouth args quit
|
||||
permit nopass :wheel as root cmd plymouth args quit
|
||||
permit nopass :wheel as root cmd rc-service args hexagonrpcd-adsp-sensorspd stop
|
||||
|
||||
@@ -31,14 +31,14 @@ for pm_dev in /sys/devices/platform/soc@0/1c00000.gpu /sys/devices/platform/soc@
|
||||
fi
|
||||
done
|
||||
|
||||
# Tune CPUFreq schedutil governor to avoid 22 Hz frequency/RPM voltage thrashing at idle
|
||||
# while keeping interactive ramp-up responsive. Allow video group (dwm/xlocker) to switch
|
||||
# scaling_governor to powersave (200 MHz) while the screen is off.
|
||||
# Keep schedutil rate_limit_us at 40 ms instead of the 6.44 s default that
|
||||
# qcom-cpufreq derives from its UINT_MAX transition latency. Only rate_limit_us
|
||||
# exists on this kernel: up_rate_limit_us and down_rate_limit_us do not.
|
||||
# Switching scaling_governor away from schedutil and back destroys/recreates
|
||||
# this kobject, so bananarchy-display-power-sync re-applies the value on wake.
|
||||
for gov_dir in /sys/devices/system/cpu/cpufreq/schedutil /sys/devices/system/cpu/cpufreq/policy*/schedutil /sys/devices/system/cpu/cpu*/cpufreq/schedutil; do
|
||||
if [ -d "$gov_dir" ]; then
|
||||
{ echo 40000 > "$gov_dir/rate_limit_us"; } 2>/dev/null || true
|
||||
{ echo 40000 > "$gov_dir/up_rate_limit_us"; } 2>/dev/null || true
|
||||
{ echo 10000 > "$gov_dir/down_rate_limit_us"; } 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
for gov_file in /sys/devices/system/cpu/cpufreq/policy*/scaling_governor /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
|
||||
@@ -59,10 +59,10 @@ if [ -r /sys/class/power_supply/pm8916-lbc-chgr/constant_charge_current ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Enable IEEE 802.11 power save on WCN3620 wlan0
|
||||
if command -v iw >/dev/null 2>&1; then
|
||||
iw dev wlan0 set power_save on 2>/dev/null || true
|
||||
fi
|
||||
# Wi-Fi power save is enabled by NetworkManager (wifi.powersave=3) and by the
|
||||
# wcn36xx WIPHY_FLAG_PS_ON_BY_DEFAULT / dynamic_ps_timeout=200 kernel patch.
|
||||
# Verified on-device: "iw dev wlan0 get power_save" reports "Power save: on".
|
||||
# No iw binary is shipped, so no userspace iw call belongs here.
|
||||
|
||||
# Restore any persistent Engineering Menu Wi-Fi/BT MAC and IMEI override state
|
||||
if [ -x /usr/bin/bananarchy-engmenu-ctl ]; then
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
SUBSYSTEM=="backlight", ACTION=="change", RUN+="/bin/sh -c 'DISPLAY=:0 /usr/bin/bananarchy-display-power-sync >/dev/null 2>&1 &'"
|
||||
Reference in new issue
Block a user