Setting Up an eGPU on Ubuntu

How we can expect things to work

Checkout your BIOS

Setup Nvidia drivers

sudo apt-get install nvidia-driver-435
sudo echo 1 > sudo /sys/bus/thunderbolt/devices/0-0/0-1/nvm_authenticate

Select the Nvidia prime profile

nvidia-settings

Configure the driver

sudo nvidia-xconfig --prime
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 660"
BusID "PCI:9:0:0"
Option "AllowExternalGpus" "True"
EndSection

Verify the setup

$ glxinfo | grep vendor
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

Add back your built in GPU

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
Section "Device"
Identifier "iris"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection

Usability

Troubleshooting

  • Screen is blank when in eGPU mode — Double check the configuration above. Make sure that you have ‘AllowExternalGpus’ set.
  • I have a login screen but it never switches to the Nvidia driver. Verify that you have enabled the prime profile in nvidia-settings.
  • Screen work in eGPU but blank when not in eGPU mode — Verify your setup for the built in Intel GPU.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Matt Kubilus

Matt Kubilus

Doer of different things, problem solver