diff --git a/install/config/hardware/dell/fix-xps-ptl-display.sh b/install/config/hardware/dell/fix-xps-ptl-display.sh index 91433afd..3c66e47e 100644 --- a/install/config/hardware/dell/fix-xps-ptl-display.sh +++ b/install/config/hardware/dell/fix-xps-ptl-display.sh @@ -1,18 +1,20 @@ -# Fix display issues on Dell XPS 2026+ with LG OLED panel and Intel Panther Lake (Xe3) GPU. -# Power-saving features (PSR and Panel Replay) cause freezes and display glitches. -if omarchy-hw-dell-xps-oled; then - echo "Detected Dell XPS with LG OLED panel on Panther Lake, applying display power-saving fix..." +# Fix display issues on Dell XPS Panther Lake (Xe3) systems. +# Xe PSR causes freezes and display glitches on both OLED and IPS panels. +# LG OLED panels also need Panel Replay disabled. +if omarchy-hw-match "XPS" && omarchy-hw-intel-ptl; then + echo "Detected Dell XPS on Panther Lake, applying display power-saving fixes..." - CMDLINE='KERNEL_CMDLINE[default]+=" xe.enable_psr=0 xe.enable_panel_replay=0"' + if omarchy-hw-dell-xps-oled; then + CMDLINE='KERNEL_CMDLINE[default]+=" xe.enable_psr=0 xe.enable_panel_replay=0"' + COMMENT='Disable Xe PSR and Panel Replay on Dell XPS Panther Lake OLED systems' + else + CMDLINE='KERNEL_CMDLINE[default]+=" xe.enable_psr=0"' + COMMENT='Disable Xe PSR on Dell XPS Panther Lake systems' + fi sudo mkdir -p /etc/limine-entry-tool.d cat </dev/null -# Fix Dell XPS OLED display issues by disabling Xe PSR and Panel Replay power-saving features +# $COMMENT $CMDLINE EOF - - # Also append to /etc/default/limine if it exists, since it overrides drop-in configs - if [ -f /etc/default/limine ] && ! grep -q 'xe.enable_psr' /etc/default/limine; then - echo "$CMDLINE" | sudo tee -a /etc/default/limine >/dev/null - fi fi diff --git a/migrations/1776099290.sh b/migrations/1776099290.sh index 87ce5d1c..1d060533 100644 --- a/migrations/1776099290.sh +++ b/migrations/1776099290.sh @@ -1,14 +1,8 @@ -echo "Add xe.enable_psr=0 to CMDLINE for XPS Panther Lake systems missing it" +echo "Ensure xe.enable_psr=0 is set in CMDLINE for XPS Panther Lake systems" -if omarchy-hw-dell-xps-oled && [ -f /etc/default/limine ]; then - UPDATED=false - - if ! grep -q 'xe.enable_psr' /etc/default/limine; then +if omarchy-hw-match "XPS" && omarchy-hw-intel-ptl && [[ -f /etc/default/limine ]]; then + if ! grep -Fq 'xe.enable_psr=0' /etc/default/limine; then echo 'KERNEL_CMDLINE[default]+=" xe.enable_psr=0"' | sudo tee -a /etc/default/limine >/dev/null - UPDATED=true - fi - - if $UPDATED; then sudo limine-mkinitcpio fi fi