Results 1 to 3 of 3

Thread: Xubuntu 22.04 black screen when prime-select is set to nvidia or on-demand

  1. #1
    Join Date
    Nov 2021

    Xubuntu 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

    I also followed the to add a display setup script to do this:

    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, but that didn't work. describes a similar symptom on Ubuntu 20.04 and says no issues on Ubuntu 22.04, but I'm already on 22.04.
    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, but that didn't change the outcome.

    I also cleaned up all the stale xorg.conf files as suggested in, but that also didn't change the outcome.

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

  2. #2
    Join Date
    Nov 2021

    Re: Xubuntu 22.04 black screen when prime-select is set to nvidia or on-demand

    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.

  3. #3
    Join Date
    Mar 2010
    Ubuntu Development Release

    Re: Xubuntu 22.04 black screen when prime-select is set to nvidia or on-demand

    Strange. You said that 10-nvidia-conf was on of the files you removed, because it was causing problems with 22.04 and Linux Kernel 6.2.0-26-generic.

    Did you keep the contents of it so you can post the contents of it (to compare with mine, which is still default)?

    The reason I ask it that this is mine, which I am not having problems with...
    mafoelffen@msi-ubuntu:~$ ls /usr/share/X11/xorg.conf.d/
    10-amdgpu.conf  10-quirks.conf  40-libinput.conf
    10-nvidia.conf  10-radeon.conf  70-wacom.conf
    mafoelffen@msi-ubuntu:~$ apt list nvidia-driver-* --installed
    Listing... Done
    nvidia-driver-530/jammy-updates,jammy-security,now 535.86.05-0ubuntu0.22.04.1 amd64 [installed]
    nvidia-driver-535/jammy-updates,jammy-security,now 535.86.05-0ubuntu0.22.04.1 amd64 [installed,automatic]
    mafoelffen@msi-ubuntu:~$ grep . /usr/share/X11/xorg.conf.d/10-nvidia.conf
    Section "OutputClass"
        Identifier "nvidia"
        MatchDriver "nvidia-drm"
        Driver "nvidia"
        Option "AllowEmptyInitialConfiguration"
        ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
    mafoelffen@msi-ubuntu:~$ uname -r
    mafoelffen@msi-ubuntu:~$ lsb_release -d
    Description:    Ubuntu 22.04.3 LTS
    It was not having problems with Kernel 6.2.0-26 (though my laptop had other challenges where it would not reboot without going to the BIOS boot menu).
    Last edited by MAFoElffen; September 11th, 2023 at 04:54 AM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts