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

eGPU on Linux - Easy-to-use setup script  

 of  11
  RSS

Sebulon
(@sebulon)
Trusted Member
Joined: 2 years ago
 

@niirb

Glad to hear you got it working, awesome!

I just want to say that I find it strange that my tool works better for you than @hertg, when they are just as good, do very much the same things and in very similar ways. I suspect something else may have made the difference in your case, other than *just* the tool, but never mind, happy for you all the same!

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
niirb
(@niirb)
Active Member
Joined: 4 months ago
 

@sebulon, I would have assumed that as well. It doesn't make sense to me, especially when @hertg used your tool as a baseline for his. I am happy it just works in the end tbh.

 

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: 2 years ago
 

@niirb

Very glad to hear that you got it working with sebulon's script! 🙂

@sebulon
That's indeed quite strange, since the whole xorg.conf switching is pretty much the same in both scripts.

Because it sounded like some kind of timing issue, i took a peak at your systemd script and spotted that we defined the WantedBy differently.
In your script you defined:

WantedBy=graphical.target

I've defined it as:

WantedBy=multi-user.target

Were you able to resolve an issue by changing that from multi-user to graphical in the commit 57b37c6?
I don't understand how this could be the cause of the issue, since multi-user.target is reached before graphical.target and therefore the script should run early enough.
But who knows, maybe that's actually the problem. 😀

Notebook: Lenovo ThinkPad X1 Extreme (GTX 1050 Max-Q Ti)
EGPU: Mantiz MZ-02 VENUS (GTX 1080)
OS: Arch (LightDM, AwesomeWM)


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 2 years ago
 

@hertg

Posted by: @hertg

That's indeed quite strange, since the whole xorg.conf switching is pretty much the same in both scripts.

Exactly!

Posted by: @hertg

Because it sounded like some kind of timing issue, i took a peak at your systemd script and spotted that we defined the WantedBy differently.

No, it had nothing to do with that, it was actually @nu_ninja that had an issue with a BIOS flash gone wrong on a graphics card and wanted systemd to stop firing the script when *not* in 'graphical.target', haha! But yeah, maybe that's it and we solved this issue totally unknowingly! Awesome! 😎

https://github.com/karli-sjoberg/gswitch/pull/3

 

This post was modified 3 months ago

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

.

ReplyQuote
niirb
(@niirb)
Active Member
Joined: 4 months ago
 

Hi!

I wanted to give both of you a bit of an update on my situation.

@Sebulon 's script is not wokring that well on boot either anymore. Like it's a game, sometimes it boots and the gpu is picked sometimes it isn't and I end up with a laggy thing. However it does consistently work if I do "setup" -> "egpu". This is honestly enough for me, just that it's consistent and that I always have the same solution for making it work.

I have no clue why these things are happening so it must be something with the hardware as well. I'm running a Yoga 920 with Pop_os 20.04 and the eGPU is a Sonnet Breakaway Box 350w.

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: 2 years ago
 

@sebulon
Thanks for the link to the PR! I've just changed my systemd service to WantedBy=graphical.target too, i believe that makes sense.
I've also added a After=bolt.service to it, since the boltd (Thunderbolt daemon), probably needs to be started. so the eGPU is available on PCIe.
I'm hoping that this resolves some timing issues that users report occasionally.

@niirb

Sorry to hear that. Unfortunately, eGPUs on Linux can still be a bit finicky from time to time, even with the scripts from the community.
For example, I still have some weird issue sporadically where i need to manually restart the display-manager to make it work on my (non-eGPU) Thunderbolt 3 Dock in my office and I wasn't able to find the cause of that.

However, I've just released a new version 0.15.0 for my egpu-switcher where I specified the systemd order more specifically, which hopefully resolves some timing issues on bootup. Maybe you could give that a try and see if it changes anything for you?

 

Notebook: Lenovo ThinkPad X1 Extreme (GTX 1050 Max-Q Ti)
EGPU: Mantiz MZ-02 VENUS (GTX 1080)
OS: Arch (LightDM, AwesomeWM)


