First eGPU hotplug works, but fails after hot-unplug
Setup:
OS: Arch Linux (Kernel 6.9.9)
eGPU: AMD ATI Radeon RX 5600
Issue
When connecting for the first time or if plugged in before boot, the eGPU is initialized correctly. If I disconnect and reconnect the eGPU, it does not show up under /dev/dri
and I see the following errors:
kernel: amdgpu 0000:0e:00.0: enabling device (0000 -> 0002)
kernel: [drm] initializing kernel modesetting (NAVI10 0x1002:0x731F 0x1DA2:0xE416 0xCA).
kernel: [drm] register mmio base: 0xC4100000
kernel: [drm] register mmio size: 524288
kernel: [drm:amdgpu_discovery_set_ip_blocks [amdgpu]] *ERROR* amdgpu_discovery_init failed
kernel: amdgpu 0000:0e:00.0: amdgpu: Fatal error during GPU init
kernel: amdgpu 0000:0e:00.0: amdgpu: amdgpu: finishing device.
kernel: amdgpu 0000:0e:00.0: probe with driver amdgpu failed with error -22
My suspicion is that the eGPU is not properly de-initialized on hot-unplug, leaving the system in a bad state.