eGPU on Linux Ubuntu 19.04 - Easy-to-use setup script
 
Notifications
Clear all

eGPU on Linux Ubuntu 19.04 - Easy-to-use setup script  

 of  9
  RSS

hertg
(@hertg)
Active Member
Joined: 1 year ago
 

@itsage
Did using the Nvidia 418 driver resolve any of your issues?
Thanks for the feedback, i think there's a bug in my script where i detect if the egpu is connected (It probably doesn't understand the Bus-ID "PCI:10:0:0").
Will try to fix that soon, when i've got time. With that bug, the automatic detection probably won't work on your system.

Notebook: Lenovo ThinkPad X1 Extreme (GTX 1050 Max-Q Ti)
EGPU: Mantiz MZ-02 VENUS (GTX 1080)
OS: Ubuntu 19.04


itsage liked
ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

@nando4 @itsage At your discretion, perhaps it would be good to link this post under how-to or software for Linux in the top header.

purge-wranglertbt-flashpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance

Master Threads:
2014 15-inch MacBook Pro 750M
2018 15-inch MacBook Pro

 
2019 13" MacBook Pro [8th,4C,U] + RX Vega 64 @ 32Gbps-TB3 (Mantiz Venus) + macOS 10.14.6 & Win10 [build link]  


itsage liked
ReplyQuote
itsage
(@itsage)
Illustrious Member Admin
Joined: 4 years ago
 
Posted by: mac_editor

@nando4 @itsage At your discretion, perhaps it would be good to link this post under how-to or software for Linux in the top header.

I added this thread to the Top Nav Menu just now.

external graphics card builds
best laptops for external GPU
eGPU enclosure buyer's guide

 
2020 13" MacBook Pro [10th,4C,G] + RTX 2080 Ti @ 32Gbps-TB3 (AORUS Gaming Box) + Win10 2004 [build link]  


ReplyQuote
OliverB
(@oliverb)
Noble Member
Joined: 2 years ago
 
Posted by: itsage
Posted by: mac_editor

@nando4 @itsage At your discretion, perhaps it would be good to link this post under how-to or software for Linux in the top header.

I added this thread to the Top Nav Menu just now.

This is great! Thank you.

Perhaps, if we do some changes, I would suggest to alter this guide at little. For me it looks a little bit too complicated and meanwhile outdated. This may be just my opinion. Perhaps somebody else shares this opinion, too? @mac_editor?

2018 15" MBP & 2015 13" MBP connected to RTX2080Ti GTX1080Ti GTX1080 Vega56 RX580 R9-290 GTX680

 
2018 15" MacBook Pro (RP560X) [8th,6C,H] + RX 5700 XT @ 32Gbps-TB3 (ASUS XG Station Pro) + Win10 & macOS 10.15.4 [build link]  


ReplyQuote
hertg
(@hertg)
Active Member
Joined: 1 year ago
 

Update
I just released version 0.9.0, you can update with the following command.

sudo apt update
sudo apt --only-upgrade install egpu-switcher

I fixed the issue where EGPUs on double digit PCI-Lanes weren't detected properly.
Also added a little 5s delay for the detection on startup. I realized that the script somehow ran before the EGPU could even connect to the computer, i hope that doesn't happen anymore.

Notebook: Lenovo ThinkPad X1 Extreme (GTX 1050 Max-Q Ti)
EGPU: Mantiz MZ-02 VENUS (GTX 1080)
OS: Ubuntu 19.04


DrEGPU, OliverB and itsage liked
ReplyQuote
OliverB
(@oliverb)
Noble Member
Joined: 2 years ago
 

@hertg
My sincere compliments! Great work.

2018 15" MBP & 2015 13" MBP connected to RTX2080Ti GTX1080Ti GTX1080 Vega56 RX580 R9-290 GTX680

 
2018 15" MacBook Pro (RP560X) [8th,6C,H] + RX 5700 XT @ 32Gbps-TB3 (ASUS XG Station Pro) + Win10 & macOS 10.15.4 [build link]  


ReplyQuote
rstrube
(@rstrube)
Active Member
Joined: 2 years ago
 

This is really fantastic, thank you!

I've taken some of the other scripts that have been posted here and modified them with some extra features.  One thing that I found really useful was affecting the /usr/share/vulkan/icd.d files (used by vulkan applications).

My problem is that I have a Dell XPS 9575.  This system has an Intel iGPU, a dedicated AMD GPU (Vega M) and then when I have my eGPU enabled (Nvidia RTX 2070) I have the following files in that directory:

  • nvidia_icd.json
  • intel_icd.i686.json
  • radeon_icd.i686.json
  • intel_icd.x86_64.json
  • radeon_icd.x86_64.json