ReplyQuote
niirb
(@niirb)
Active Member
Joined: 4 months ago
 

Hi!

I'm looking to try your tool again, however I'm trying to use it only with a laptop now (no external display). If I run a command to set it up it tells me that I should force some internal display mode or something like that. How can I go about doing that?

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

.

ReplyQuote
nu_ninja
(@nu_ninja)
Reputable Member
Joined: 3 years ago
 

@niirb

With AMD cards on the internal display, you want to set the environment variable DRI_PRIME=1 to use the eGPU (sometimes a different number if you have a dGPU in your laptop, you can check the number by running: xrandr --listproviders), you can do this for a steam game by right clicking on the game and going to Properties>Set launch options and adding DRI_PRIME=1 %command% or in Lutris going to Configure>System Options and adding DRI_PRIME as the key and 1 as the value. For other applications you want to run on the eGPU, you can start the from the terminal like this: DRI_PRIME=1 application-name

Mid-2012 13" Macbook Pro (MacBookPro9,2) TB1 -> RX 460/560 (AKiTiO Node/Thunder2)
+ macOS 10.15+Win10 + Linux Mint 19.1

 
2012 13" MacBook Pro [3rd,2C,M] + RX 460 @ 10Gbps-TB1 (AKiTiO Thunder2) + macOS 10.14.4 [build link]  


ReplyQuote
bluehipy
(@bluehipy)
New Member
Joined: 1 month ago
 

@itsage, I am strugling hard with a similar setup, Dell XPS13 latop runing ubuntu 20.04, Razer COre X eGPU with GrForce GTX 1660 Super and an external display Dell.

I thiink nvidia drivers 440 or 450 work but I can't set the right xorg.conf and the one produced by the X -configure doesn't work.

I encounter flickers or inability to get rid of the login screen.

Would you mind sharing your xorg.conf?

 

or other advices in this topic 🙂

 

 

Thank you!

 

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

.

ReplyQuote
edgibbs
(@edgibbs)
New Member
Joined: 1 month ago
 

Hi, thanks for the script, but it didn't work for me (at least not yet). 

I am setting up a PNY GeForce 1660 in a VisionTek Thunderbolt 3 Mini eGFX external GPU.  My laptop is a Thinkpad P50 running Ubuntu 20.04.1 with an internal Nvidia Quadro M200M.  I'm using the Nvidia 450 driver.  I have 2 external Lenovo HD monitors plus the HD internal screen.  The monitors are connected to the laptop at the moment but I have also tried it with one connected to the eGPU.  I have authorized the eGPU in the Thunderbolt software.

Setup finds both GPUs, and I am able to set the 1660 as the primary eGPU.  Everything seems to work until I reboot, I get a blank screen on all 3 monitors.  Tried disconnecting the eGPU and rebooting, same thing.  The BIOS is normally set to Discrete graphics, but I tried setting it to Hybrid and it didn't help.  There is no option to completely disable the Quadro in BIOS.

I was able to recover by switching to a console and running the egpu-switcher cleanup script then rebooting.

Interestingly this all just works in Windows 10 (well, sort of).  If I boot Windows with the monitors connected to the laptop all three screens use the eGPU.  The performance is abysmal though, Superposition gets frame rates in the 2 to 3 FPS range at medium settings, I assume this is because I am driving 3 monitors both ways over the one TB 3 connection.  If I connect one monitor to the eGPU directly however after a reboot all 3 monitors work in Windows, and if I run the benchmark on the one connected to the eGPU directly I get OK frame rates (70 - 80 FPS).

I think I must be very close to getting this working - probably just a minor difference between 19.04 and 20.04 is what's stopping me.  The eGPU is recognized and I can see it with nvidia-smi, I just need to figure out how to tell X.org to use it.

Ed Gibbs

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

.

ReplyQuote
 of  11