Setup & Software Discussions
A script to change Xorg config
 

A script to change Xorg config  

 of  4
  RSS

Sebulon
(@sebulon)
Trusted Member
Joined: 9 months ago
 

@mzo

What Ubuntu version are you running?

To remove the repo:

# sudo add-apt-repository --remove ppa:karli.sjoberg/gswitch-ppa

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


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

@sebulon

Thanks, later today I'll try again. I'm running 18.10 cosmic with the latest mainline kernel.

Regarding the Nvidia drivers, I still haven't managed to have them working. However, I found several posts of people that have exactly the same problem. I will try some of the solutions suggested.

My other problem is with my AMD dGPU. The amdgpu driver is not stable on my system. The card overheats and produces frequent kernel freezes. I tried countless solutions to fix this with no luck (including fresh ubuntu reinstalls, etc). The problem is even there when I boot Ubuntu from live usb (tried 18.04 and 18.10, same problem). I had my MacBook Pro inspected by Apple to check if there were hardware issues but it looked all good. That being said, if I understand correctly, the Nvidia Prime feature uses the dGPU (or iGPU when available) to render on the screen the graphic that is being processed by the external GPU. If that is the case, if I manage to have the Nvidia drivers loading, do you think my unstable dGPU problem will persist even though I'm using the Nvidia eGPU with your script?

Finally, I tried a workaround to activate the intel iGPU and use that instead of the dGPU because by default recent Mac hardware disable the iGPU if you boot anything that is not MacOS. This worked, the iGPU was used instead of the dGPU (resolving the kernel freezes issues). However, this solution was very "invasive" as it modifies EFI stuff and MacOS boot files and rendered MacOS irreversibly un-bootable (I had to do a fresh reinstall). This solution is discussed here:  https://sourceforge.net/p/refind/discussion/general/thread/84a55c48/

My plan is to fix the Nvidia drivers problem, and, through your script, use my Nvidia eGPU as my only graphic solution for Ubuntu. Do you think it's doable to use the eGPU for everything despite the iGPU being inactive and not recognized by default and the dGPU having driver problems?

Thank you!

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 9 months ago
 
Posted by: mzo

@sebulon

Thanks, later today I'll try again. I'm running 18.10 cosmic with the latest mainline kernel.

As I thought, that explains the issues you were having with the PPA. I have only submitted packages for "bionic", as that is the long term supported version. But I can invest the time to submit packages for "cosmic" as well, if you´re interested?

Posted by: mzo

... if I manage to have the Nvidia drivers loading, do you think my unstable dGPU problem will persist even though I'm using the Nvidia eGPU with your script?

It also explains why my instructions and the commands don´t work as you´re on a different Ubuntu version than what I have tested and know work. And the kernel included in "cosmic" is 4.18, so not much difference to the mainline 4.19 kernels I wanted you to install then. See below for answer about eGPU

Posted by: mzo

Do you think it's doable to use the eGPU for everything despite the iGPU being inactive and not recognized by default and the dGPU having driver problems?

Thank you!

The driver problems comes from using the hardware. If you are only using the eGPU then I would imagine the dGPU wouldn´t bother you any more. With that said, I cannot test this for you as I have a different computer than you have.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 9 months ago
 

Never mind, I got carried away and got packages published for "cosmic" too 😉

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


itsage liked
ReplyQuote
(@paul_griz)
New Member
Joined: 8 months ago
 

First off, thank you! I have a MSI GS73-Stealth-8RF laptop with both i7-8750H / GTX 1070 graphics integrated. 
I'm connecting a GTX 1080Ti with two monitors via the Sonnet eGFX Breakaway 550.


I tried to configure Nvidia Optimums and Nvidia Bumblebee drivers without success.
Next, I tried manually configuring two X Server configurations. This worked.
However, I had to make shell scripts to switch between sessions, and it was not stable. 
After wasting time trying to make this process seamless, I found this form and installed your program. 
You're program works perfectly!
  


If you would like, I'll design a logo for the program and write-up some documentation for the README. 


Edit you should make for the original post for new comers:
When you query for GPUs now:
nvidia-xconfig --query-gpu-info
A 1080ti GPU is now returned as: 1080 Ti with a space and a capital T.

My Hardware

Laptop: MSI GS73-Stealth-8RF
eGPU EnclosureSonnet eGFX Breakaway Box 550w
GPUGTX 1080 Ti


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 9 months ago
 
