Cobra Forum

Linux => Installation & Upgrades => Topic started by: kalpana on Oct 07, 2023, 03:16 AM

Title: Xubuntu 22.04 black screen when prime-select is set to nvidia or on-demand
Post by: kalpana on Oct 07, 2023, 03:16 AM
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 https://wiki.archlinux.org/title/NVI..._graphics_only.

I also followed the https://wiki.archlinux.org/title/NVIDIA_Optimus#LightDM to add a display setup script to do this:

Code:
#!/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 https://forums.developer.nvidia.com/...pdate/219727/6, but that didn't work.

https://forums.developer.nvidia.com/...107gl-a/258049 describes a similar symptom on Ubuntu 20.04 and says no issues on Ubuntu 22.04, but I'm already on 22.04.

https://www.reddit.com/r/openSUSE/comments/rubeqp/nvidia_optimus_black_screen_when_typing_sudo/?rdt=46936 describes a similar problem on openSUSE but I don't see a concrete solution there.

I also tried to make the driver load earlier by embedding it into initrd, as described in https://forums.developer.nvidia.com/...artup/168262/2, but that didn't change the outcome.

I also cleaned up all the stale xorg.conf files as suggested in https://forums.developer.nvidia.com/...-950m/160485/4, but that also didn't change the outcome.

At this point I'm out of ideas. Any pointers would be greatly appreciated. Thanks!