Setup & Software Discussions
Xorg config for Arch linux; Dell XPS 9360 TB3
 

Xorg config for Arch linux; Dell XPS 9360 TB3  

  RSS

(@snugghash)
New Member
Joined: 1 year ago
 

Greetings,
I've been looking around and this one critical piece of info is not anywhere except where I found it - in the Xorg logs for some arcane config. This needs to be added to the official sticky perhaps.

To get eGPU working with external monitor and internal one disabled:

  • Install the correct version and build of drivers (nvidia or nvidia-dkms or equivalent for other makes)
  • Use something like the following for the Xorg config:
Section "Module"
 Load "modesetting"
EndSection

Section "Device"
 Identifier "nvidia"
 Driver "nvidia"
 BusID "PCI:6:0:0"
 Option "AllowEmptyInitialConfiguration"
 Option "AllowExternalGpus"
EndSection

The critical thing is the `Option "AllowExternalGpus"`. The existence of this isn't documented on the threads on nvidia support, or on egpu.io. First section turns off the internal display. If that's missing the systemd output will stay on internal display screen, frozen. Nothing else is necessary, no DM config files, or nvidia-xconfig, or adding drivers to KMS, or using secure TB3 like Da_blitz's guide suggests. Once nvidia-smi works, this should be it - no bumblebee necessary either.

This was particularly infuriating because nvidia-xsettings --query-gpu-info recognizes the external monitor. Yet xrandr doesn't. And using most configs crashes Xorg with a multitude of errors, from "No screens found" to "no usable config", to "Failed to get display number from pipe". All were rabbit holes.

I doubt I missed something in my scouring of the internet, but you're welcome to point it out if so.
Thanks

EDIT:
So as it turns out, keeping bumblebee installed uses the LLVM software rendering for X. Not what we want. Uninstall LLVM, use the standard modesetting params in the DM startup config files to get X rendered by the graphics card. And as a bonus, we also get extended displays in this config.

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


nu_ninja and itsage liked
ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 2 years ago
 

I know this post is 2 months old, but I found it useful so for any passers-by this was the final step in getting my RX460 recognized and used in Linux Mint 19. See my signature for build post. I used the following config text:

Section "Device"
     Identifier "AMD"
     Driver "amdgpu"
     BusID "PCI:10:0:0" ##ID in decimal, convert from hex if necessary
     Option "AllowEmptyInitialConfiguration"
     Option "AllowExternalGpus"
EndSection

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


ReplyQuote
nix8
 nix8
(@nix8)
Active Member
Joined: 11 months ago
 
Posted by: snugghash

Greetings,
I've been looking around and this one critical piece of info is not anywhere except where I found it - in the Xorg logs for some arcane config. This needs to be added to the official sticky perhaps.

To get eGPU working with external monitor and internal one disabled:

  • Install the correct version and build of drivers (nvidia or nvidia-dkms or equivalent for other makes)
  • Use something like the following for the Xorg config:
Section "Module"
 Load "modesetting"
EndSection

Section "Device"
 Identifier "nvidia"
 Driver "nvidia"
 BusID "PCI:6:0:0"
 Option "AllowEmptyInitialConfiguration"
 Option "AllowExternalGpus"
EndSection

The critical thing is the `Option "AllowExternalGpus"`. The existence of this isn't documented on the threads on nvidia support, or on egpu.io. First section turns off the internal display. If that's missing the systemd output will stay on internal display screen, frozen. Nothing else is necessary, no DM config files, or nvidia-xconfig, or adding drivers to KMS, or using secure TB3 like Da_blitz's guide suggests. Once nvidia-smi works, this should be it - no bumblebee necessary either.

This was particularly infuriating because nvidia-xsettings --query-gpu-info recognizes the external monitor. Yet xrandr doesn't. And using most configs crashes Xorg with a multitude of errors, from "No screens found" to "no usable config", to "Failed to get display number from pipe". All were rabbit holes.

I doubt I missed something in my scouring of the internet, but you're welcome to point it out if so.
Thanks

EDIT:
So as it turns out, keeping bumblebee installed uses the LLVM software rendering for X. Not what we want. Uninstall LLVM, use the standard modesetting params in the DM startup config files to get X rendered by the graphics card. And as a bonus, we also get extended displays in this config.

This config works for me (no bumblebee) while the eGPU is plugged in. X won't start when I'm running the internal GPU (intel UHD 620), such as when I unplug from my desk (after fully shutting down) to go mobile. I have the XORG config in `/etc/X11/xorg.conf.d/10-egpu.conf`--if I delete this file when booting without the eGPU, X works fine.

Has anyone seen anything like this?

Also, unrelated: has anyone figured out how to make this setup plug-and-play? I'd like to be able to unplug and go back to the internal GPU without rebooting.

2018 13" Macbook Pro w/ TouchBar, Sonnet Breakaway box 650, Radeon Vega 64 (MSI), LG 34wk95u-w


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 2 years ago
 

@nix8

Are you using Nvidia? I assume you are from the bumblebee comment. If so check out this thread which seems to give a nicer setup using the proprietary drivers. If not I get the same issue using my amd card and will post a build guide with a plug and play solution soon when I have time.

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


ReplyQuote
nix8
 nix8
(@nix8)
Active Member
Joined: 11 months ago
 
Posted by: nu_ninja

@nix8

Are you using Nvidia? I assume you are from the bumblebee comment. If so check out this thread which seems to give a nicer setup using the proprietary drivers. If not I get the same issue using my amd card and will post a build guide with a plug and play solution soon when I have time.

Yep, I have a 1080 inside a Sonnet Breakaway Box 650, using the nvidia drivers on Arch Linux. I'll check out that thread, thanks. Would love a guide. 🙂

2018 13" Macbook Pro w/ TouchBar, Sonnet Breakaway box 650, Radeon Vega 64 (MSI), LG 34wk95u-w


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 2 years ago
 

@nix8

Posted my build guide. See Step 4.

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


ReplyQuote
(@christopher_herrmann)
Active Member
Joined: 9 months ago
 

Normally I am content with just browsing forums, but at the 10+ hour mark of debugging that is when I will ask for help.

The config file only sort of works for me. Nvidia-smi is showing that my card is being used to run the internal laptop screen but none of my other external monitors are showing any activity. I am on Ubuntu 18.04 with an Asus XG Station. I am using nvidia-415 for my drivers and nvidia-smi shows that my GTX 1070 Ti is recognized. 

That leads me to believe my issue is with my xorg.config file.

Any help would be much appreciated.

This post was modified 9 months ago

Dual Booting Ubuntu 18.04 with Windows 10
Huawei Matebook X Pro
Asus XG-Station Pro
Having Xorg.conf troubles? Check out my script, xswitcher!


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 2 years ago
 

More info is needed to help figure out what's going on. Could you post the output of xrandr and say what your exact laptop model is?

This post was modified 9 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
(@christopher_herrmann)
Active Member
Joined: 9 months ago
 

I am using the Huawei Matebook X Pro. Below is the output of running "xrandr -q". Currently on Ubuntu 18.04 with kernkel 4.15.0-43.

Screen 0: minimum 8 x 8, current 3000 x 2000, maximum 32767 x 32767
eDP-1-1 connected primary 3000x2000+0+0 (normal left inverted right x axis y axis) 293mm x 196mm
   3000x2000     60.00*+  48.01  
DP-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)

Dual Booting Ubuntu 18.04 with Windows 10
Huawei Matebook X Pro
Asus XG-Station Pro
Having Xorg.conf troubles? Check out my script, xswitcher!


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 2 years ago
 

Looks to me like the xorg config (at least the part from this forum) is working correctly. For reference, without it, my internal display is called LVDS-1 and with it, it's called LVDS-1-1. Your internal display seems to be doing the same thing.
The reason the external GPU outputs aren't showing up could be driver related, card related or X just not seeing them. You could try adding a monitor section to the x config file but if that's already there or doesn't work I'd look at other potential issues.

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


ReplyQuote
(@christopher_herrmann)
Active Member
Joined: 9 months ago
 

Very odd isn't it?
The eGPU works just fine under Windows so I know that it isn't a hardware issue at least. Perhaps the most interesting aspect of this problem is that is was relatively unexpected. I had originally had this set up working just fine under an unrelated xorg file (which by all accounts seemed like it should not have worked but I wasn't asking questions). I neglected to mention that in hopes of making things simpler.

I tried to force output under xrandr but that didn't really get me too far. However, it is worth noting that previously when I had things working I was using the nvidia-390 drivers. It's still a mystery as to why  it suddenly stopped working. Maybe some sort of automatic update sort of dilo?

I have messed around with custom xorg config files specifically for my setup but that didn't seem to bear fruit either. I think for now I will try to use this same setup with the nvidia-390 drivers and see if that works.

Dual Booting Ubuntu 18.04 with Windows 10
Huawei Matebook X Pro
Asus XG-Station Pro
Having Xorg.conf troubles? Check out my script, xswitcher!


ReplyQuote
(@christopher_herrmann)
Active Member
Joined: 9 months ago
 

Update: 
I reinstalled and reattempted the xorg config file with the nvidia-390 drivers with no luck.

Out of frustration, I reinstalled Ubuntu because I figure that somewhere along the way I must have messed something up with other drivers. I have no idea. Once I had a clean slate, I installed nvidia-390 from the apt repository, blacklisted the nouveau drivers, and then updated my xorg.conf to the above (making sure to use my own PCI BusID).

Oddly enough, things pretty much worked after that. All of my monitors showed up and came alive and the internal laptop one was disabled once I booted. I am sorry for any future internet explorers reading this post because I never did really find the issue. I wonder if it had something to do with the fact that there is both the internal GPU of the Matebook as well as a dedicated GPU inside the Matebook, making a total of 3 GPUs including the eGPU. The world may never know.

 

Thanks for your help!

This post was modified 9 months ago

Dual Booting Ubuntu 18.04 with Windows 10
Huawei Matebook X Pro
Asus XG-Station Pro
Having Xorg.conf troubles? Check out my script, xswitcher!


nu_ninja liked
ReplyQuote
nx345
(@nx345)
Active Member
Joined: 9 months ago
 

Wonderful it is working under arch !

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


ReplyQuote