EXSUM: External GPU on Ubuntu
I have started playing with an external GPU setup. While I originally used mobile workstations I later shifted towards working more against cloud VMs/BMs and GPU-enabled Kubernetes clusters as well as on-prem workstations, since mobile workstations quickly become outdated and drain the battery quite severely even when GPUs are not required. Nvidia driver and Optimus issues are another topic in itself. One interesting experiment I finally found the time for is using an external GPU (eGPU) with a Thinkpad as depicted below:
Nvidia’s instructions from 2020 still worked well for me and seem more sane than many of the sometimes convoluted other tutorials on the web. The summary of what I ran is:
# Update sudo apt-get update # Note that dist-upgrade does not update Ubuntu version sudo apt-get dist-upgrade # Connect eGPU via Thunderbolt and authorize it in Thunderbolt settings # Install Nvidia drivers from additional drivers sudo apt-get install nvidia-cuda-toolkit # Uncomment/enable line "WaylandEnable=false" in /etc/gdm3/custom.conf # Add (space and) 3 to string for GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub sudo update-grub # Reboot into runlevel 3 (since we added 3 above) sudo shutdown -r now # Try GPU works nvidia-smi # Add line Option "AllowExternalGpus" "True" to /usr/share/X11/xorg.conf.d/10-nvidia.conf # Remove the 3 from /etc/default/grub and repeat the known procedure to reboot sudo update-grub sudo shutdown -r now # Retry GPU now works in standard Gnome session nvidia-smi
In general, this seems like an interesting option. The only minor caveats I found so far are i) that I had to disable SecureBoot along the line, since otherwise my nvidia-smi would not work, even though I tried to generate a key to sign the driver as well as ii) that the option is bulkier than a discrete GPU (dGPU) both in space and in connectivity overhead. I don’t even rule out that I might try this on RHEL and use it for actual development at some point, but for now it was an insightful side experiment.
Leave a ReplyWant to join the discussion?
Feel free to contribute!