Cant boot up after installing drivers for 3070 on Dell 7390 laptop and Ubuntu 20.04

I recently purchased a Geforce RTX 3070 and a Razer Core X Chroma to house it, to run on my Dell XPS 13 2in1 7390 laptop running Ubuntu 20.04, kernel

ubuntu-drivers devices shows that I need nvidia-driver-460. I’ve tried installing via autoinstall, software&updates, or manually doing sudo apt-get nvidia-driver-460

Unfortunately, whenever I install the drivers, I am unable to reach the GUI login screen - I get the fsck message of XXX/YYY files clean when I try to boot up with the drivers installed - and have to purge the drivers via Ctrl-Alt-F2 and sudo apt-get purge nvidia in order to get back in. In the shell, nvidia-smi shows that the card is seen by the system, but no processes are running.

I’ve tried booting with nomodeset, disabling nouveau via /etc/modprobe.d, uncommenting WayLandEnable=true in /etc/gdm3/custom.conf, and any other suggestion I could find via googling / checking this forum. None of these make any difference that I can tell.

sudo prime-select nvidia always seems to be the default setting. Running prime-select on-demand allows me to boot up a GUI with the drivers installed, but no access to the card still. Here’s the nvidia-smi output at that point:

| NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 |
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
| 0 GeForce RTX 3070 Off | 00000000:2E:00.0 Off | N/A |
| 30% 37C P0 22W / 220W | 0MiB / 7982MiB | 0% Default |
| | | N/A |

| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
| No running processes found |

Does anybody have any further suggestions on what the issue may be?

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

It looks like Ubuntu is trying to configure the X server to run the desktop on the RTX 3070, but the NVIDIA driver by default refuses to allow desktops on external GPUs because the user experience isn’t great if the GPU is hot unplugged:

Jan 19 15:27:06: (WW) NVIDIA(GPU-0): This device is an external GPU, but external GPUs have not
Jan 19 15:27:06: (WW) NVIDIA(GPU-0):     been enabled with AllowExternalGpus. Disabling this device
Jan 19 15:27:06: (WW) NVIDIA(GPU-0):     to prevent crashes from accidental removal.
Jan 19 15:27:06: (EE) NVIDIA(0): Failing initialization of X screen

If you don’t care about that, you can override that behavior by adding

Option "AllowExternalGpus"

to the Device or Screen section of /etc/X11/xorg.conf.

Unfortunately, since your configuration is set automatically by Ubuntu you may need to disable or override its gpu-manager program in order to specify your own options.

Thank you! This seems to have solved the issue, I greatly appreciate it.

For the reference of others, I put it in /usr/share/X11/10-nvidia.conf rather than /etc/X11/xorg.conf, since this file already existed and had other settings specified.

1 Like