Notebook: Switching to the dedicated GPU is not working

My notebook has an integrated and a dedicated AMD GPU but the dedicated GPU is not used.

switcheroo-control which makes sure, the dedicated GPU is only used when explicitly activated by right clicking on the application in the gnome apps overview and selecting “start with dedicated graphics” or in the terminal using “DRI_PRIME=1” as a prefix to the application name. Unfortunately both actions have no effect, the applications are run using the integrated GPU at all times. Restarting switcheroo-control makes no difference.

There are reports describing this behaviour related to Linux Mint and Fedora dating back to 2018 and 2019 also mentioning, that is had been fixed in the kernel or driver. I am not sure to whom I should address this problem as it could be a driver problem, a kernel problem or a problem with switcheroo-control?

Is there a know fix for this issue or can anyone give me a hint about how to address the problem?

Backgound information -------------------------------------------------------------------

$> DRI_PRIME=1 glxinfo -B

and

$> DRI_PRIME=0 glxinfo -B

Output the integrated GPU, the parameter DRI_PRIME=1 which should trigger the use of the dedicated GPU has no effect.

$> inxi -Fxxxmprz

System:
Kernel: 5.14.0-162.6.1.el9_1.x86_64 arch: x86_64 bits: 64 compiler: gcc
v: 2.35.2-24.el9 Desktop: GNOME v: 40.10 tk: GTK v: 3.24.31 wm: gnome-shell
dm: GDM v: 40.1 Distro: AlmaLinux release 9.1 (Lime Lynx) base: RHEL 9.1

Graphics:
Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M]
vendor: Micro-Star MSI driver: amdgpu v: kernel arch: RDNA-2 pcie:
speed: 16 GT/s lanes: 16 ports: active: none empty: DP-1,HDMI-A-1
bus-ID: 03:00.0 chip-ID: 1002:73df class-ID: 0380
Device-2: AMD Cezanne vendor: Micro-Star MSI driver: amdgpu v: kernel
arch: GCN-5.1 pcie: speed: 8 GT/s lanes: 16 ports: active: eDP-1 empty: none
bus-ID: 07:00.0 chip-ID: 1002:1638 class-ID: 0300 temp: 49.0 C
Device-3: Acer HD Webcam type: USB driver: uvcvideo bus-ID: 1-3:2
chip-ID: 5986:211c class-ID: 0e02
Display: x11 server: X.Org v: 1.20.11 with: Xwayland v: 21.1.3
compositor: gnome-shell driver: X: loaded: modesetting unloaded: fbdev
alternate: vesa dri: radeonsi gpu: amdgpu display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
s-diag: 582mm (22.93")
Monitor-1: eDP-1 model: Sharp LQ156M1JW03 res: 1920x1080 hz: 240 dpi: 142
size: 344x194mm (13.54x7.64") diag: 395mm (15.5") modes: max: 1920x1080
min: 640x480
API: OpenGL v: 4.6 Mesa 22.1.5 renderer: AMD RENOIR (LLVM 14.0.6 DRM 3.46
5.14.0-162.6.1.el9_1.x86_64) direct render: Yes

$> DRI_PRIME=1 glxinfo -B

name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: AMD (0x1002)
Device: AMD RENOIR (LLVM 14.0.6, DRM 3.46, 5.14.0-162.6.1.el9_1.x86_64) (0x1638)
Version: 22.1.5
Accelerated: yes
Video memory: 512MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
VBO free memory - total: 108 MB, largest block: 108 MB
VBO free aux. memory - total: 2978 MB, largest block: 2978 MB
Texture free memory - total: 108 MB, largest block: 108 MB
Texture free aux. memory - total: 2978 MB, largest block: 2978 MB
Renderbuffer free memory - total: 108 MB, largest block: 108 MB
Renderbuffer free aux. memory - total: 2978 MB, largest block: 2978 MB
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 512 MB
Total available memory: 3584 MB
Currently available dedicated video memory: 108 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD RENOIR (LLVM 14.0.6, DRM 3.46, 5.14.0-162.6.1.el9_1.x86_64)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.1.5
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.1.5
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.1.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

[Solved]

It’s a question of rebooting and changing from X11 and Wayland and back again before login. It can then be ckecked by right-clicking on an application in the Gnome application overview to see whether the option to run the application on the dedicated GPU is available.

~]$ inxi -G always sees the GPU but xrandr --listproviders might not be aware of the dedicated GPU