mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Disable PSR1 on XPS IPS and OLED. XPS IPS uses PSR2 (#5315)
* Disable PSR1 on XPS IPS and OLED. IPS uses PSR2 * Improve conditional flow * Simplify the migration logic * We don't actually need this We are using += everywhere --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
co-authored by
David Heinemeier Hansson
parent
a76757335a
commit
90bf106a70
@@ -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 <<EOF | sudo tee /etc/limine-entry-tool.d/dell-xps-ptl-display.conf >/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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user