Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

AMDGPU DisplayPort Hotplug Detection Fix

Part of the Patches Index.

Problem

On systems with AMD Radeon RX 7700 XT / 7800 XT (Navi 32, gfx1101) GPUs running Linux kernel 6.14+, DisplayPort monitors can fail to be detected at boot. The GPU misses the HPD (Hot-Plug Detect) signal during early initialization, leaving the monitor in a disconnected state despite being physically connected and powered on.

HDMI connections are unaffected because they use a simpler detection mechanism.

Symptoms

  • One or more DisplayPort monitors show as disconnected in kscreen-doctor -o or /sys/class/drm/card*-DP-*/status after boot
  • The monitor works fine if you power-cycle it (turn off and on) after boot
  • HDMI-connected monitors on the same GPU detect correctly
  • dmesg shows REG_WAIT timeout during display initialization:
    amdgpu 0000:03:00.0: [drm] REG_WAIT timeout 1us * 100 tries - dcn32_program_compbuf_size line:138
    
  • No EDID data on the affected DP connector (/sys/class/drm/card1-DP-*/edid is empty)

Affected Hardware

  • GPU: AMD Radeon RX 7700 XT / 7800 XT (Navi 32, DCN 3.2)
  • Driver: amdgpu (kernel module)
  • Kernel: 6.14.0-15-generic (Ubuntu 25.10), likely affects other 6.x kernels
  • Display server: Wayland (KDE Plasma), but the issue is at the kernel/DRM level

Root Cause

DisplayPort requires an active handshake via the AUX channel + link training, unlike HDMI which is more passive. During early boot, the amdgpu display manager (amdgpu_dm) probes all connectors. If a DP monitor isn't ready fast enough (common with certain monitors that have slow power-on sequences), the AUX channel probe times out and the connector is marked as disconnected. The driver does not retry.

The REG_WAIT timeout in dcn32_program_compbuf_size confirms the display controller timed out during initialization of the display pipeline for that connector.

Fix

A systemd service that runs after the graphical target is reached, checks for disconnected DP ports, and forces the driver to re-scan.

Install

# Copy the rescan script
sudo cp dp-rescan.sh /usr/local/bin/dp-rescan.sh
sudo chmod +x /usr/local/bin/dp-rescan.sh

# Install the systemd service
sudo cp dp-rescan.service /etc/systemd/system/dp-rescan.service
sudo systemctl daemon-reload
sudo systemctl enable dp-rescan.service

How It Works

  1. Waits 5 seconds after graphical target for monitors to fully power on
  2. Checks if DP-2 shows as disconnected
  3. First attempts a soft re-detect via the connector status sysfs node
  4. If that fails, toggles the HPD (Hot-Plug Detect) mechanism on the display controller to force a full re-scan
  5. Logs all actions to the journal (journalctl -t dp-rescan)

Customization

If your affected port is not DP-2, edit dp-rescan.sh and change the connector path. Check your connectors with:

for conn in /sys/class/drm/card*-DP-*/status; do
    echo "$(basename $(dirname $conn)): $(cat $conn)"
done

After the Fix

After the DP port is re-detected, apply your screen layout. For KDE Plasma on Wayland:

kscreen-doctor \
  output.DP-2.enable output.DP-2.mode.1920x1080@60 output.DP-2.position.0,0 \
  output.HDMI-A-1.enable output.HDMI-A-1.mode.1920x1080@60 output.HDMI-A-1.position.1920,0 \
  output.DP-1.enable output.DP-1.mode.1920x1080@60 output.DP-1.position.3840,0

Diagnostics

Useful commands for investigating DP detection issues:

# Check connector status
cat /sys/class/drm/card1-DP-*/status

# Check if EDID is present (empty = no handshake)
test -s /sys/class/drm/card1-DP-2/edid && echo "EDID present" || echo "EDID missing"

# Check kernel logs for display issues
sudo dmesg | grep -i -E "REG_WAIT|hotplug|hpd|dp.*link|amdgpu_dm"

# Current display state
kscreen-doctor -o

# Check service logs
journalctl -t dp-rescan

Related Issues

License

MIT

About

Workaround for AMDGPU DisplayPort monitors not detected at boot (Navi 32, kernel 6.14+)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages