Is there a way to make xorg-server to release eGPU?

Michel Dänzer michel at daenzer.net
Mon Nov 19 11:40:31 UTC 2018


On 2018-11-18 7:34 a.m., Qu Wenruo wrote:
> Hi,
> 
> Recently I got a eGPU closure which contains an RX580.
> 
> Xorg server detects it and PRIME works mostly fine.
> 
> However amdgpu kernel module keeps panicing the whole kernel when the
> eGPU is disconnected, either hot plugged out or using the pci remove
> sysfs interface.
> 
> And rmmod amdgpu returns EBUSY.
> So this means I can only hot plug-in, but not hot plug-out.
> 
> I'm wondering is there anyway to make xorg-server to release amdgpu
> usage and then unload the kernel module before hot plug out or pci remove.

If you want to use displays connected to the eGPU, you're out of luck.
Once Xorg has initialized a driver for a GPU, there's no way to unload
it until Xorg shuts down.

Otherwise, you can prevent Xorg from using the eGPU directly via

Section "ServerFlags"
       Option  "AutoAddGPU" "off"
EndSection

in /etc/X11/xorg.conf . Render offloading with DRI_PRIME still works via
DRI3.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <https://lists.x.org/archives/xorg/attachments/20181119/519a0dfa/attachment.sig>


More information about the xorg mailing list