Internal display freezing on startup with eGPU

Hi I am hoping someone would be able to help me. I have recently purchased an eGPU for research and displaying output to my monitor, but encountering a pretty large issue.

The problem

My internal display freezes on startup. During the boot process, only the internal display works, but right before the login screen it freezes on the ubuntu splash screen. The external display becomes connected and displays the desktop at the moment the internal display stops working.

How the issue was caused

After performing the first time set up of the eGPU and the RTX 3070, the entire OS would hang just before the login screen. I.e., the internal display would freeze as described above, and the external display would not show anything. I had to follow this guide, which consisted of adding nomodeset as a boot option in grub.

After this, only the internal display was working, even though all current Nvidia drivers were installed. On running nvidia-smi, the processes tab showed No running processes found. To fix this, I downloaded and ran this script, ‘egpu-switcher’ which changes the etc/X11/xorg.conf to (I assume) support running the external display with the eGPU. After performing these steps, upon reboot the internal display freezes as originally described.

Solutions tried

  • Flash updating BIOS, no effect
  • Reinstalling all NVIDIA drivers, no effect
  • Installing bumblebee, no effect (although I didn’t know how to use it)
  • Removing egpu-switcher, which reverted to previous behaviour where only the internal display was working

The solution I want

Either the GPU/NVIDIA drivers to drive the internal display, or the internal display to be powered by my integrated graphics and then my external display to be powered by my dedicated GPU. Is that even possible?

My specifications

Ubuntu 20.04
Dell Latitude 7390 (intel integrated graphics)
Razer Core X Chroma eGPU
Monitor connected to GPU via DisplayPort

Other notes

The nvidia-smi output is

| NVIDIA-SMI 460.39       Driver Version: 460.39       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:08:00.0  On |                  N/A |
|  0%   37C    P8    15W / 220W |    482MiB /  7982MiB |     10%      Default |
|                               |                      |                  N/A |
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|    0   N/A  N/A      1601      G   /usr/lib/xorg/Xorg                 53MiB |
|    0   N/A  N/A      2810      G   /usr/lib/xorg/Xorg                231MiB |
|    0   N/A  N/A      2947      G   /usr/bin/gnome-shell               38MiB |
|    0   N/A  N/A      3423      G   /proc/self/exe                     13MiB |
|    0   N/A  N/A      3667      G   ...AAAAAAAA== --shared-files       30MiB |
|    0   N/A  N/A      8362      G   ...AAAAAAAAA= --shared-files       96MiB |
|    0   N/A  N/A      8793      G   gnome-control-center                3MiB |

I’m happy to provide any more detail if needed. Thank you to everyone in advance for their answers, I am an Ubuntu novice, so this has been really frustrating me recently.

The attached nvidia-bug-report.log.gz is here:
nvidia-bug-report.log.gz (420.7 KB)

Please run as root and attach the resulting nvidia-bug-report.log.gz file to your post.

Thank you for the prompt reply. I have attached it to an edit in the main post.

Please delete /etc/X11/xorg.conf and create /etc/X11/xorg.conf.d/10-nvidia-egpu.conf only containing

Section "OutputClass"
    Identifier "nvidia-egpu"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowExternalGpus" "True"

then remove the ‘nomodeset’ kernel parameter and reboot.

Edit: changed the identifier name.

Wow, thank you so much. This fixed the problem! I am surprised it was such a simple fix, considering the trouble I have been going through with it. Thanks again, I really appreciate you taking the time to look through and help me.