[RADV] DRI_PRIME not working when Google Chrome uses Vulkan render
I has laptop ASUS ROG Strix G15 Advantage Edition G513 G513QY-HQ007
. This laptop has iGPU AMD RENOIR
and dGPU AMD Radeon RX 6800M
. DRI_PRIME=0
corresponds to AMD RENOIR
, and DRI_PRIME=1
corresponds to AMD Radeon RX 6800M
.
$ DRI_PRIME=0 glxinfo | grep "OpenGL render"
OpenGL renderer string: AMD RENOIR (LLVM 13.0.0, DRM 3.44, 5.16.0-0.rc4.20211207gitcd8c917a56f2.30.fc36.x86_64)
$ DRI_PRIME=1 glxinfo | grep "OpenGL render"
OpenGL renderer string: AMD Radeon RX 6800M (navy_flounder, LLVM 13.0.0, DRM 3.44, 5.16.0-0.rc4.20211207gitcd8c917a56f2.30.fc36.x86_64)
$ inxi -G
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT / 6800M] driver: amdgpu v: kernel
Device-2: Advanced Micro Devices [AMD/ATI] Cezanne driver: amdgpu v: kernel
Display: wayland server: X.Org 1.21.1.3 driver: loaded: amdgpu,ati unloaded: fbdev,modesetting,radeon,vesa
resolution: 2560x1440~165Hz
OpenGL: renderer: AMD RENOIR (LLVM 13.0.0 DRM 3.44 5.16.0-0.rc4.20211207gitcd8c917a56f2.30.fc36.x86_64)
v: 4.6 Mesa 22.0.0-devel
Recently, Google has rolled out testing of Vulkan rendering to some users using the AB testing method. By chance, I was one of the lucky ones.
Here's what I noticed:
If I run Google Chrome without DRI_PRIME
, then AMD RENOIR
is used and iGPU freezes 100%.
If I run Google Chrome with any DRI_PRIME
, then AMD Radeon RX 6800M
is always used. In this case, the browser works.
If I run Google Chrome without Vulkan render $ google-chrome-unstable --disable-features=Vulkan
then all works as expected DRI_PRIME=0
uses AMD RENOIR
and hang did not occurs, DRI_PRIME=1
uses AMD Radeon RX 6800M
.
What I expected:
- GPU did not hangs when I use Vulkan rendering on
AMD RENOIR
. - I can easily switching between
AMD RENOIR
andAMD Radeon RX 6800M
byDRI_PRIME
environment variable.
For manual activation Vulkan rendering please launch Google Chrome with parameter $ google-chrome-unstable --enable-features=Vulkan