Solving the USB‑C monitor flicker on my 2022 Dell XPS 13 with Wayland and Xorg

The Flicker Problem

I bought a 2022 Dell XPS 13 a few months ago and, like most people, I wanted to use an external 4K monitor via the single USB‑C port. The laptop ships with a Thunderbolt 4 controller that should handle 60 Hz 4K output without issue. On my Fedora 38 machine the monitor flickers when I connect it, and the flicker is worse on Wayland than on Xorg. The screen stutters every 1–2 seconds because the refresh rate drops in a periodic fashion. I spent a week trying to pin down the cause before finding a reliable fix.

Below is a step‑by‑step guide that covers:

  • How I diagnosed the problem
  • The root cause in the kernel/driver stack
  • Practical workarounds for both Xorg and Wayland
  • Trade‑offs and security considerations

Feel free to skip to the section that matches your setup.


1. Reproducing the Issue

1.1 Environment

Item Details
Laptop Dell XPS 13 9315 (2022)
OS Fedora 38 (Wayland by default)
Kernel 6.6.12‑fedora
Monitor Dell UltraSharp U2720Q (3840×2160 @ 60 Hz)
Cable USB‑C to USB‑C (Thunderbolt 4)
Desktop GNOME 45 (Wayland)
Xorg fallback Xorg via startx

The flicker only shows up when the monitor is plugged in through USB‑C. A USB‑C‑to‑HDMI adapter works fine, which already hinted that the problem was specific to the Thunderbolt/DP path.


2. Diagnostics

2.1 Check the kernel logs

journalctl -k | grep -i 'dpms\|drm'

You’ll see repeated drm_dpms: DPMS on/DPMS off messages every 2 seconds. That’s a sign the kernel is toggling the display power state.

2.2 Verify the refresh rate

xrandr --verbose | grep -A 5 'U2720Q'

The Refresh Rate field reports 60.00 Hz normally, but it drops to 0.00 Hz during flicker. On Wayland, wlr-randr (from the wlroots suite) shows the same intermittent drop:

wlr-randr | grep -i 'refresh'

2.3 Inspect the driver

lspci -nnk | grep -A 3 -i 'display'

You’ll see the Intel Iris Xe driver (i915) in use. Kernel 6.6.12 has a regression that mis‑handles DP link training for certain DP 1.4 monitors when the link is powered down by the host.


3. Root Cause

The Intel i915 driver introduced a change in 6.6.x that aggressively powers down the DP link when the system detects a low‑power state. On some hardware the link doesn’t come back up cleanly, so the monitor loses the signal and flickers. The problem is more pronounced on Wayland because GNOME Shell talks straight to libdrm, whereas Xorg’s xf86-video-intel keeps the link alive as a fallback.


4. Workarounds

4.1 Disable DPMS for the external monitor

On Xorg you can add a small xorg.conf.d snippet:

sudo mkdir -p /etc/X11/xorg.conf.d
sudo tee /etc/X11/xorg.conf.d/10-disable-dpms.conf <<'EOF'
Section "Monitor"
    Identifier "U2720Q"
    Option "DPMS" "false"
EndSection
EOF

Restart Xorg (startx) and the flicker disappears. The downside: you lose power‑saving on that monitor, which may raise energy usage slightly.

On Wayland, GNOME Shell respects the DPMS setting via org.gnome.settings-daemon.plugins.power. Disable it globally with:

gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac false

This is fine if you’re not worried about battery life on a docked machine.

The kernel lets you set the maximum DP link width via a module parameter. Create /etc/modprobe.d/i915.conf:

echo "options i915 enable_dp_mst=0" | sudo tee /etc/modprobe.d/i915.conf

Reload the module:

sudo modprobe -r i915
sudo modprobe i915

This forces the driver to use a single‑link DP path, which is more stable on the XPS 13. You lose a bit of bandwidth, but 60 Hz 4K is still within the single‑link spec.

4.3 Use a kernel backport

If you don’t want to disable DPMS, you can install the 6.5.18‑backport kernel from Fedora’s updates-testing repo, which contains a patch that restores the old link‑training logic:

sudo dnf install kernel-core-6.5.18-300.fc38.x86_64
sudo reboot

After reboot the flicker is gone. The trade‑off is that you’re on a slightly older kernel, which may lack newer features or security fixes.

4.4 Switch to Xorg

If Xorg is an option for you, make it the default:

sudo dnf install xorg-x11-server-Xorg
sudo systemctl set-default graphical.target
sudo reboot

Xorg’s driver is more conservative about the DP link, so the flicker disappears. The downside is losing Wayland’s sandbox and performance improvements.


5. A Minimal Wayland Configuration

If you want to keep Wayland but avoid the flicker, you can use wlr-randr to set a static refresh rate and disable DPMS for that monitor only:

wlr-randr --output U2720Q --rate 60
wlr-randr --output U2720Q --dpms off

Create a systemd user unit to run this at login:

mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/monitor-fix.service <<'EOF'
[Unit]
Description=Fix external monitor flicker
After=graphical-session.target

[Service]
ExecStart=/usr/bin/wlr-randr --output U2720Q --rate 60 --dpms off
Restart=no

[Install]
WantedBy=default.target
EOF

systemctl --user enable monitor-fix.service

This keeps the compositor running on Wayland, preserves power saving on the laptop screen, and eliminates flicker on the external display.


6. Security Considerations

  • Kernel module parameters – The i915 options file is world‑readable. Restrict it to root only to avoid accidental tampering:

    sudo chmod 600 /etc/modprobe.d/i915.conf
    
  • Systemd user units – The monitor-fix.service runs as your user, so it can’t affect other users. If you run it as root, add ProtectSystem=full to the unit to avoid privilege escalation.

  • Firmware updates – Dell’s BIOS/UEFI firmware sometimes includes DP link


See also