Laptop + EGPU + Ubuntu. My Experience

Today I got my Dell XPS 9350 working with 2 external monitors via an Aorus 1080 gaming box EGPU. There are some caveats, but for the guide read below (and skip over the reasoning section if you are only interested in the technical components).

Reasoning

My desktop is old and beat up. i5-750 CPU first put together in high school nearly 10 years ago (mid 2009 if memory serves correctly). Back then things were a bit different. I had my desktop for nearly everything, my cheap as possible netbook for class (although lets be honest, I never really used it for that) and Dropbox to sync my files.

In 2019 the landscape is different. I have a personal laptop (13" Dell XPS 9350), work laptop (what was a top specced Macbook Pro 6 months ago), that same desktop with a few alterations but same core motherboard + CPU, and finally an intel NUC that is surplus to needs and still in storage.

I also have 2 monitors (34" landscape and 27" portrait) on stands that are fantastic, although hooked up to the old desktop I never work on. The fantastic workspace is going to waste as I do all my work on my laptops. The compromise is that I would hook up a single laptop to a monitor, however that leaves one monitor unused and I have to then use my laptops keyboard + trackpad (or set up further more accessories). What would be ideal is the one stop dock.

I looked in to getting a thunderbolt 3 dock such as https://www.elgato.com/en/dock/thunderbolt-3, however it creeps up to $400 landed, and still has limitations such having to drive the external monitors off my laptops integrated graphics. In addition, any desktop I build will have to have a titan ridge card such as https://www.gigabyte.com/Motherboard/GC-TITAN-RIDGE-rev-10#kf to use the dock. It is 2019 and the best solution is feeding the video output back into the thunderbolt card before output. No thanks if I can avoid it. Additionally, requiring that card in addition to a graphics card would require > 2 PCI slots (as decent GPUs are at least 2 slots), meaning no small factor mITX build.

The solution I settled on was to get an Aorus gaming box 1080. A bit pricey at around $1k AUD, however its a decent price when you consider the alternatives (a separate dock + GPU). It comes with 4 USB ports (1 power only) so you can plug in your keyboard and mouse and have a 1 cable setup in theory. Added bonus of this is I can install Windows on my currently unused Intel NUC and hopefully have a somewhat capable gaming setup.

How to set up

This section is how I got it working. Later on I will tell you everything that didn't work.

  1. Install Ubuntu 18.04 LTS. 18.10 may also work, but I did not test. Ensure you are connected to the internet and install third party packages as it will save a lot of time later (probably optional, but I always do this).
  2. (Optional but recommended) Install standard system updates. There should be a pop up for system updater that prompts you to do this, and will ask for a reboot afterwards.
  3. Blacklist Nouveau drivers. I am unsure if this step is required, but I did it for safe measure (https://linuxconfig.org/how-to-disable-nouveau-nvidia-driver-on-ubuntu-18-04-bionic-beaver-linux)
  4. Plug in and authorise the EGPU. After plugging in, go to settings -> devices -> thunderbolt and you should see the graphics card listed. Ensure that Direct Access is turned to On and the device is Authorized. If you do not see your graphics card after it is powered on and plugged in to your laptop, it is likely a Bios issue. I didn't encounter this as I had already configured my bios when I previously ran from thunderbolt port directly to my monitor.
  5. Install ubuntu drivers with sudo ubuntu-drivers autoinstall. Right now this should install nvidia-driver-390 and related libraries.
  6. Reboot

This was actually surprisingly simple if you follow this golden path. However there are some catches.

Caveats

  • Graphics card is not used before Display Manager launches. That means you have to log in using your laptop screen, and then starts using the graphics card and your monitors
  • No hotplugging. I could not get hotplugging to work. That means that pulling out the cable causes your system to freeze, and plugging in the cable causes nothing to happen until a reboot
  • Lag on peripherals (supposedly). Only after I bought the gaming box did I read about USB lag when using the graphics card. I haven't run workloads on the graphics card yet so haven't experienced it yet. My keyboard feels a bit sluggish but my mouse is fine, so I guess that is just my mind playing tricks. I'm not gaming on Ubuntu so no big deal
  • Can not seem to get gnome shell operational. My laptop was initially running gnome shell, and after installing the graphics drivers my system was detecting the plugged in monitors and X11 was allocating them desktop space, but the monitors were saying "no signal". Only after reinstalling stock Ubuntu, then trying gnome shell was I able to recreate the issue, leading me to believe it is a gnome shell issue

Failures

I spent too long trying to get things  (hotplugging, different drivers, early boot) going before giving up. Here are a few things I ran into:

  • As said above, gnome shell appears a no go. This isn't a deal breaker for me given Ubuntu now essentially runs gnome since 18.04
  • I couldn't pick and choose or use newer graphics. If I added the nvidia apt repository for newer drivers and installed them, my external monitors weren't detected. Only nvidia-driver-390 seemed to do the trick
  • I couldn't manually install drivers with sudo apt-get install nvidia-driver-xxx. Same issue as above, but even trying driver 390 with this yielded problems. Rather than spending yet more time fighting this, I will let it be. In 3 years time when I need to reinstall my laptop OS, hopefully the state of things will be better
  • I couldn't get hotplugging working, despite others saying they were able to. In particular https://github.com/julianpoy/eGPUScripts seemed promising, although it just sent my laptop to a login loop. That's not a dig at the author, I appreciate the effort of writing and publishing these scripts, but EGPU on Ubuntu is still new tech with rough edges.

Summary

I probably could spend more time ironing out the issues, but it is good enough as is for me. Even 1 year ago this would have been a monumental task as support only came with 18.04 and kernel 4.13, so I appreciate the work that all the devs have put into making it so relatively simple.

Next up, I will try to get my work laptop working with this setup on MacOS. Stay tuned.

Subscribe to ha.mi.sh

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe