From d1ed4c48a68590331e21f62fa4bddb2cfb437506 Mon Sep 17 00:00:00 2001 From: Mateusz Kowalczyk Date: Wed, 6 May 2026 09:56:06 +0200 Subject: [PATCH 1/3] Extract ASUS Expertbook B9406 display backlight fix and apply it for Zenbook ux5406aa too --- bin/omarchy-hw-asus-zenbook-ux5406aa | 5 +++++ install/config/all.sh | 1 + .../hardware/asus/fix-asus-ptl-b9406-display.sh | 10 ++-------- .../asus/fix-asus-ptl-display-backlight.sh | 16 ++++++++++++++++ 4 files changed, 24 insertions(+), 8 deletions(-) create mode 100755 bin/omarchy-hw-asus-zenbook-ux5406aa create mode 100644 install/config/hardware/asus/fix-asus-ptl-display-backlight.sh diff --git a/bin/omarchy-hw-asus-zenbook-ux5406aa b/bin/omarchy-hw-asus-zenbook-ux5406aa new file mode 100755 index 0000000000..9f8da811d2 --- /dev/null +++ b/bin/omarchy-hw-asus-zenbook-ux5406aa @@ -0,0 +1,5 @@ +#!/bin/bash + +# omarchy:summary=Detect ASUS Zenbook UX5406AA series laptops on Intel Panther Lake. + +omarchy-hw-match "ux5406aa" && omarchy-hw-intel-ptl diff --git a/install/config/all.sh b/install/config/all.sh index bdd3f4bae6..e75549d488 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -50,6 +50,7 @@ run_logged $OMARCHY_INSTALL/config/hardware/intel/fix-wifi7-eht.sh run_logged $OMARCHY_INSTALL/config/hardware/dell/fix-xps-haptic-touchpad.sh +run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-display-backlight.sh run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-display.sh run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh run_logged $OMARCHY_INSTALL/config/hardware/asus/fix-audio-mixer.sh diff --git a/install/config/hardware/asus/fix-asus-ptl-b9406-display.sh b/install/config/hardware/asus/fix-asus-ptl-b9406-display.sh index de03d286d7..b77a45c473 100644 --- a/install/config/hardware/asus/fix-asus-ptl-b9406-display.sh +++ b/install/config/hardware/asus/fix-asus-ptl-b9406-display.sh @@ -1,21 +1,15 @@ -# Display fixes for ASUS ExpertBook B9406 (Panther Lake / Xe3 iGPU). +# Display fix for ASUS ExpertBook B9406 (Panther Lake / Xe3 iGPU). # # Panel Replay is Xe3-new, default-on in the xe driver, and has a broken # exit/wake path on this eDP panel: the panel latches the last-presented # frame in self-refresh and never wakes for subsequent atomic commits, so # the screen only updates on a full modeset (e.g. a VT switch). The older # xe.enable_psr=0 knob does not cover Panel Replay. -# -# The panel's EDID on eDP-1 reads as empty, so xe takes backlight type from -# VBT (which says PWM) but the panel actually wants DPCD AUX backlight. -# Without xe.enable_dpcd_backlight=1, intel_backlight sysfs writes succeed -# but produce no visible change; brightness is effectively binary. if omarchy-hw-asus-expertbook-b9406; then sudo mkdir -p /etc/limine-entry-tool.d cat </dev/null -# ASUS ExpertBook B9406 (Panther Lake / Xe3) display workarounds +# ASUS ExpertBook B9406 (Panther Lake / Xe3) display workaround KERNEL_CMDLINE[default]+=" xe.enable_panel_replay=0" -KERNEL_CMDLINE[default]+=" xe.enable_dpcd_backlight=1" EOF fi diff --git a/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh b/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh new file mode 100644 index 0000000000..3f0f7a1e32 --- /dev/null +++ b/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh @@ -0,0 +1,16 @@ +# Display backlight fix for ASUS Panther Lake / Xe3 iGPU laptops. +# Enabled only for ExpertBook B9406 and Zenbook UX5406AA for now. +# Other models need confirmation if the issue exists there too. +# +# The panel's EDID on eDP-1 reads as empty, so xe takes backlight type from +# VBT (which says PWM) but the panel actually wants DPCD AUX backlight. +# Without xe.enable_dpcd_backlight=1, intel_backlight sysfs writes succeed +# but produce no visible change; brightness is effectively binary. + +if omarchy-hw-asus-expertbook-b9406 || omarchy-hw-asus-zenbook-ux5406aa; then + sudo mkdir -p /etc/limine-entry-tool.d + cat </dev/null +# ASUS Panther Lake display backlight fix +KERNEL_CMDLINE[default]+=" xe.enable_dpcd_backlight=1" +EOF +fi From 40a4f5bb98aa220b7eba5ec49a9b521ea7e0ef26 Mon Sep 17 00:00:00 2001 From: Mateusz Kowalczyk Date: Wed, 6 May 2026 11:22:47 +0200 Subject: [PATCH 2/3] Add migration for Panther Lake Asus display bakclight fix --- .../hardware/asus/fix-asus-ptl-display-backlight.sh | 2 +- migrations/1777938402.sh | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 migrations/1777938402.sh diff --git a/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh b/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh index 3f0f7a1e32..cc85106102 100644 --- a/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh +++ b/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh @@ -1,6 +1,6 @@ # Display backlight fix for ASUS Panther Lake / Xe3 iGPU laptops. # Enabled only for ExpertBook B9406 and Zenbook UX5406AA for now. -# Other models need confirmation if the issue exists there too. +# Other models need confirmation whether the issue exists there too. # # The panel's EDID on eDP-1 reads as empty, so xe takes backlight type from # VBT (which says PWM) but the panel actually wants DPCD AUX backlight. diff --git a/migrations/1777938402.sh b/migrations/1777938402.sh new file mode 100644 index 0000000000..adaf359762 --- /dev/null +++ b/migrations/1777938402.sh @@ -0,0 +1,13 @@ +echo "Fix display backlight on supported ASUS Panther Lake laptops" + +EXPERTBOOK_DROP_IN="/etc/limine-entry-tool.d/asus-expertbook-b9406-display.conf" + +if omarchy-hw-asus-expertbook-b9406 || omarchy-hw-asus-zenbook-ux5406aa; then + if [[ -f $EXPERTBOOK_DROP_IN ]]; then + sudo sed -i '/xe\.enable_dpcd_backlight/d' "$EXPERTBOOK_DROP_IN" + fi + + source "$OMARCHY_PATH/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh" + + sudo limine-update +fi From 9acc40b29b0b89ed04be35f269aa680c8a0d438a Mon Sep 17 00:00:00 2001 From: Mateusz Kowalczyk Date: Wed, 6 May 2026 13:21:50 +0200 Subject: [PATCH 3/3] Check if limine-update exists before executing it in the migration Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- migrations/1777938402.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migrations/1777938402.sh b/migrations/1777938402.sh index adaf359762..24099ee58c 100644 --- a/migrations/1777938402.sh +++ b/migrations/1777938402.sh @@ -9,5 +9,7 @@ if omarchy-hw-asus-expertbook-b9406 || omarchy-hw-asus-zenbook-ux5406aa; then source "$OMARCHY_PATH/install/config/hardware/asus/fix-asus-ptl-display-backlight.sh" - sudo limine-update + if omarchy-cmd-present limine-update; then + sudo limine-update + fi fi