Notifications
Clear all

A script to change Xorg config  

 of  14
  RSS

nu_ninja
(@nu_ninja)
Reputable Member
Joined: 2 years ago
 

That list is referring to the package with both the AMDGPU and AMDGPU-PRO drivers as it says just above on that page. Maybe the WX cards aren't unsupported with the open source driver only but I think they're clearly intended to be used with both the AMDGPU and AMDGPU-PRO drivers from the package on that page.

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
nu_ninja
(@nu_ninja)
Reputable Member
Joined: 2 years ago
 

From the install overview:

  • Pro: recommended for use with Radeon Pro graphics products.

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
Sebulon
(@sebulon)
Trusted Member
Joined: 2 years ago
 

@nu_ninja

I agree it's a tricky question, but reading the man page for amdgpu says:
"The amdgpu driver supports SI and newer families' video cards."

"SI" supposedly stands for Southern Islands, which looking at this wiki-page covers just about every card after AMD bought ATI:
https://en.wikipedia.org/wiki/List_of_AMD_graphics_processing_units

How I interpret this, is if something's *not* working as intended with the open source amdgpu driver, a bug-report is in order. Because it should "just work".

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

.

ReplyQuote
mzo
 mzo
(@mzo)
Active Member
Joined: 4 years ago
 

 

 
Hi, I’m planning to try your solution above in order to use my eGPU to render the laptop screen. I also have a iGPU + dGPU configuration. My late 2016 MacBook pro 13,3 (15 inch w Touch Bar) is setup as tri-boot with macOS HS, win 10 and Ubuntu 18.10 with kernel 4.19. I have an eGPU Nvidia 1080ti with Akitio thunder 3 mod’ed. For now I’ve been using the eGPU with MacOS and Win10. I’m now trying to set this up under Linux.

 

I have a question about what drivers to use. At the moment I’m using the open source ppa by Oibaf to keep amdgpu updated. But on top of that I also installed another ppa (graphics drivers ppa) that uses proprietary Nvidia drivers. In this way, when I connect the egpu it is now recognized while with the Oibaf ppa alone  (that uses nouveau drivers for Nvidia) the egpu wasn’t recognized. However, now both open source and proprietary Nvidia drivers are in the system and I believe they are causing conflicts.

 

The point of using Oibaf ppa is that amdgpu seems more stable with that driver than with the Ubuntu standard. However, my goal would be to configure Xorg so that: if eGPU is not present, then use iGPU only. If eGPU is present, then use it exclusively while the other two GPUs are disabled. So dGPU would always be disabled, while I will choose if booting with iGPU or eGPU as primary card depending on what software I’m planning to run on that session.

 

In order to achieve that, how would edit the Xorg conf file? Once edited will I still be able to use your script to automate the switch?

 

Finally, what drivers shall I use? The idea would be to purge Oibaf ppa and use standard Ubuntu drivers for the iGPU and proprietary Nvidia drivers for eGPU. Is this the right way to go?

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
Sebulon
(@sebulon)
Trusted Member
Joined: 2 years ago
 

Hey man!

I´m by no stretch an expert, I just shared what worked for me, and _may_ work for others, no guarantees!

I think your plan sounds sane, like what I do. I have added the graphics drivers PPA from here, perhaps the same one you have:
https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa

And installed the 410 version of the nvidia driver. Not sure if that was really needed but it´s done.

If I had an AMD card, I would´ve stuck with the driver that comes with the distro, as that seems to be reasonably up to date and more importantly supported and integrated with it. Adding unsupported PPA's is something I´m extremely weary of, since it may or may not break stuff down the line when the PPA maintainer finds another fancy or get hit by a bus, or whatever. I want my machine to be rock friggin solid. I´m too boring to sit and tinker with stuff now. I´ve grown past that learning part of my life when something like Arch would have been cool. Nowadays, I know how that stuff works, I concede to the wisdom of the distro's package maintainers (that mostly get stuff done "right" anyways) and just want to sit down and game or whatever 🙂 I have my FreeBSD servers to play with 🙂

You can use my xorg config just like it is, no additional config lines are necessary when using any Ubuntu derivative. Just make sure to change the "BusID" accordingly and use my script when you want to switch the graphics to the eGPU and back. Do you know how to get that going or do I need to explain in more detail?

