3

Ubuntu 16.04.3: How can one select Kernel driver in use for 1st and 2nd GPU?

lspci -k | grep -EA3 'VGA|3D|Display' 
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XT [Radeon RX Vega 64] (rev c1)
    Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device 6b76
    Kernel driver in use: amdgpu
    Kernel modules: amdgpu
--
04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X]
    Subsystem: ASUSTeK Computer Inc. Tahiti XTL [Radeon R9 280X DirectCU II TOP]
    Kernel driver in use: amdgpu
    Kernel modules: radeon, amdgpu

For the first GPU, Radeon RX Vega 64, the Kernel driver in use: amdgpu is correct. The second GPU, Radeon R9 280X is not supported by the "amdgpu" Kernel driver. How to change the driver of only this 2nd GPU?

Many thanks for all suggestions

cucub
  • 31

1 Answers1

2

You could try to manually unbind the Driver from the Device. Check this guide here: https://lwn.net/Articles/143397/

Type in sudo tree /sys/bus/pci/drivers/amdgpu.

You should recieve a list like this:

/sys/bus/pci/drivers/amdgpu
├── 0000:03:00.0 -> ../../../../devices/pci0000:00/0000:00:03.0/0000:03:00.0
├── 0000:04:00.0 -> ../../../../devices/pci0000:00/0000:00:05.0/0000:04:00.0
├── bind
├── module -> ../../../../module/drm
├── new_id
├── remove_id
├── uevent
└── unbind

I think you need to turn off your window manager before you unbind the driver from the graphics card. Open a console outside of the desktop environment with CTRL+ALT+F2 for example. Login as root and type systemctl stop lightdm.service. Exchange lightdm with whatever manager you have.

Now unbind the module from the device:

echo -n "0000:04:00.0" > /sys/bus/pci/drivers/amdgpu/unbind

and bind it to whatever module you want.

echo -n "0000:04:00.0" > /sys/bus/pci/drivers/path_to_your_driver/bind

After that, you can start your desktopmanager again: systemctl start lightdm.service

If everything worked you should find your device binded to the module you specified until reboot.

AlexOnLinux
  • 1,012
  • 9
  • 20