Comment on page
In the following, we will show an example of installing eGPU (NVIDIA GTX Titan X + Razer Core X enclosure) on a Intel NUC computer with Ubuntu 18.04 operating system.
In summary, there are four steps.
- Before installing NVIDIA drivers, make sure you can see the NVIDIA graphic card in PCI device list by command
lspci. If not, go to BIOS settings, make sure Thunderbolt Controller is enabled, and Thunderbolt Security is disabled or in Legacy Mode.
- Once the graphic card is detected, we can proceed to install NVIDIA drivers. Open System Settings --> Software & Updates --> Additional Drivers, select the best compatible one for NVIDIA drivers and click Apply Changes button. (You may try different options and Apply Changes, until one of it finally works.)
- Once the installation is finished, reboot the computer. You may also want to reconnect the monitor to one of the display ports on eGPU (instead of the HDMI port on NUC we used previously).
For more details, please continue to read the following debugging log.
- At the beginning, I was not able to see the graphic card in PCI device list (by command
lspci). This has been resolved by switching to Legacy Mode for Thunderbolt Security Level in Intel BIOS settings. (In some BIOS settings, there might be an option to disable Thunderbolt Security, which is equivalent to the Legacy Mode.)
- In details, we can run command
lspcito check PCI devices, and it is expected to see both part one and part two.
- # part one: indicate if the thunderbolt controller is working02:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)03:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)03:01.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)03:02.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)04:00.0 System peripheral: Intel Corporation JHL6340 Thunderbolt 3 NHI (C step) [Alpine Ridge 2C 2016] (rev 02)6c:00.0 USB controller: Intel Corporation Device 15db (rev 02)# part two: indicate if the NVIDIA card is detected05:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)06:01.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)07:00.0 VGA compatible controller: NVIDIA Corporation GP102 [TITAN X] (rev a1)07:00.1 Audio device: NVIDIA Corporation GP102 HDMI Audio Controller (rev a1)
- If you cannot see part one, make sure the thunderbolt controller is enabled in BIOS or somewhere else. If you cannot see part two, you might need to go to the BIOS settings to disable Thunderbolt Security, or set it to Legacy Mode.
- There are two approaches to install NVIDIA drivers. The first one is recommended and is the safest, since it keeps the integrity of Ubuntu package management software. However, if it doesn't work for you, you can try the second approach. (In other words, approach one is to install from Ubuntu official repository, and approach two is to install from NVIDIA official repository.)
- Open System Settings --> Software & Updates --> Additional Drivers, and select the best compatible NVIDIA driver (latest is not necessarily the best) and click Apply Changes button. Once the installation is finished, reboot the computer and check if it works.
- In my case, probably due to the old graphic card (GTX Titan released in 2015) or the OS (Ubuntu 18 instead of 20), the latest NVIDIA driver didn't work for me. I have tried 460, 450, and 418. Neither works. The xorg option is an open source solution provided by Linux community (not NVIDIA), and it not recommended. In the end, only the 390 driver works for me.
- The issues I had during this process are the following. With the latest 460 driver, I can see the NVIDIA graphic card connected by command
nvidia-smi. However, it is always idle there and I was not able to ask Ubuntu to switch to this graphic card. Also, I had to connect eGPU after booting Ubuntu, otherwise it will pause at the booting step with an error
iwlwifi BIOS contains WGDS but no WRDSor simply blinking cursor. (To proceed, I had to unplug eGPU from thunderbolt port and connect it again after booting.)
- I have also tried to create a new file in
/etc/X11/xorg.conf.d/nvidia.confto force the system to use NVIDIA card. However, this turned out to be a dangerous operation and it made me not able to enter the system again. I guess this overwrote the default display option of Intel integrated graphic card in the booting step. In the end, I had to boot from a USB device to delete this file.
- The above two steps are collected from the Internet. I haven't tried either and therefore I am not sure what issues may happen.
- To check which graphic card is currently in use. One option is to open System Settings --> Details (or About This Computer), and check the Graphics item. The other option is to use command
- glxinfo | grep -e "OpenGL vendor" -e "OpenGL renderer"// then you can see the followingOpenGL vendor string: NVIDIA CorporationOpenGL renderer string: TITAN X (Pascal)/PCIe/SSE2
- Once the NVIDIA driver is installed, we can use command
nvidia-smito check the status of the graphic card.
NVIDIA Card In Use
NVIDIA Card Not In Use
- For the record, the alternative command-line command for driver updates in Ubuntu is
sudo ubuntu-drivers devices. In this case, we can see that
nvidia-driver-460is the recommended driver, though this latest/recommended driver is not compatible in our case as mentioned before.