ASUS A15 TUF Gaming 506 IU Laptop Ryzen7 4800h –running linux on it & hybrid graphics (AMD+Nvidia)

Hi
Yes for GNOME we have an added selection in the desktop/menu file… you can offload either via switherooctl or an alias or script it, try this instead of glxgears (it’s not a good test}.

Some should just use the Nvidia card, else launch manually…


xrandr --listproviders 
Providers: number : 2
Provider 0: id: 0x49; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 3; outputs: 7; associated providers: 1; name: modesetting
    output VGA-1
    output HDMI-1
    output DP-1
    output HDMI-2
    output HDMI-3
    output DP-2
    output DP-3
Provider 1: id: 0x212; cap: 0x2 (Sink Output); crtcs: 2; outputs: 2; associated providers: 1; name: NVIDIA-G0
    output DVI-D-1-0
    output HDMI-1-0

glxinfo|egrep "OpenGL vendor|OpenGL renderer"

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics P4000 (IVB GT2)

__NV_PRIME_RENDER_OFFLOAD=1 __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo|egrep "OpenGL vendor|OpenGL renderer"

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GT 1030/PCIe/SSE2

switcherooctl -g 0 glxinfo|egrep "OpenGL vendor|OpenGL renderer"
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics P4000 (IVB GT2)

switcherooctl -g 1 glxinfo|egrep "OpenGL vendor|OpenGL renderer"
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GT 1030/PCIe/SSE2

vulkaninfo |grep NVIDIA
VK_LAYER_NV_optimus (NVIDIA Optimus layer) Vulkan version 1.2.162, layer version 1:
    driverID           = DRIVER_ID_NVIDIA_PROPRIETARY
    driverName         = NVIDIA
    driverID                                             = DRIVER_ID_NVIDIA_PROPRIETARY
    driverName                                           = NVIDIA

clinfo |grep NVIDIA
  Platform Name                                   NVIDIA CUDA
  Platform Vendor                                 NVIDIA Corporation
  Platform Name                                   NVIDIA CUDA
  Device Vendor                                   NVIDIA Corporation


pinxi -Gxxz

Graphics:  Device-1: Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:016a 
           Device-2: NVIDIA GP108 [GeForce GT 1030] vendor: eVga.com. driver: nvidia v: 455.46.02 bus ID: 02:00.0 
           chip ID: 10de:1d01 
           Device-3: NVIDIA GK208B [GeForce GT 710] vendor: ZOTAC driver: vfio-pci v: 0.2 bus ID: 03:00.0 chip ID: 10de:128b 
           Display: x11 server: X.Org 1.20.9 compositor: gnome-shell driver: modesetting,nvidia unloaded: fbdev,vesa 
           alternate: intel,nouveau,nv resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz 3: 1920x1080~60Hz s-dpi: 96 
           OpenGL: renderer: Mesa DRI Intel HD Graphics P4000 (IVB GT2) v: 4.2 Mesa 20.2.3 compat-v: 3.0 direct render: Yes 

switcherooctl -g 1 pinxi -Gxxz

Graphics:  Device-1: Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:016a 
           Device-2: NVIDIA GP108 [GeForce GT 1030] vendor: eVga.com. driver: nvidia v: 455.46.02 bus ID: 02:00.0 
           chip ID: 10de:1d01 
           Device-3: NVIDIA GK208B [GeForce GT 710] vendor: ZOTAC driver: vfio-pci v: 0.2 bus ID: 03:00.0 chip ID: 10de:128b 
           Display: x11 server: X.Org 1.20.9 compositor: gnome-shell driver: modesetting,nvidia unloaded: fbdev,vesa 
           alternate: intel,nouveau,nv resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz 3: 1920x1080~60Hz s-dpi: 96 
           OpenGL: renderer: GeForce GT 1030/PCIe/SSE2 v: 4.6.0 NVIDIA 455.46.02 direct render: Yes 

Run the likes of vkmark or blender and check you have nvidia cores…