HIH

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

.

ReplyQuote
mzo
 mzo
(@mzo)
Active Member
Joined: 4 years ago
 

Hi again, thanks for clarifying about drivers. Regarding the Xorg.conf and the script, yes if you could provide more details that would be great as I’m pretty new to Linux. 

In particular, I understand the I can use your Xorg.conf.egpu variation for using the egpu. But what about the regular Xorg.conf file to load the iGPU? At the moment, I don’t have any Xorg configuration file. In fact, the kernel loads up the dGPU (which I don’t want because runs too hot and tends to crash the system). So how should my standard Xorg.conf look like in order to load the iGPU only, when Im not using xorg.conf.egpu to load the egpu? Thanks 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
Sebulon
(@sebulon)
Trusted Member
Joined: 2 years ago
 

That´s quite alright, I figured as much 🙂

You don´t need any xorg.conf when you don´t want to use the eGPU, that´s what´s good about it. Regarding the dGPU, what you´re asking is how to disable it completely; that I don´t know. But that´s not how these things work either. In PC's, you can in BIOS/UEFI choose like "Hybrid Graphics" or "Discrete Graphics". Hybrid _enables_ both i- and d-GPU and then you just _use_ the iGPU and let the dGPU be, and that´s what you´ll be doing. You will not _use_ the i/d-GPU when you plug in the eGPU (after running the script), but they will be enabled. That´s the difference. Hope I explained that so it makes sense...

Since you´re a beginner. I´ve scripted the process for you to minimize the potential error:

# wget  https://raw.githubusercontent.com/karli-sjoberg/egpu/master/gswitch_setup.sh  -O gswitch_setup.sh
# chmod +x gswitch_setup.sh
# sudo ./gswitch_setup.sh

Then you need to check what PCI BusID the eGPU gets _after_ plugging it in to the laptop:

# nvidia-xconfig --query-gpu-info | grep -i -A 3 '1080ti' | awk '/PCI BusID/{print$4}'

If you are happy with the output, we store it in a variable and edit the xorg template:

# BUS_ID=$(nvidia-xconfig --query-gpu-info | grep -i -A 3 '1080ti' | awk '/PCI BusID/{print$4}')
# sudo sed -E -i "s/BusID.*$/BusID          \"${BUS_ID}\"/" /etc/X11/xorg.conf.egpu

After that you´re all set! When you want to use the eGPU, you just run:

# sudo gswitch egpu

The laptop will reboot, so make sure to save everything open before doing so! And when you´re done, you run:

# sudo gswitch internal

It will reboot and you can disconnect the eGPU. Simple as that.

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
Sebulon
(@sebulon)
Trusted Member
Joined: 2 years ago
 

I should probably edit the top post, since scripting is a lot less error prone, but I´ll let you be cannon fodder first, haha 😀

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

.

ReplyQuote
mzo
 mzo
(@mzo)
Active Member
Joined: 4 years ago
 

@sebulon

Thank you so much! I’m going to try this over the weekend. I’ll let you know how it goes.

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

.

ReplyQuote
Morv
 Morv
(@morv)
Eminent Member
Joined: 4 years ago
 

I tested your script last evening on Arch Linux and a HP Omen Graphics Accelerator. I didn't want to reboot so I thought that I basically just need to restart the XServer and this is done by restarting your display manager. So I replaced every "reboot" with a "`systemctl restart lightdm`" and it worked, kind of. It's interesting because I get all the monitors connected to my eGPU displayed and usable but they're fired by the Intel iGPU which is apparently too weak for FullHD + 2x WQHD or it's just the Plasma desktop being slow. The inserted AMD gpu is not used at all, tried with glxspheres64 on one external monitor.

What I would like to ask you, as your script is working for you otherwise: Could you do the same to the script(insert your displaymanager of course) and test what the outcome is for you? I didn't get to try the reboot method yet because I have to manually authorize the eGPU after connecting and ran out of time yesterday. Will try that probably this evening or some time over the weekend.

Edit: Ok, the reboot method doesn't change a thing. So restarting the display manager should be enough but my config doesn't fit the setup apparently.

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
 of  14