Posted by: Paul Griz

First off, thank you!

You're most welcome! I did it just for fun and it happened to be a successful project 🙂 

Posted by: Paul Griz

You're program works perfectly!

Yeay, that makes me so happy to hear! Of course I'm using it myself, so I know that it works for me but hearing it from others is awesome!

Posted by: Paul Griz

If you would like, I'll design a logo for the program and write-up some documentation for the README.

Heck yeah, go wild!  😀 Pull requests are most welcome!

Posted by: Paul Griz

Edit you should make for the original post for new comers:
When you query for GPUs now:
nvidia-xconfig --query-gpu-info
A 1080ti GPU is now returned as: 1080 Ti with a space and a capital T.

Very good to know, I'll edit that pronto!

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


itsage liked
ReplyQuote
(@richard_le)
New Member
Joined: 8 months ago
 

Hey Sebulon thank you so much, this script solve a big problem for me!!!

I have a question though I am away from my egpu right now and forgot to switch back to internal? after i log in it just loops. How do I get around this?

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
(@paul_griz)
New Member
Joined: 8 months ago
 
Posted by: Richard Le

Hey Sebulon thank you so much, this script solve a big problem for me!!!

I have a question though I am away from my egpu right now and forgot to switch back to internal? after i log in it just loops. How do I get around this?

How to Fix the Login Loop:

At the login screen, you can open a terminal before loading the GUI.

  1. Simply hit: CTRL+ALT+F1 
  2. Enter your login username
  3. Enter your password

From here, you can switch between your eGPU / Internal GPU:

  • For eGPU: sudo gswitch egpu
  • For Internal: sudo gswitch internal

Then, I suggest you reboot. 


Cool Tip: 

You can run up to 6 terminals by CTRL+ALT+F[X] where [X] is 1-6. Example: CTRL+ALT+F3 
To leave the terminal and load the GUI: CTRL+ALT+F7 

Final Notes: 

The CTRL+ALT+F1 command for launching a terminal at the login screen works for most desktop environments. 
If it isn't loading a terminal, just Google, "command line at login [X]" where [X] is your desktop environment.

My Hardware

Laptop: MSI GS73-Stealth-8RF
eGPU EnclosureSonnet eGFX Breakaway Box 550w
GPUGTX 1080 Ti


ReplyQuote
(@richard_le)
New Member
Joined: 8 months ago
 

thanks for pointing me in the right direction, ctrl + alt + f1 does not work for me on Pop OS! which is based of ubuntu. I currently unable to find command line log in for pop os via web search, so I have posted on their reddit forum and  awaiting their response

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 1 year ago
 

@richard_le

I do something like this to drop down to runlevel 3 before booting. Then run the gswitch command and restart normally.

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


ReplyQuote
(@richard_le)
New Member
Joined: 8 months ago
 

Does this apply to pop os?

Since they moved to systemd and do not use grub

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 1 year ago
 

I think the runlevel command should work even though run levels don't actually exist any more. Otherwise the systemd equivalent is the boot parameter 

systemd.unit=multi-user.target

this should work regardless of your bootloader so long as you're somehow able to add boot parameters.

This post was modified 7 months ago

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


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 1 year ago
 

In case anyone is looking for a way to avoid the above mentioned login loop in the future, I found using a modification of the script from this thread works. If you use my example xswitcher file from the post it basically just automatically calls gswitch at boot for you.

This post was modified 7 months ago

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


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 9 months ago
 
Posted by: nu_ninja

In case anyone is looking for a way to avoid the above mentioned login loop in the future, I found using a modification of the script from this thread works. If you use my example xswitcher file from the post it basically just automatically calls gswitch at boot for you.

Yeah, nice collaboration indeed!

I´m unsure however, if I´d like to have this thing just happen automatically. I mean, I´m not against it, it just feels like it is something I´d like to have total control over when and how the switch happens. At the moment of writing, the "xswitcher" script just counts the number of GPU's and triggers if the number is more than 1, which also would need improvement since my laptop, and many others have 2 builtin: 1 iGPU and 1 dGPU as well. It needs a more universal way of knowing if you have a GPU specifically coming over a thunderbolt connection. I´m also wondering how the script should "know" when it is being run at startup compared to when it is run on demand, to sort out whether or not it should trigger a restart of the login manager. Ideas, anyone?

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 1 year ago
 

