Xutuntu 22.04 black screen when prime-select is set to nvidia or on-demand

I recently migrated my Xubuntu 22.04 setup to a new laptop (Dell Precision 3580). After tinkering around for a few days, the Intel Iris Xe GPU works now. However, I just can’t make the Nvidia RTX A500 working.

I am using Xubuntu with lightdm, Linux kernel 6.2.0-26-generic.

I have installed nvidia-driver-535 from apt, and the output of sudo lshw -C video show that none of the 2 GPUs are “UNCLAIMED”.

However, whenever prime-select is set to nvidia or on-demand, Xubuntu boots into a black screen after unlocking the encrypted drive. At this point, if prime-select is set to nvidia, I can press Ctrl+Alt+F1 to get a tty, login and use Xubuntu there. However, if prime-select is set to on-demand, then Ctrl+Alt+F1 has no effect and the machine remains stuck at the black screen.

I added a 10-nvidia-drm-outputclass.conf to my /etc/X11/xorg.conf.d/ following the arch documentation.

I also followed the arch documentation to add a display setup script to invoke bash

#!/bin/sh
echo "hello" > /tmp/hello.txt
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

After adding this, Ctrl+Alt+F1 works even if prime-select is set to on-demand. When Xubuntu boots into a black screen, going to the tty I can see that /tmp/hello.txt is created, so the script did run.

I tried to set options nvidia-drm modeset=0 according to this nvidia forum reply, but that didn’t work.

I also tried to make the driver load earlier by embedding it into initrd, as described in a nvidia forum discussion, but that didn’t change the outcome.

I also cleaned up all the stale xorg.conf files as suggested in this nvidia forum thread, but that also didn’t change the outcome.

At this point I’m out of ideas. A bug report log file generated from tty when Xubuntu is stuck at the black screen can be found below. Any pointers would be greatly appreciated. Thanks!

nvidia-bug-report.log.gz (393.5 KB)

In case it’d be useful, going to the tty when Xubuntu is stuck at black screen, nvidia-smi can detect the RTX A500 without error. I also tried to use ffmpeg with cuda to encode video and it works.

With some more tinkering, I finally figured it out. It turns out there were some old config files such as 10-nvidia-brightness.conf and 10-nvidia.conf in /usr/share/X11/xorg.conf.d that disrupted the setup. Additionally, the 10-nvidia-drm-outputclass.conf file is also not necessary.

After removing all 3 of those config files, now only 10-evdev.conf, 10-quirks.conf, 11-nvidia-offload.conf, 40-libinput.conf, 70-wacom.conf are left in /usr/share/X11/xorg.conf.d. In particular, the 11-nvidia-offload.conf is generated by gpu-manager. This finally got rid of the black screen and now I can use the GUI again.

Hopefully this helps anyone who face a similar problem.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.