Ubuntu 20.04 boot to black screen when selecting nvidia as prime after kernel update

I just have spent about a week tracking the same or similar problem down on 18.04.

The solution was so simple it almost made me cry over all the wasted time.

sudo vi /lib/modprobe.d/nvidia-kms.conf

This file was generated by nvidia-prime

Set value to 1 to enable modesetting

#options nvidia-drm modeset=0 was 1 I changed it to 0
options nvidia-drm modeset=0

If you allow nvidia_drm to change the mode on your display and it does not really know what type of display it is, it will use some generic values, resulting in a black screen. In my case, I did not want the nvidia driver to do anything to any display, as I was using it only for “compute.”

The actual display is being handled by “intel”.

Maybe it is no longer useful to you but after scouring the net for days and finding little of value, just crazy random solutions that made things worse, it may help save some pain for others.

1 Like