2

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

0

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.

  • I managed to unbind the amdgpu driver. Does anyone know to what driver to bind the Radeon R9 280X to? echo -n "0000:04:00.0" > /sys/bus/pci/drivers/?????/bind – cucub Jan 9 '18 at 12:33
  • Sorry I do not use AMD GPU's. You should open a new question where you ask what drivers to use with your Radeon R9 280x. Also it might depend on the Ubuntu version and Kernel you are using, so post them too. It might be that radeon or fglrx or amdgpu-pro is what you need. url1: x.org/wiki/RadeonFeature url2: support.amd.com/en-us/kb-articles/Pages/… Regarding to your lspci output I would try to bind it to radeon – AlexOnLinux Jan 9 '18 at 14:30
  • Many thanks for all the help. I also think it should be radeon but it did not work at a first try. Looks like Ubuntu 16.04 (Kernel 4.10.0-28-generic) has some issues regarding older AMD GPUs. I need to dig deeper... – cucub Jan 9 '18 at 18:46
  • Error Message when trying to bind radeon is: [drm:uvd_v1_0_start [radeon]] *ERROR* UVD not responding, trying to reset the VCPU!!! this message 10 times... – cucub Jan 9 '18 at 19:04
  • Some troubleshooting: Is Device 03:00.0 Onboard graphics? If not, unplug it and put your R9 in that slot. Make sure you can ssh form other pc in case screen remains black. In any case you should try to blacklist the amdgpu by adding it to /etc/modprobe.d/blacklist.conf. Also ls into that folder, maybe there is some blocking rule for some gpu driver (nvidia does create its own *.conf for example). Also have a look at askubuntu.com/questions/650707/… in case you want to use both gpu's. – AlexOnLinux Jan 9 '18 at 21:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.