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
 

Hey hey hey!

Amazing what a weekend can do for a hobby project 🙂 'gswitch-gui 0.3' is now enhanced to be able to call the setup routine directly from the GUI!

Screenshot available on the github page:
https://github.com/karli-sjoberg/gswitch-gui

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


ReplyQuote
(@hang245141253)
New Member
Joined: 3 months ago
 

I can't edit the BusID, click "setup" again, BusID is still 00:02.0

what should I do?

 

# hang @ hang-NUC8i7BEH in ~ [13:41:23]
$ lspci |grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Device 3ea5 (rev 01)
07:00.0 VGA compatible controller: NVIDIA Corporation Device 1f02 (rev a1)

# hang @ hang-NUC8i7BEH in ~ [13:41:27]
$ sudo gswitch setup
[sudo] hang 的密码:
BusID: 00:02.0 VGA compatible controller: Intel Corporation Device 3ea5 (rev 01)
BusID: 07:00.0 VGA compatible controller: NVIDIA Corporation Device 1f02 (rev a1)
Which of these cards is your eGPU?
Please type in the BusID, e.g: 00:02.0
07:00.0
Setup complete!

# hang @ hang-NUC8i7BEH in ~ [13:42:19]
$ sudo gswitch setup
BusID: 00:02.0 VGA compatible controller: Intel Corporation Device 3ea5 (rev 01)
BusID: 07:00.0 VGA compatible controller: NVIDIA Corporation Device 1f02 (rev a1)
Which of these cards is your eGPU?
Please type in the BusID, e.g: 00:02.0

# hang @ hang-NUC8i7BEH in ~ [14:56:39]
$ $ DRI_PRIME=0 glxinfo | grep "OpenGL renderer"
zsh: command not found: $

# hang @ hang-NUC8i7BEH in ~ [14:56:40] C:1
$ DRI_PRIME=0 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics (Coffeelake 3x8 GT3)

# hang @ hang-NUC8i7BEH in ~ [14:56:49]
$ DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
libGL error: failed to create dri screen
libGL error: failed to load driver: nouveau
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics (Coffeelake 3x8 GT3)

# hang @ hang-NUC8i7BEH in ~ [14:56:54]
$ lspci |grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Device 3ea5 (rev 01)
07:00.0 VGA compatible controller: NVIDIA Corporation Device 1f02 (rev a1)

# hang @ hang-NUC8i7BEH in ~ [14:57:03]
$ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x45 cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 3 associated providers: 0 name:modesetting

This post was modified 3 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
 

@hang245141253

So you've got it set up but you haven't actually switched. There's one step to set it up, which you've made, and another step to switch over:

$ sudo gswitch setup
$ sudo gswitch egpu

And when you want to switch back:

$ sudo gswitch internal

Please note that the setup step only needs to be done once! The "BusID" printed is just what it says, an example, nothing more.

This post was modified 3 months ago

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


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

Hey!

Update for 'gswitch-0.4':
Minor fix in the 'boot' routine, to make it reload only when needed. Before this, it reloaded every time you booted, you could see the messages printed in the console and it stole a couple of seconds each time. Eventually it annoyed me enough to get it sorted 😉

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


nu_ninja and itsage liked
ReplyQuote
itsage
(@itsage)
Famed Member Admin
Joined: 3 years ago
 

@sebulon I tried gswitch with an Alienware 13 R3 + Vega Nano today and it worked great! I'd like to clarify what the [internal] button does. My guess was it switches to the internal GPU of the host system. This AW13R3 has both Intel HD Graphics 630 iGPU and Nvidia GTX 1060 dGPU. My current distro is Pop_OS! 19.04 which has the ability to switch off GTX 1060 dGPU to save power. It's an amazing feature which helps this laptop last 10 hours on battery! Windows cannot match half that. The issue is a login loop when I switch between eGPU and Internal. It's stuck at the login screen. I can boot into the Desktop successfully with eGPU connected. Booting the laptop without eGPU requires switching to [internal] first. Otherwise it hangs at black screen. Thank you!

This post was modified 2 months ago

Best ultrabooks for eGPU use

eGPU enclosure buying guide


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

@itsage

That looks a lot like what you can do with "NVIDIA X Server Settings":

Screenshot 20190619 183827

For me, switching only works on "Performance Mode" for some reason. With "Power Saving Mode", I have the same problem as you. 

What graphics mode are you in when you get the login loop, "High Performance" or "Battery Life"?

This post was modified 2 months ago

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


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

The laptop would always be in [Balanced] mode when first powered on. When running off the battery I use it in [Battery Life] mode. While connected to the charger I have it in [High Performance] mode. Regarding the login loop, I believe it occurs in both modes. Switching modes does not activate Nvidia GTX 1060 dGPU. Do you think having the dGPU active and [High Performance] mode would prevent login loop?

This post was modified 2 months ago

Best ultrabooks for eGPU use

eGPU enclosure buying guide


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

@itsage

Yes, I believe so, at least that's how it is for me 🙂

Please test and report back if [High Performance] mode makes the login loop go away!

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


ReplyQuote
itsage
(@itsage)
Famed Member Admin
Joined: 3 years ago
 

@sebulon I switched my GTX 1060 dGPU back on and set the laptop to High Performance mode. Unfortunately it was still struggling with the login loop.

Best ultrabooks for eGPU use

eGPU enclosure buying guide


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

Booting the laptop without eGPU requires switching to [internal] first.

Oh, now I get it, you're not using the boot service, right? That explains the entire thing, yes, of course it loops when your eGPU isn't connected if you switched over to that before rebooting, or whatever.

# systemctl enable gswitch

That'll do the trick! 🙂

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


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

Thank you for figuring out what I was doing wrong. Adding gswitch to boot service resolves login loop now! 😀

Best ultrabooks for eGPU use

eGPU enclosure buying guide


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

Hello everybody!

Coming back from my summer vacation there have been about 200 downloads, now close to a thousand downloads since I started graphing the PPA, and no replys here, no issues on GitHub etc. How cool is that!? 🙂 This tells me that most users just don't have any issues, which is awesome!

I noticed a weird issue on my P50 the other day. I had changed in BIOS from "Hybrid Graphics" to "Discreet Graphics" because when using internal graphics in Hybrid and plugging in HDMI to the laptop, for some reason, the HDMI audio output just isn't there. I just wanted to plug my laptop into a TV and watch a movie but the sound just kept coming out of the laptop speakers which is so "meh" I had to google and someone had written that you have to change the Video settings in the BIOS to Discreet Graphics. It sounded really strange that would have anything to do with it but I went ahead and did it, and just like that the audio device was there and I could freely toggle the sound to come out of the TV. Success! Or so I thought...

A few days later when I felt like a little gaming, I plugged the eGPU in and rebooted, gswitch did what it's supposed to do, but now all I got was a black screen staring at me and the only change I could think of was that BIOS setting. I rebooted and changed it back to Hybrid and sure enough, everything worked flawless again. So weird... I don't know whether this is something specific to the P50 or the Akitio Node but it seems to be a known issue that no one is interested in fixing:
https://www.akitio.com/faq/303-why-does-my-thunderbolt-3-device-no-work-with-the-lenovo-p50-or-p70-laptop

So I'm writing this here as a mental reminder: If you want HDMI audio output directly from the laptop - Discreet Graphics. But for eGPU - Hybrid.

Take care!

/Sebulon

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


ReplyQuote
 of  4