@sebulon

I agree it feels wrong to use the script in that way. I could add a check using the command:

tbtadm devices

so that it requires a thunderbolt device to be connected?

Edit: looks like boltctl is actually the command that comes with Ubuntu
Edit2: Or maybe just checking for the bus ID from the xorg configuration file would be easiest? So do lspci | grep "[busID]"
Edit3: Changed my example.txt file to a check against the busID from the xorg configuration

This post was modified 7 months ago

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


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 9 months ago
 
Posted by: nu_ninja

@sebulon

I agree it feels wrong to use the script in that way. I could add a check using the command:

tbtadm devices

so that it requires a thunderbolt device to be connected?

Edit: looks like boltctl is actually the command that comes with Ubuntu
Edit2: Or maybe just checking for the bus ID from the xorg configuration file would be easiest? So do lspci | grep "[busID]"
Edit3: Changed my example.txt file to a check against the busID from the xorg configuration

First of all, sorry for not answering sooner, I have been trying to log in to this forum for like two weeks now, intermittently. I finally managed to get the password reset...

Yeah, something along those lines, just beware that 'lspci' and 'xorg' config use different '[BusID]' formats, which is why I've used the 'nvidia-xconfig' command to list the graphics cards. The output from 'lspci' is in hexadecimal form, whereas the '[BusID]' in the 'xorg'-config needs to be in decimal and I've just been to lazy to convert the output and used 'nvidia-xconfig' instead 🙂 In many cases, the hexadecimal and decimal output are the same, but in somecases, you might have a GPU with '0a:00:00' that has to be converted into '10:0:0'.

What's missing is how to figure out which card is the external one, without necessarily knowing what it is. I mean, 'lspci' and 'nvidia-xconfig' or whatever shows PCI devices and makes no distinction whether they are internal or connected via Thunderbolt. 'tbtadm' could solve that, but it's another dependency to worry about. Would be nicer to be able to figure it out without it though.

/Sebulon

This post was modified 7 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Spiro
(@spiro)
Active Member
Joined: 7 months ago
 

Hello everyone,

Sorry for repost (since I also posted on reddit) but I'm really confused with all of this because of variations in distro, gpu brand, TB version etc etc.

Could someone help me out? Really lost in this.

I have the following setup:
Linux Manjaro, kernel 4.19, DE Xfce
i7-8550, integrated intel uhd 620 (so, no discrete gpu which makes it easier I guess)
Thunderbolt 3
Mantiz Venuz + amd rx 580 and I want to use amdgpu and vulkan stuff.

Care to help me with a step by step? I've seen so many threads on so many places that I can't understand what to do in my particular case. I only want to have external display when egpu is plugged in.
How can I install the scripts (gswitch and others mentioned) given that I can't use ppa/deb on manjaro (arch derivative)? I need to build from scratch? Add something to config files manually? (Noob at tinkering with stuff on linux).
1 - plug in, find egpu with
lspci | grep VGA

2 - How to authrize the connection for TB3 using information from 1?
3 - How to install/add scripts (from ninja, sebulon or morv)??
4 - how to plug / unplug? (during boot, after,??)

I'm really desperate. Everywhere I look things are done differently. I just want it to work..... I'm not good at playing with the system at all.... I'll get you coffee!!!
Thanks in advance, kinda desperate.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Spiro
(@spiro)
Active Member
Joined: 7 months ago
 

Ok so I managed to install the scripts. I edited the xorg.conf.egpu to replace "amdgpu" and Bus ID (I got something like 09:00:0 which I also replaced in the conf.egpu. I guess it is correct value already? Took it from lscpi | grep VGA). I can use

sudo gswitch egpu

and

sudo gswitch internal

and I get the image through the external screen.

 

I only have 2 problems:

 

1 - the image on the external display blinks every "x" seconds. How can I solve this?
2 - after I do sudo gswitch internal, and get the image back on internal screen, am I supposed to unplug right after running the command or after I shutdown the laptop?

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 9 months ago
 

Hey @Spiro, welcome aboard!

Posted by: Spiro

I'm not good at playing with the system at all....

Not to be a downer here, I'm saying this in the most friendly, helpful way, that if you want "Just works", then Manjaro may not be the best fit for you? But if you're willing to endure the pain and do a lot of digging and research (trail and error, basically), then you also have the chance to learn a lot.