And many vulkan applications (think games running via DXVK) don't allow you to manually select which vulkan icd to use.  Lutris now has this feature, but for those of you that want to guarantee that a specific GPU is used, the best approach is to move the other files to another temporary directory.  In my case I move them to a directory called /usr/share/vulkan/icd.d/egpu-helper-backup

If I don't do this most applications tend to pic the AMD GPU (which is discrete, but certainly not as fast as my eGPU).

I've integrated this into this script: https://gitlab.com/rstrube/linux_mercury/blob/master/supporting/egpu-helper/egpu-helper

You can see that if the user passes in 'egpu' as a parameter, in addition to doing the xorg symlinking, it also will move any Intel and AMD icd files to a backup directory (and any nivida icd files from the backup directory and back to the main icd.d directory).

Perhaps you could integrate this into the script? I think the complicated part is that the files you move will vary based on an indiviuals setup.  For me I move Intel and AMD icd files when running my eGPU, but for others this might not be the case. In your case you have two nividia GPUs (the laptop's discrete and the eGPU one), so you would need to keep the icd file for nvidia and just move the Intel one (I believe, although I'm not sure?).

I'd also be happy to try to come up with a nice solution and open a PR.

Let me know your thoughts!

Edit: One other thing I was curious about, when the eGPU is not connected, you're specifically use an xorg.conf.internal file that would use (for example) the "intel" driver, and modsetting for the other GPUs (if you picked the Intel iGPU as your INTERNAL GPU).  I believe it's now recommended to just use modesetting for Intel iGPUs.  See this except from the Arch wiki:

https://wiki.archlinux.org/index.php/Intel_graphics

Note: Some (Debian & UbuntuFedoraKDE) recommend not installing the xf86-video-intel driver, and instead falling back on the modesetting driver for fourth generation and newer GPUs. See [1][2]Xorg#Installation, and modesetting(4). However, the modesetting driver can cause problems such as Chromium Issue 370022. Also, the modesetting driver will not be benefited by Intel GuC/HuC/DMC firmware.

Perhaps the best course of action would just be to not have any xorg.conf in the event that the user does not have their eGPU connected and let Xorg figure things out?

This post was modified 1 year ago

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

itsage liked
ReplyQuote
Madlink
(@madlink)
New Member
Joined: 1 year ago
 

I'm using an Aorus Gaming Box with a GTX 1080 on a Razer stealth  and this worked beautifully.
thank you so much

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
hertg
(@hertg)
Active Member
Joined: 1 year ago
 

@rstrube
That sounds really interesting, altough i do not have any experience with vulkan whatsoever. 

I would be happy to integrate this, but i need to know if this is a really specific setup you have, or if there are other people with the same kind of setup and use-case.
It's important to me that i can keep the script as generic as possible and most importantly that it stays as simple as possible.

That being said, if we can define how the script detects if the user has a vulkan setup (maybe ask him in the setup process),
and define a generic naming-convention for the files (maybe by adding the bus-id to the filename?) it might really be a useful extension.

Is the setup you have, with the *.json files for your different GPUs, a standard type of setup or did you come up with that?
Does vulkan automatically select a json file from /usr/share/vulkan/icd.d/, no matter what its name is?

Regarding the modesetting config, good point.
As you may have seen, I'm using the same xorg.conf template for the external and the internal GPU, and just replace the driver and bus-id.
Did i understand correctly, that it is recommended for the Intel integrated graphics to not having specified the driver at all, and instead just use the modesetting driver?

Your suggestion to not create an xorg.conf.internal file could be a good idea.
But there may be people that want to add custom xorg configurations when running on the internal GPU, therefore we still need some kind of xorg.conf.internal.
Perhaps we could leave the xorg.conf.internal file empty, if the user selects the Intel integrated graphics as internal GPU.
What are your thoughts about that?

You seem to be well informed about the topic, so thanks alot for the input!

Notebook: Lenovo ThinkPad X1 Extreme (GTX 1050 Max-Q Ti)
EGPU: Mantiz MZ-02 VENUS (GTX 1080)
OS: Ubuntu 19.04


ReplyQuote
sandblau
(@sandblau)
New Member
Joined: 1 year ago
 

Thank you so much. Its working great with a Dell XPS 9370, Razer Core X and a Nvidia 1080. External or internal Display ist working. Thank you, amazing work.

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
 of  9