eGPU
Installation
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.
Follow the official user manual provided by Razer Core X for hardware installation (or see this video).
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.
Debugging Log
Thunderbolt Connection
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
lspci
to check PCI devices, and it is expected to see both part one and part two.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.
NVIDIA Driver
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.)
Approach One
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 erroriwlwifi BIOS contains WGDS but no WRDS
or 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.conf
to 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.
Approach Two (not recommended; use as the last resort)
Go to NVIDIA official website to download the corresponding driver installer. (As mentioned before, better to install the best compatible version, as the latest is not necessarily the best.)
As the requirement of the installer, we have to exit X-server and keep only the terminal up running without GUI. See this post for more information. Then run the installer using
sudo
privilege.The above two steps are collected from the Internet. I haven't tried either and therefore I am not sure what issues may happen.
Tools
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
.Once the NVIDIA driver is installed, we can use command
nvidia-smi
to check the status of the graphic card.
For the record, the alternative command-line command for driver updates in Ubuntu is
sudo ubuntu-drivers devices
. In this case, we can see thatnvidia-driver-460
is the recommended driver, though this latest/recommended driver is not compatible in our case as mentioned before.
Last updated