However, I believe that knowledge must be acquired by yourself, for yourself- I won't do your homework for you.

I will tell you this much though, there isn't a right way to do this, there are many. There aren't any "best practices". You have to figure out what works on the distribution you're currently using, they all have their quirks. And as my mother use to say "Break down, get back!". If you aren't getting anywhere, maybe taking a step back, use something "easier" for a while, to get a sense of why that's working and then try again. Stubbornness is the key. Stubborn as hell 🙂

This post was modified 7 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Spiro
(@spiro)
Active Member
Joined: 7 months ago
 

Thank you @Sebulon !!
You were referring to my first reply I guess?
Did you see my second reply to this thread? Just above yours. I got almost everything working!!

 

Only issue is the external screen blinking/flickering when egpu is connected. I've been trying a couple of stuff but still trying to figure it out. I've seen related issues but not in the egpu context. Things related to power management, kernel boot parameters, xorg config options, drivers, etc etc. Some add to xorg an extra config with "radeon" instead of "amdgpu".

So I actually did the homework and your scripts were super important. I hope you don't mind but since Gswitch-GUI on my system had no app icon I chose your profile pic for app launcher. Works really well.

If I get this only issue solved I'll add my build including your links.

This post was modified 7 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 9 months ago
 
Posted by: Spiro

Thank you @Sebulon !!
You were referring to my first reply I guess?
Did you see my second reply to this thread? Just above yours. I got almost everything working!!

 

Only issue is the external screen blinking/flickering when egpu is connected. I've been trying a couple of stuff but still trying to figure it out. I've seen related issues but not in the egpu context. Things related to power management, kernel boot parameters, xorg config options, drivers, etc etc. Some add to xorg an extra config with "radeon" instead of "amdgpu".

So I actually did the homework and your scripts were super important. I hope you don't mind but since Gswitch-GUI on my system had no app icon I chose your profile pic for app launcher. Works really well.

If I get this only issue solved I'll add my build including your links.

My reply regarded both actually, let me clarify. If you're stuck but confident you have done everything as "right" as you possibly can, taking a step back and trying out another distro gives a good perspective. Let's say you try out Kubuntu 18.04, install my PPA and the gswitch packages, change the driver from "nvidia" to "amdgpu" and it works, without any flickering or anything. Then you can start comparing; why does it work now, but not before? It's just software you know, nothing magic about it. Same software, but perhaps different build options, versions are different, etc, etc. Those things. And I'm not talking about my stuff, but all of the stuff around it.

Regarding the icon image, as long you keep it a secret from Production I.G, neither of us are going to get sued for copyright violation 🙂

Good luck with it!

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


itsage liked
ReplyQuote
(@michael_watkins)
Active Member
Joined: 6 months ago
 

I finally got this working my only issue is the switching doesn't seem to work too well. My screen just blinks and never actually loads. It just freezes and I have to reboot manually by pressing the power button .

Pending: 2018 Lenovo X1 Extreme / Razer Core v2 my signature to give context to my posts


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 1 year ago
 

In my experience, how well the switching works depends on your display manager. Lightdm works great, gdm3 doesn't always work so well.

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


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 9 months ago
 
Posted by: Michael Watkins

I finally got this working my only issue is the switching doesn't seem to work too well. My screen just blinks and never actually loads. It just freezes and I have to reboot manually by pressing the power button .

Hey man, glad you got it working! For me that happens when I plug the eGPU in after I've booted. If I plug it in before booting it up, the switching works no problemo 🙂

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
(@john_ryan)
New Member
Joined: 6 months ago
 

Sebulon buddy! Thanks for the information. I spent about 8 hours trying to get multiple GPUS to work. After authorization I had connectivity to the eGpu but I could not get any display. I was about to give up and accept I would only be able to use it headless, when I saw your post. What I needed was your xorg.conf.egpu file. I never ever considered just setting it up for the eGpu only. Silly me. Good work on your app!

john

Dell Precision 5520 Anniversary Edition
Sonnet Breakaway Box 650
Nvidia Titan X (pascal)


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 9 months ago
 
Posted by: John Ryan

Sebulon buddy! Thanks for the information. I spent about 8 hours trying to get multiple GPUS to work. After authorization I had connectivity to the eGpu but I could not get any display. I was about to give up and accept I would only be able to use it headless, when I saw your post. What I needed was your xorg.conf.egpu file. I never ever considered just setting it up for the eGpu only. Silly me. Good work on your app!

john

Thanks man, you're welcome! I must say however that it's a real team effort, I didn't come up with it originally, I found it in this fine forum you're visiting 🙂

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


itsage liked
ReplyQuote
(@michael_watkins)
Active Member
Joined: 6 months ago
 

Is this working at all under Solus Linux?

Pending: 2018 Lenovo X1 Extreme / Razer Core v2 my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 9 months ago
 

I have no idea, haven't tested. The distributions it is on are Ubuntu Standard- and Kubuntu 18.04/18.10 and Linux Mint 19. I am trying to edit the top-post to include that but it doesn't work. Very strange...

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
(@welly_wu)
Active Member
Joined: 6 months ago
 

Hello. I am a new member here so I hope that someone sees my new reply.

I own a mid-2018 Huawei Matebook X Pro laptop.
I installed Ubuntu 18.04.2 64 bit LTS GNU/Linux successfully.
It has an Intel 620 UHD iGPU and nVidia Geforce MX150 2 GB GDDR5 GPU at 10 Whr.
I own an AKiTiO Node with an ASUS ROG STRIX AMD Radeon RX 580 8 GB OC GPU.
I added sebulon's ppa, but I can't find the PCI busID for my Intel Thunderbolt 3 connected AMD RX 580 GPU.
In GDM3 and GNOME3, the Thunderbolt 3 indicates that it is connected and authorized.
I changed the Intel Thunderbolt 3 to a secure connection within my UEFI. Secure Boot is disabled.

Here is some more useful basic information:
[email protected]:~$ nvidia-xconfig --query-gpu-info | grep -i -A 3 'RX 480' | awk '/PCI BusID/{print$4}'
[email protected]:~$ sudo inxi -G
[sudo] password for wellywu: 
Graphics:  Card-1: Intel UHD Graphics 620
           Card-2: NVIDIA GP108M [GeForce MX150]
           Card-3: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X]
           Display Server: X.Org 1.20.1
           drivers: nvidia (unloaded: fbdev,vesa,nouveau) FAILED: modesetting
           Resolution: 3000x2000@60.00hz
           OpenGL: renderer: GeForce MX150/PCIe/SSE2
           version: 4.6.0 NVIDIA 390.116
[email protected]:~$ sudo lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
08:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X] (rev e7)
[email protected]:~$

[email protected]:~$ nvidia-xconfig --query-gpu-info
Number of GPUs: 1

GPU #0:
  Name      : GeForce MX150
  UUID      : GPU-b474be56-2056-392f-d325-1436d5324ea9
  PCI BusID : PCI:1:0:0

  Number of Display Devices: 0

[email protected]:~$

Look, I am an experienced GNU/Linux end user especially with regards to Ubuntu, but I am new to eGPUs. This is my first one that I own today. What do I need to know and to change to get this to work?

I found out more technical information to share and I want to ask a question later on:

[email protected]:/etc/X11$ sudo lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
08:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X] (rev e7)
[email protected]:/etc/X11$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x71 cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 4 associated providers: 1 name:modesetting
Provider 1: id: 0x4a cap: 0x6, Sink Output, Source Offload crtcs: 6 outputs: 5 associated providers: 1 name:Radeon RX 580 Series @ pci:0000:08:00.0
[email protected]:/etc/X11$ DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Radeon RX 580 Series (POLARIS10, DRM 3.27.0, 5.0.0-050000-generic, LLVM 7.0.0)
[email protected]:/etc/X11$ DRI_PRIME=0 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) 
[email protected]:/etc/X11$

This is my xorg.conf.egpu file. Does it look correct?

Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "Device0"
    Driver "amdgpu"
    BusID "PCI:08:00.0"
    Option "AllowEmptyInitialConfiguration"
    Option "AllowExternalGpus" "True"
EndSection

I opened up the terminal and I typed in sudo gswitch egpu and I typed in yes to reload, but I got a black screen. I tried CTRL+ALT+F1 - F7, but I still kept seeing a black screen. Something isn't working. Can someone please reply and give me good support? Thanks.

This post was modified 6 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 1 year ago
 

Your busID should be formatted as "PCI:8:0:0" change that and see what happens

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


ReplyQuote
(@welly_wu)
Active Member
Joined: 6 months ago
 

Let me ask a dumb question here. I do not have an external monitor connected to my AKiTiO Node and ASUS ROG STRIX AMD Radeon RX 580 8 GB OC GPU. I noticed that the xorg.conf.egpu configuration has the modeselect which disables the internal screen according to my research. I want to be able to use my eGPU with my internal screen in Ubuntu GNU/Linux. Is that even possible?

Anyway, here is my edited xorg.conf.egpu file. Please take a look to see if the changes that I made are correct or not. Please suggest fixes based on the information that I previously shared. Thank you. Here it is:

Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "RX580"
    Driver "amdgpu"
    BusID "PCI:08:0:0"
    Option "AllowEmptyInitialConfiguration"
    Option "AllowExternalGpus" "True"
EndSection

This time it worked, but 3D graphics hardware acceleration is super slow. I took a picture as proof and here it is:

Screenshot from 2019 03 10 23 24 54

This post was modified 6 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 9 months ago
 

Hi @welly_wu, glad you got it working!

Sorry to hear the graphics acceleration is so slow for you, I have no idea why unfortunately. Seems like AMD support still is lacking 🙁 For me, with a Akitio Node 3 and NVIDIA 1060, the accel is three times better than with the Quadro M1000M dGPU in the laptop.

One difference is that you have PRIME working, for me that never did anything. If you switch back to internal and run a game or something with "DRI_PRIME=1", does that work better?

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 9 months ago
 

@welly_wu

Maybe this explains it:
https://www.notebookcheck.net/Huawei-has-pulled-a-Dell-the-MateBook-X-Pro-uses-a-gimped-Thunderbolt-3-port.316550.0.html
"Aside from utilizing the slower '1D12' variant of the GeForce MX150 GPU, we've since discovered that the laptop is also utilizing only half the PCIe lanes for its single Thunderbolt 3 port. Thus, its PCIe x2 Thunderbolt 3 port is only capable of providing a maximum of 20 Gbps instead of 40 Gbps when compared to a standard Thunderbolt 3 port with PCIe x4 lanes."

I was very picky with witch laptop to buy, specifically I wanted a laptop with a full 4x PCIe thunderbolt 3, witch is hard to come by. Here is a very good write-up from forum member @itsage:
https://egpu.io/ultrabook-buyers-guide-external-gpu/#pcie

And there's one more good list of 4x PCIe laptops from Lenovo specifically:
https://www.reddit.com/r/thinkpad/comments/5ykwge/to_all_owners_of_thinkpads_with_thunderbolt_3/

I like Lenovo because the Thinkpad series always have had good Linux support and they don't seem to cheap out on the hardware. Most of their laptops have full 4x PCIe thunderbolt 3.

This post was modified 6 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


itsage liked
ReplyQuote
(@welly_wu)
Active Member
Joined: 6 months ago
 

This is one of the first times in my life in which I am using nVidia Prime technology on my fist Intel Ultrabook laptop so I have to research the DRI_PRIME=1 feature to prepend it to a 3D graphics software application or product in order to try it. Most of the time, I use sudo prime select internal for the Intel 620 UHD Graphics iGPU because it is much more energy efficient than choosing my nVidia MX150 GPU. When I plug in my AKiTiO Node via Intel Thunderbolt 3, I usually set it to use the Intel iGPU before plugging in the cable to use your gswitch program to select the eGPU. I wanted to take a break from working with the free and open source graphics stack and technologies to take a breather before I continue my ongoing research to learn how to use three different GPUs effectively in an Ubuntu GNU/Linux environment. Remember, this is the first time I owned an Intel Ultrabook and an eGPU product as well so this is all new for me to take in gradually. Once I resume my research, I am sure that I am going to be a quick study and this will come more naturally over time.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
(@welly_wu)
Active Member
Joined: 6 months ago
 

When I plug in my AKiTiO Node via Intel Thunderbolt 3 using my AMD Radeon RX 580 8 GB GPU, is there any way to check whether hardware based 3D graphics acceleration is enabled or if software rendering is being used? I suspect that software rendering is being used because graphics are far slower than my Intel 620 UHD Graphics iGPU which tells me something is not right. How do I check for these things and set them right?

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 1 year ago
 

I usually use glxheads or glxinfo to check what's doing the rendering.

I don't know what your setup is, but I use the DRI_PRIME=1 environment variable to accelerate the internal display or the gswitch script to accelerate external displays connected to the eGPU but not both at the same time.

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


ReplyQuote
 of  4