Notifications
Clear all

A script to change Xorg config  

 of  17
  RSS

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

Thanks for the inclusion, glad this function could be added. I built the remove function using the gnome and cinnamon desktops, but I'm hoping to install kubuntu or kde neon soon so I'll test it there too.

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

@nu_ninja, No problem man, sorry it took so friggin long! 🙂 

Well, if you're reinstalling anyway, you are now free to try out a different distro as well 😉

 

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

.

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

Hello,

Have a problem with my system and an eGPU (Sonnet Breakaway Box 750 with a GTX960 nvidia card).

Installing gswitch worked and it was able to switch between the internal INTEL and the nvidia eGPU as expected.

After I was running the eGPU and the nouveau drivers, I installed the nvidia proprietary drivers and rebooted.  The laptop hangs - blackscreen and won't boot to the GUI. Pulling out the TB3 connection and then CTRL+ALT+F1 gets me to a terminal login where I can then sudo gswitch internal and get back to my desktop using the INTEL GPU.

I think there's been a issue with the nVIDIA drivers install, what did I do wrong and how can I fix it?

TIA

--------------------------------------------------------------------------

Edit: Removing the nVIDIA 460.x drivers and installing the nVIDIA 390.x drivers allowed me to login using wayland only. 

$ glxinfo

Just hangs, not sure if I was using the eGPU - Gnome doesn't work; Ubuntu on Gnome doesn't work; Unity on Xorg has problems.

Pretty clear this is a nVIDIA driver issue with this card/eGPU combination. Any tweaks that I need to make to the xorg.conf.egpu file to fix this?

This post was modified 2 months ago

Sonnet Breakaway Box 750 | eGPU : nVIDIA GTX960 | iGPU : UDH 620 WHL (GT2)


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

@cement_head

Hey man!

What computer are you using, does it have a dGPU or is it just the Intel iGPU you can use, apart from the GTX 960? Also, what Ubuntu version are you running?

Do pay in mind that I'm a hardcore KDE user and have tested gswitch with Kubuntu, KDE Neon, openSUSE Leap and Tumbleweed, only with KDE in mind and never really bothered much about GNOME since it's just not my cup of tea. But I happen to have a spare SSD laying around that I could install and test your distro with, when I have some free time to spare.

I must say, I haven't ever tested with a GPU older than my GTX 1060, which is what I first started using external graphics with, so I can only say that in general, it should work. Hm, I remember that with my P50 that has a dGPU, I needed to use 'prime-select' (think it's called that in *buntu as well) to set the "nvidia", like "performance" setting for gswitch to work for some reason. Now, with my X280 that only has a iGPU to worry about, it's the opposite, I still run 'prime-select' but with option 'unset' for it to stop interfering with gswitch and let it do it's thing. And I need to rerun the same command whenever the graphics drivers are updated or else I get greeted by a black screen after reboot 🙂 

 

This post was modified 2 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
cement_head
(@cement_head)
Active Member
Joined: 1 year ago
 

@sebulon, Thanks for the response.  It was just the onboard Intel UHD WHL (GT2). I worked on it for several hours - couldn't make it work, and yeah, this card is probably too old. A major problem is that I simply cannot buy a GPU (for any kind of MSRP) - so I might wait until the pandemic/bitcoin chip shortage is over.

  I'm going to send the enclosure back and I was borrowing this old GPU card from a friend.  My view on using Ubuntu (LINUX) is that something either works, or it doesn't.  If it doesn't, it is usually not worth the time and effort to make it work and it's usually broken at a very basic level. Until a company makes a LINUX specific enclosure, I think eGPUs will be hit & miss for Ubuntu.

TL;TR

The Sonnet Breakaway Box 750 with Ubuntu 20.04 did not work for me with a System76 GalagoPro (galp3-c).

 

This post was modified 2 months ago

Sonnet Breakaway Box 750 | eGPU : nVIDIA GTX960 | iGPU : UDH 620 WHL (GT2)


ReplyQuote
cement_head
(@cement_head)
Active Member
Joined: 1 year ago
 
Posted by: @sebulon

Hey all!

For many users, eGPU is less than plug and play. In my case, I already have two internal GPU's, and have to fiddle with Xorg configs some way or another, and it's a pick and choose. You can have the onboard (either the integrated or the discrete) GPU render the laptop screen and have the eGPU render an external screen, or you can have the eGPU render both, or something else of your choosing, but not dynamically, sadly.

The way I've solved it is to have an Xorg config that makes the eGPU render both the laptop screen and any external screen(s) that may be connected and when I want to use the eGPU, I have:
https://github.com/karli-sjoberg/gswitch/blob/master/xorg.conf.egpu

And then create a symbolic link to /etc/X11/xorg.conf, plug in the eGPU, reload and done. But after a while, the manual steps started to bore me and remembered the old saying: "One time is none. Two times is a script!"
https://github.com/karli-sjoberg/gswitch

And then I got a "little" carried away and wanted to learn how to write QT GUI applications Smile Thing is, I can´t learn just by reading the documentation and look at examples, I have to have "a mission" to set out on and this was the perfect task to get me going!
https://github.com/karli-sjoberg/gswitch-gui

And then I wanted to make the installation process even easier for new users, so I invested some time to learn how to make .deb packages out of the binaries:
https://github.com/karli-sjoberg/gswitch-deb
https://github.com/karli-sjoberg/gswitch-gui-deb
So you can clone, edit and then build these packages yourselves! I have setup a PPA for this to make the process as easy as humanly possible!

Here's how to set it up in Ubuntu:

[Please login to see this]

Or if you're running openSUSE:

[Please login to see this]

Just replace the version with whatever you're running. If something's missing or not quite right, give me shout and I'll make sure to fix it!

Then you run the friendly setup routine:

[Please login to see this]

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

[Please login to see this]

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

[Please login to see this]

It will reload and you can disconnect the eGPU.

Or if you´d rather want to use the GUI, open your applications menu and look under System 😉

This package also comes with automatic detection of eGPU at boot!

After gswitch has been configured and you've got the switching set up, simply run 'systemctl enable gswitch' and it will configure the eGPU automatically when you boot. It will also switch back to internal if you've by accident forgotten to before leaving and found yourself stuck at a black screen; no more!

Yeah, that happened once too many Smile

Hope it helps!

PS. If you have something you feel could be done better, we can discuss the changes here, then for the actual code, pull requests are warmly welcome!

How does one completely uninstall/remove/purge the gswitch & gswitch-gui packages and configurations? TIA

 

Sonnet Breakaway Box 750 | eGPU : nVIDIA GTX960 | iGPU : UDH 620 WHL (GT2)


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

@cement_head

Running this should be enough:

[Please login to see this]

 

Oh, and you may also want to remove the repo. Here's an article that shows you how to do that:

https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/

 

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

.

ReplyQuote
Z3stra
(@z3stra)
New Member
Joined: 3 months ago
 

I am on Ubuntu 20.10 and gswitch seems not to have an release candiate for that version. Any hints? Thanks!

[Please login to see this]

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

@z3stra

Hey dude! I usually only publish for LTS but if someone asks nicely, I'll add whatever you want 🙂 Launchpad is a little wonky and says the build should start in two hours, but I don't know, we'll see. Definitely by tomorrow at least

 

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

I have updates I'd like to share. Nothing big and revolutionary perhaps, but it's shaping up to feel like a decent software package by now, and it only took, what, three years!? Smile

The latest batch of changes started with fixing a minor bug for people that tries to use their own custom templates and have more than one "Driver" in the config but the rest are commented out. I fixed the issue but was told that basically all the problems was only down to bad shell syntax and that running a linter- and changing everything it was whining about- would solve everything. Of course I know that's ridiculous, but I took it as a challenge and rewrote every single little nitpick it had, and some of the things was actually quite fun fixing, that really required you to think about what the shell was actually doing, in ways you really don't think about, even though you know them.

It was then that I broke display detection, because I always forget that stupid newline with printf Smile Thanks to @nu_ninja for being there! I've made sure you have proper mentions:
https://build.opensuse.org/package/show/home:Sebulon/gswitch
https://launchpadlibrarian.net/537392680/gswitch_0.10.2_source.changes

Then I've invested some time digging through the script and taking a hard look at all of the commands that are used and putting them down as dependencies in the packaging. It's so easy to assume that all distros are the same, then for some stupid reason, openSUSE doesn't include 'bc'! I mean, who does that!? The monsters! But now, if anyone else gets any bright ideas and drops another essential linux tool, they'll be there as dependencies in my package, forcing their way back into your lives once again, and all is well in the world.

Lastly, I've put some safety measures into place, that I'm honestly not sure why I haven't done until now. Things like, you shouldn't be able to switch to egpu without running setup first, or at least having you own template in place beforehand. Or getting ugly error messages in your face just because it's the first time running the script and it screams at you for not having a template in place, before even having run the setup routine that creates it, stuff like that. Also curious to know if it's possible to move all distribution's configuration into '/etc/X11/xorg.conf.d', which would be nicer than clobbering people's 'xorg.conf' files, if they have them, but I'm too chicken to do all of that at once, so I settled for making the configuration directory variable more modular, so it's easier to change according to any distribution's needs.

I think that's enough for a while Smile

This post was modified 1 month ago

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

.

nu_ninja liked
ReplyQuote
 of  17