2

Setting DRI_PRIME=1 does not switch from the Intel HD Graphics 520 to the AMD Radeon R5 M330 when using the X session, but it works fine on Wayland.

Output of xrandr --listproviders on the X session:

Providers: number : 1
Provider 0: id: 0x46 cap: 0x9, Source Output, Sink Offload crtcs: 4 outputs: 3 associated providers: 0 name:Intel

radeontop detects the AMD GPU, and so does lspci | grep AMD:

01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] (rev 83)

It is using the amdgpu kernel module.

This happened just recently (around 3 days ago), So I think an update to something caused it.

2 Answers 2

2

Just to keep your sanity, I would blacklist the radeon kernel driver and make sure it's not binding to the GPU by running lspci -k -nn -s GPU_SLOT.

Once that is all set. Force your amdgpu to use a defined config so you don't become a victim of auto detection.

# /etc/X11/xorg.conf.d/20-amdgpu.conf
Section "Module"
    Load "dri3"
    Load "glamoregl"
EndSection

Section "Device"
  Identifier "AMD"
  Driver "amdgpu"
  Option "Accel" "on"
  Option "AccelMethod" "glamor"
  Option "TearFree" "auto"
  Option "DRI" "3"
EndSection

Please see, https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/open-source-amd-linux/856386-hybrid-graphics-intel-amd

0
2

Following one of the answers on the link ppetraki provided in his answer, I added Option "DRI" "3" to /etc/X11/xorg.conf.d/20-intel.conf, and after a session restart everything was working again. xrandr --listproviders still does not list the AMD GPU, but seemingly DRI3 does not need that.

I was able to confirm the effect of this fix by watching GPU activity through radeontop while running DRI_PRIME=1 glxgears.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .