Skip to content

Instantly share code, notes, and snippets.

@plembo
Last active September 2, 2024 19:44
Show Gist options
  • Save plembo/0d048f127fcf46fafd6729ff35452d19 to your computer and use it in GitHub Desktop.
Save plembo/0d048f127fcf46fafd6729ff35452d19 to your computer and use it in GitHub Desktop.
phantom unknown display in ubuntu with nvidia

Workaround for "Phantom Unknown Display"

Got bit by Ubuntu Linux bug #2060268 on the latest kernel update for 22.04 LTS (6.8.0-40-generic).

As in the bug report (and many forum posts across the Internet) this appears to be due to a collision between the simpledrm kernel module and NVIDIA drivers. The symptom is a nonexistent display device being assigned as card0. The practical effect is to throw off any previous configuration of the display system (display 1 becoming display 2, display 2 becoming display 3). As a result, customizations like joined or mirrored displays break and need to be reconfigured.

This bug was filed in April 2024 for a 24.04 desktop running the NVIDIA 545 drivers. Since then it has also been reported in 22.04 (my current system, where I am running the NVIDIA 535 drivers with Xorg).

Many solutions have been proposed on the Internet involving passing special flags to the kernel. These have sometimes proved disruptive to system operations (like booting).

A fix was released by the Ubuntu dev team for 24.10 in August 2024. Fixes for 24.04 and 22.04 are marked as "Committed - In Progress".

The fix implemented by the Ubuntu team was this addition to udev rule 71-u-d-c-gpu-detection.rules:

ACTION=="add", SUBSYSTEM=="module", KERNEL=="nvidia_drm", TEST=="/sys/devices/platform/simple-framebuffer.0/drm/card0", RUN+="/bin/rm /dev/dri/card0"

Making this change manually to /usr/lib/udev/rules.d/71-u-d-c-gpu-detection.rules in my system fixed the problem for me.

As always, YMMV.

@nyarian
Copy link

nyarian commented Sep 2, 2024

thank you, this did fix it for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment