Using NVIDIA eGPU on Linux with a Dock Station

Edoardo Rosa
3 min readJul 16, 2021

--

Physical Setup

Call Digit TS3 Plus

This guide is intended for a Call Digit TS3 Plus connect to a Razer Core X case with a Zotac NVDIA GeForce 1070 but it should be feasible to perform the same steps for other configurations.

Connect the Raze Core X to the Thunderbolt 3 port on the back of the dock station (the one at the bottom center) so that the traffic is forwarded to the PC using only a single cable (the one connecting the dock to the PC).

Now connect the external monitor/s to the eGPU inside the Razer Core X case. In this way the external GPU can managed the output on the monitor/s.

Finish connecting the other peripherals on the dock station (i.e. mouse, ethernet cable, keyboard, etc.).

Although this is not an ideal configuration is the only way to use the eGPU having a single Thunderbolt port on the PC.

It’s should be noted that some dock station do not allow this kind of “passthrough” and my limit the overall performance on the graphic card.

Service installation

First of all on your Linux distro (in this guide I’ll use Ubuntu 20.04) install openrazer to install the required drivers on the system.

On Ubuntu 20.04:

sudo apt install software-properties-gtk
sudo add-apt-repository ppa:openrazer/stable
sudo apt update
sudo apt install openrazer-meta

Once installed autostart the service on the user login:

systemctl --user enable --now openrazer-daemon.service

Now the Razer Core X and the NVIDIA GPU should be detected by the system but no NVIDIA driver is installed.

Check that the service started correctly,

Driver installation

Using the Ubuntu utility install the NVIDIA driver:

sudo ubuntu-drivers install

Before rebooting open the NVIDIA Settings program (nvidia-settings) and select to use the Intel Integrated Graphic Card on default.

Now reboot so that the system can spawn the Xorg server without problem.
If you have Secure Boot enabled the BIOS will ask you to enroll the driver key.

On the MOK Management screen press “Enroll Key” and then continue the boot.

Configuration

Once logged in install egpu-switcher to create the Xorg configuration to use the eGPU on the Razer Core X:

sudo add-apt-repository ppa:hertg/egpu-switcher
sudo apt update
sudo apt install egpu-switcher

Now start the setup:

sudo egpu-switcher setup

The program will ask you to first select the INTERNAL GPU: dismiss this configuration with N and proceed selecting the eGPU.

Now the tool’s generated the Xorg configuration in /etc/X11/ .

Select to auto switch to the eGPU or the internal GPU automatically with

sudo egpu-switcher switch auto

Now checkout if the Xorg configuration files are generated and are correct.

The tool should have created:

  • /etc/X11/xorg.conf.internal: an empty file
  • /etc/X11/xorg.conf.egpu: file with the specified BusID (check the ID with lspci’s output) of the eGPU and the driver to use
  • /etc/X11/xorg.conf: link file used to specify what configuration to use

Usage

Now everything should be configured but remember that the card switching should not be made “on the fly” but requires a system reboot.

If you need to configure the NVIDIA card, for example enabling overclocking, you could addthe CoolBits on the Xorg eGPU file.

Conclusion

Now you can connect your PC using a single thunderbolt cable to the dock station and use the eGPU without further configurations; and, if you do not want to attach the PC, the internal GPU is automatically selected.

--

--

Edoardo Rosa
Edoardo Rosa

Written by Edoardo Rosa

Security Engineer: loving cloud, red teaming and automation

No responses yet