Very early in the boot process SimpleDRM will claim card0 as a DRM device backed by the BIOS framebuffer, mostly useful to offer Wayland-friendly graphics on systems without a GPU. When the system loads a GPU driver that brings its own framebuffer, it will automatically unload SimpleDRM. The nvidia driver doesn't yet expose a framebuffer (it's changing soon), so SimpleDRM will stick around on nvidia-only systems.
On single-GPU systems without nvidia, the GPU display will be at /dev/dri/card1 and card0 won't be present because SimpleDRM was unloaded. On single-GPU systems with nvidia, the GPU display will also be at /dev/dri/card1 but card0 will stick around, causing this bug. On multi-GPU systems, the presence of any non-nvidia GPUs should trigger the automatic removal of SimpleDRM. I'm not sure about this but I think it is possible that one of the real GPUs would end up as /dev/dri/card0. To address the bug, we cannot simply unload SimpleDRM on nvidia because it also provides the system's only framebuffer at /dev/fb0, which we need for VTs and comment #37 for example. But we can remove the SimpleDRM DRM node at /dev/dri/card0 which we don't need because an actual GPU card is available at /dev/dri/card1. > don't systems with multiple video cards exist, and couldn't one be using > /dev/dri/card0? There are two conditions that need to be satisfied in order for the `rm /dev/dri/card0` action to run: 1. The nvidia proprietary driver must be loaded. Note that the nvidia driver will refuse to probe unless a nvidia GPU is present, so this implies that the nvidia hardware is available. 2. The /dev/dri/card0 device must be owned by SimpleDRM. If /dev/dri/card0 is created by another driver, the action will not be run. > During boot, when does exactly "/bin/rm /dev/dri/card0" run Whenever the nvidia driver is loaded. I'm not sure when that normally is, but it shouldn't be relevant: when any other GPU DRM driver is present, we don't need a SimpleDRM DRM node. > Also, the test plan still does not cover non-nvidia platforms, and it sounds to me like that would be crucial. The two pre-conditions that i've illustrated above will cover the non- nvidia case. The crucial point there is that the nvidia driver must refuse to load without the underlying hardware. Since that is the case, the `rm` action is not triggered. The regression potential here is that on a system with the nvidia driver installed but no GPU hardware we would remove the only DRM driver, breaking Wayland compositors. I'll add a test-plan to ensure that the driver behaves as expected. I guess this would be where testing multiple nvidia driver versions is useful. > could /dev/dri/card0 be used for non-graphical things, like servers doing GPU calculations? And in that case, removing it could break that workload? No, SimpleDRM only allows drawing one buffer to the screen. ** Description changed: [ Impact ] After installing Nvidia driver 545 on a single (27") monitor system, Settings shows a phantom 46" monitor of the same resolution. It looks like the phantom monitor is /dev/dri/card0 which is still controlled by simpledrm, while Nvidia uses /dev/dri/card1. This also seems to be triggering bug 2062426 and bug 2066126. [ Temporary Workaround ] 1. sudo rm /dev/dri/card0 2. Log in again. [ Permanent Workaround ] Add kernel parameter: initcall_blacklist=simpledrm_platform_driver_init + Beware that this has side-effects: see comment #37 - [ Test Plan ] + [ Test Plan - Nvidia case ] 1. Set up a single monitor desktop where the only GPU enabled is an Nvidia one. 2. Open the 'Additional Drivers' app to install a supported Nvidia driver. 3. Reboot and verify the Nvidia driver is now active (lspci -k should mention 'nvidia' and not 'nouveau'). 4. Open Settings and verify the only monitors shown are your real monitors. + [ Test Plan - Non-Nvidia case ] + + 1. Set up a single monitor desktop with one or more GPUs, all non-nvidia. + (a KVM virtual machine with VirtIO is an easy candidate for this) + 2. Run `apt install nvidia-driver-535`. + 3. Reboot. + 4. Verify that you are able to log into the Ubuntu Desktop Wayland session. + + [ Test Plan - No-GPU case ] + + 1. Set up a single monitor desktop without any GPU. + (a virtual machine without any graphics acceleration (vmware, virtio...) is an easy candidate for this. + 2. Run `sudo apt install nvidia-driver-535`. + 3. Reboot. + 4. Verify that you are able to log into the Ubuntu Desktop Wayland session. + 5. Go back to point 2, and try with another driver version: + [nvidia-driver-470, nvidia-driver-535, nvidia-driver-535-open, nvidia-driver-550, nvidia-driver-550-open] + + [ Where problems could occur ] Removing the simpledrm card is only safe when it's not being used. If somehow a machine wasn't using the installed Nvidia driver then there could be a risk of deleting the only working display. + + One case where this could happen is if the Nvidia driver would allow + being loaded even without any nvidia hardware present: if that is the + case, "Test Plan - No-GPU case" would fail. [ Other Info ] ProblemType: Bug ApportVersion: 2.28.0-0ubuntu1 Architecture: amd64 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/seq: dan 4631 F.... pipewire /dev/snd/controlC1: dan 4636 F.... wireplumber CRDA: N/A CasperMD5CheckResult: pass DistroRelease: Ubuntu 24.04 InstallationDate: Installed on 2024-01-04 (92 days ago) InstallationMedia: Ubuntu 24.04 "Noble Numbat" - Daily amd64 (20231127) MachineType: Intel(R) Client Systems NUC12DCMi7 NonfreeKernelModules: nvidia_modeset nvidia Package: linux (not installed) ProcEnviron: LANG=en_US.UTF-8 PATH=(custom, no user) SHELL=/bin/bash TERM=xterm-256color XDG_RUNTIME_DIR=<set> ProcFB: 0 simpledrmdrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.8.0-11-generic root=UUID=8434774e-88f2-4e3f-adb8-2eb07dff3cf9 ro quiet loglevel=3 splash vt.handoff=7 ProcVersionSignature: Ubuntu 6.8.0-11.11-generic 6.8.0-rc4 RelatedPackageVersions: linux-restricted-modules-6.8.0-11-generic N/A linux-backports-modules-6.8.0-11-generic N/A linux-firmware 20240318.git3b128b60-0ubuntu1 Tags: noble Uname: Linux 6.8.0-11-generic x86_64 UpgradeStatus: No upgrade log present (probably fresh install) UserGroups: adm cdrom dip lpadmin plugdev sudo users _MarkForUpload: True dmi.bios.date: 12/20/2021 dmi.bios.release: 5.24 dmi.bios.vendor: Intel Corp. dmi.bios.version: EDADL579.0046.2021.1220.2351 dmi.board.name: NUC12EDBi7 dmi.board.vendor: Intel Corporation dmi.board.version: M27908-302 dmi.chassis.type: 35 dmi.chassis.vendor: Intel Corporation dmi.chassis.version: 2.0 dmi.ec.firmware.release: 3.7 dmi.modalias: dmi:bvnIntelCorp.:bvrEDADL579.0046.2021.1220.2351:bd12/20/2021:br5.24:efr3.7:svnIntel(R)ClientSystems:pnNUC12DCMi7:pvrM30143-302:rvnIntelCorporation:rnNUC12EDBi7:rvrM27908-302:cvnIntelCorporation:ct35:cvr2.0:skuRNUC12DCMi70000: dmi.product.family: DC dmi.product.name: NUC12DCMi7 dmi.product.sku: RNUC12DCMi70000 dmi.product.version: M30143-302 dmi.sys.vendor: Intel(R) Client Systems -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to nvidia-graphics-drivers-470 in Ubuntu. https://bugs.launchpad.net/bugs/2060268 Title: Phantom "Unknown Display" shown in Settings after installing the Nvidia driver Status in OEM Priority Project: New Status in linux package in Ubuntu: Invalid Status in nvidia-graphics-drivers-470 package in Ubuntu: Won't Fix Status in nvidia-graphics-drivers-535 package in Ubuntu: Won't Fix Status in nvidia-graphics-drivers-545 package in Ubuntu: Won't Fix Status in nvidia-graphics-drivers-550 package in Ubuntu: Won't Fix Status in ubuntu-drivers-common package in Ubuntu: Fix Released Status in ubuntu-drivers-common source package in Jammy: In Progress Status in ubuntu-drivers-common source package in Noble: In Progress Bug description: [ Impact ] After installing Nvidia driver 545 on a single (27") monitor system, Settings shows a phantom 46" monitor of the same resolution. It looks like the phantom monitor is /dev/dri/card0 which is still controlled by simpledrm, while Nvidia uses /dev/dri/card1. This also seems to be triggering bug 2062426 and bug 2066126. [ Temporary Workaround ] 1. sudo rm /dev/dri/card0 2. Log in again. [ Permanent Workaround ] Add kernel parameter: initcall_blacklist=simpledrm_platform_driver_init Beware that this has side-effects: see comment #37 [ Test Plan - Nvidia case ] 1. Set up a single monitor desktop where the only GPU enabled is an Nvidia one. 2. Open the 'Additional Drivers' app to install a supported Nvidia driver. 3. Reboot and verify the Nvidia driver is now active (lspci -k should mention 'nvidia' and not 'nouveau'). 4. Open Settings and verify the only monitors shown are your real monitors. [ Test Plan - Non-Nvidia case ] 1. Set up a single monitor desktop with one or more GPUs, all non-nvidia. (a KVM virtual machine with VirtIO is an easy candidate for this) 2. Run `apt install nvidia-driver-535`. 3. Reboot. 4. Verify that you are able to log into the Ubuntu Desktop Wayland session. [ Test Plan - No-GPU case ] 1. Set up a single monitor desktop without any GPU. (a virtual machine without any graphics acceleration (vmware, virtio...) is an easy candidate for this. 2. Run `sudo apt install nvidia-driver-535`. 3. Reboot. 4. Verify that you are able to log into the Ubuntu Desktop Wayland session. 5. Go back to point 2, and try with another driver version: [nvidia-driver-470, nvidia-driver-535, nvidia-driver-535-open, nvidia-driver-550, nvidia-driver-550-open] [ Where problems could occur ] Removing the simpledrm card is only safe when it's not being used. If somehow a machine wasn't using the installed Nvidia driver then there could be a risk of deleting the only working display. One case where this could happen is if the Nvidia driver would allow being loaded even without any nvidia hardware present: if that is the case, "Test Plan - No-GPU case" would fail. [ Other Info ] ProblemType: Bug ApportVersion: 2.28.0-0ubuntu1 Architecture: amd64 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/seq: dan 4631 F.... pipewire /dev/snd/controlC1: dan 4636 F.... wireplumber CRDA: N/A CasperMD5CheckResult: pass DistroRelease: Ubuntu 24.04 InstallationDate: Installed on 2024-01-04 (92 days ago) InstallationMedia: Ubuntu 24.04 "Noble Numbat" - Daily amd64 (20231127) MachineType: Intel(R) Client Systems NUC12DCMi7 NonfreeKernelModules: nvidia_modeset nvidia Package: linux (not installed) ProcEnviron: LANG=en_US.UTF-8 PATH=(custom, no user) SHELL=/bin/bash TERM=xterm-256color XDG_RUNTIME_DIR=<set> ProcFB: 0 simpledrmdrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.8.0-11-generic root=UUID=8434774e-88f2-4e3f-adb8-2eb07dff3cf9 ro quiet loglevel=3 splash vt.handoff=7 ProcVersionSignature: Ubuntu 6.8.0-11.11-generic 6.8.0-rc4 RelatedPackageVersions: linux-restricted-modules-6.8.0-11-generic N/A linux-backports-modules-6.8.0-11-generic N/A linux-firmware 20240318.git3b128b60-0ubuntu1 Tags: noble Uname: Linux 6.8.0-11-generic x86_64 UpgradeStatus: No upgrade log present (probably fresh install) UserGroups: adm cdrom dip lpadmin plugdev sudo users _MarkForUpload: True dmi.bios.date: 12/20/2021 dmi.bios.release: 5.24 dmi.bios.vendor: Intel Corp. dmi.bios.version: EDADL579.0046.2021.1220.2351 dmi.board.name: NUC12EDBi7 dmi.board.vendor: Intel Corporation dmi.board.version: M27908-302 dmi.chassis.type: 35 dmi.chassis.vendor: Intel Corporation dmi.chassis.version: 2.0 dmi.ec.firmware.release: 3.7 dmi.modalias: dmi:bvnIntelCorp.:bvrEDADL579.0046.2021.1220.2351:bd12/20/2021:br5.24:efr3.7:svnIntel(R)ClientSystems:pnNUC12DCMi7:pvrM30143-302:rvnIntelCorporation:rnNUC12EDBi7:rvrM27908-302:cvnIntelCorporation:ct35:cvr2.0:skuRNUC12DCMi70000: dmi.product.family: DC dmi.product.name: NUC12DCMi7 dmi.product.sku: RNUC12DCMi70000 dmi.product.version: M30143-302 dmi.sys.vendor: Intel(R) Client Systems To manage notifications about this bug go to: https://bugs.launchpad.net/oem-priority/+bug/2060268/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp