You are not logged in.
I have a new Radeon 5700 XT (reference FWIW) eGPU (just to add to the fun) in a Razor Core X attached to my XPS 13 2-in-1 7390. It's correctly detected with the
amdgpu
module loaded:
[root@enterprise ~]# lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Iris Plus Graphics G7 (rev 07)
30:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] (rev c1)
[root@enterprise ~]# lsmod | grep amdgpu
amdgpu 5496832 6
gpu_sched 40960 1 amdgpu
ttm 122880 1 amdgpu
i2c_algo_bit 16384 2 amdgpu,i915
drm_kms_helper 241664 2 amdgpu,i915
drm 565248 13 gpu_sched,drm_kms_helper,amdgpu,i915,ttm
I've worked through a series of issues getting everything setup, but am hitting an interesting wall. For context, I normally use Wayland, but for whatever reason, Tomb Raider (under proton & dxvk) cause the entire system to lock up under Wayland. So, I'm looking to try out X to see if I encounter the same problem.
However, as you can imagine, X starts using the iGPU (Iris Plus) as the primary GPU. I'd like to switch it to using the eGPU. I tried this Xorg config, modified from the wiki on reverse PRIME:
Section "ServerLayout"
Identifier "layout"
Screen 0 "amdgpu"
Inactive "intel"
EndSection
Section "Device"
Identifier "amdgpu"
Driver "amdgpu"
BusID "PCI:30:0:0"
EndSection
Section "Screen"
Identifier "amdgpu"
Device "amdgpu"
EndSection
Section "Device"
Identifier "intel"
MatchDriver "i915"
Driver "modesetting"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
However, I get the dreaded "no screens found" error (I would paste the exact message, but of course it rotated out by now). I know the card and all are working fine, because when I put
WLR_DRM_DEVICES=/dev/dri/card1
in
/etc/environment
and start sway, the eGPU is definitely driving the show.
For kicks, I compiled the mainline 5.6 rc7 to see if it would help (no difference):
Linux enterprise 5.6.0-rc7-1-mainline #1 SMP PREEMPT Fri, 27 Mar 2020 20:39:59 +0000 x86_64 GNU/Linux
Both GPUs also show up in xrandr:
[craigcabrey@enterprise ~]$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x47 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 5 associated providers: 1 name:modesetting
Provider 1: id: 0xd6 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 4 associated providers: 1 name:Unknown AMD Radeon GPU @ pci:0000:30:00.0
When I try to set the source for provider (sink) 1 to 1 -- in other words have the eGPU drive the eGPU displays, as I understand it -- X crashes (or at least I'm abruptly kicked back to the GDM login screen).
Two questions:
1. any idea on why/how Tomb Raider under Wayland could hard lock the system? happens under both GNOME and sway, so doubt it's related to either compositor. hence why I'd like to try Xorg. probably some bug reports to be filed here in either case...
2. what's the correct incantation of Xorg.conf to get it to use the eGPU to drive everything? there are lots of examples for Nvidia but not so much for AMD
thanks!
Offline
If you have xf86-video-amdgpu installed I'd suggest you try without it and use modesetting for both. You should also execute the relevant provider changing command before having a visible screen. GDM is pretty clunky in that regard, I suggest you try plain startx https://wiki.archlinux.org/index.php/Xinit#xinitrc or a display manager better suited for this, I can vouch for SDDM don't have much experience with others.
Maybe also post a xorg log/dmesg of the "crash".
Offline
You didn't add the the bus-id for the intel card in that conf file .
Does it make a difference if you add that ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
If you have xf86-video-amdgpu installed I'd suggest you try without it and use modesetting for both. You should also execute the relevant provider changing command before having a visible screen. GDM is pretty clunky in that regard, I suggest you try plain startx https://wiki.archlinux.org/index.php/Xinit#xinitrc or a display manager better suited for this, I can vouch for SDDM don't have much experience with others.
Maybe also post a xorg log/dmesg of the "crash".
I tried your suggestions, removed xf86-video-amdgpu and used just startx for setting the sink/source for the eGPU, but X crashed.
[craigcabrey@enterprise ~]$ cat .xinitrc
export XDG_SESSION_TYPE=x11
export GDK_BACKEND=x11
xrandr --setprovideroutputsource 1 1
exec gnome-session
And the crash:
[craigcabrey@enterprise ~]$ cat x.log
X.Org X Server 1.20.7
X Protocol Version 11, Revision 0
Build Operating System: Linux Arch Linux
Current Operating System: Linux enterprise 5.6.0-rc7-1-mainline #1 SMP PREEMPT Fri, 27 Mar 2020 20:39:59 +0000 x86_64
Kernel command line: initrd=\intel-ucode.img initrd=\initramfs-linux-mainline.img root=PARTUUID=684503e1-bd82-495d-ba73-873ab15b6c50 rw amdgpu.gpu_recovery=1 amdgpu.lockup_timeout=3000
Build Date: 14 January 2020 07:13:52AM
Current version of pixman: 0.38.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/craigcabrey/.local/share/xorg/Xorg.0.log", Time: Sun Mar 29 10:57:25 2020
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
(II) modeset(G0): Initializing kms color map for depth 24, 8 bpc.
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Internal error: Could not resolve keysym XF86FullScreen
Errors from xkbcomp are not fatal to the X server
Xorg: ../xorg-server-1.20.7/dix/dispatch.c:4036: AttachOutputGPU: Assertion `!new->is_output_slave' failed.
(EE)
(EE) Backtrace:
(EE) 0: /usr/lib/Xorg (xorg_backtrace+0x4d) [0x55ccd9cce76d]
(EE) 1: /usr/lib/Xorg (0x55ccd9c1b000+0xa9cf8) [0x55ccd9cc4cf8]
(EE) 2: /usr/lib/libc.so.6 (0x7fa5937ba000+0x3bd70) [0x7fa5937f5d70]
(EE) 3: /usr/lib/libc.so.6 (gsignal+0x145) [0x7fa5937f5ce5]
(EE) 4: /usr/lib/libc.so.6 (abort+0x12b) [0x7fa5937df857]
(EE) 5: /usr/lib/libc.so.6 (0x7fa5937ba000+0x25727) [0x7fa5937df727]
(EE) 6: /usr/lib/libc.so.6 (0x7fa5937ba000+0x34426) [0x7fa5937ee426]
(EE) 7: /usr/lib/Xorg (0x55ccd9c1b000+0x16f917) [0x55ccd9d8a917]
(EE) 8: /usr/lib/Xorg (0x55ccd9c1b000+0x5e7f2) [0x55ccd9c797f2]
(EE) 9: /usr/lib/Xorg (ProcRRSetProviderOutputSource+0xdc) [0x55ccd9d4e01c]
(EE) 10: /usr/lib/Xorg (0x55ccd9c1b000+0x39088) [0x55ccd9c54088]
(EE) 11: /usr/lib/libc.so.6 (__libc_start_main+0xf3) [0x7fa5937e1023]
(EE) 12: /usr/lib/Xorg (_start+0x2e) [0x55ccd9c543be]
(EE)
(EE)
Fatal server error:
(EE) Caught signal 6 (Aborted). Server aborting
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/home/craigcabrey/.local/share/xorg/Xorg.0.log" for additional information.
(EE)
(II) AIGLX: Suspending AIGLX clients for VT switch
(EE) Server terminated with error (1). Closing log file.
X connection to :0 broken (explicit kill or server shutdown).
xinit: connection to X server lost
waiting for X server to shut down
Maybe I need to file a bug there.
You didn't add the the bus-id for the intel card in that conf file .
Does it make a difference if you add that ?
Unfortunately it didn't, though it was a good suggestion.
I tried with this updated config:
[root@enterprise ~]# cat 10-amdgpu.conf
Section "ServerLayout"
Identifier "layout"
Screen 0 "amdgpu"
EndSection
Section "Device"
Identifier "amdgpu"
Driver "modesetting"
BusID "PCI:30:0:0"
EndSection
Section "Screen"
Identifier "amdgpu"
Device "amdgpu"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
Offline