Dual GPU: NVIDIA doesn't work

Hello,

my new Notebooks has Intel Iris and Nvidia rtx 3050. if i try to use the nvidia gpu, it doesn’t work:

here, i can see an Error:

DRI_PRIME=1 glmark2
libGL error: glx: failed to create dri3 screen
libGL error: failed to load driver: nouveau
inxi -G
Graphics:
  Device-1: Intel Raptor Lake-P [Iris Xe Graphics] driver: i915 v: kernel
  Device-2: NVIDIA GN20-P0-R-K2 [GeForce RTX 3050 6GB Laptop GPU]
    driver: nvidia v: 535.104.05
  Device-3: SunplusIT FHD Webcam driver: uvcvideo type: USB
  Display: wayland server: X.org v: 1.21.1.8 with: Xwayland v: 23.2.0
    compositor: kwin_wayland driver: X: loaded: nvidia
    unloaded: modesetting,nouveau dri: iris gpu: i915,nvidia
    resolution: 1920x1200
  API: OpenGL v: 4.6 Mesa 23.1.6-2 renderer: Mesa Intel Graphics (RPL-P)
nvidia-smi
Thu Sep  7 10:48:21 2023       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.104.05             Driver Version: 535.104.05   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 3050 ...    Off | 00000000:01:00.0 Off |                  N/A |
| N/A   41C    P3              N/A /  30W |      7MiB /  6144MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A       784      G   /usr/lib/Xorg                                 4MiB |
+---------------------------------------------------------------------------------------+
lspci
00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-P [Iris Xe Graphics] (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GN20-P0-R-K2 [GeForce RTX 3050 6GB Laptop GPU] (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 2291 (rev a1)
pacman -Q | grep -iE '(nvidia|mesa|intel|cuda|vulkan|vdpau|xf86|video)'
intel-ucode 20230808-1
lib32-libva-intel-driver 2.4.1-1
lib32-libva-mesa-driver 23.1.6-1
lib32-libva-vdpau-driver 0.7.4-7
lib32-libvdpau 1.5-1
lib32-libxxf86vm 1.1.5-1
lib32-mesa 23.1.6-1
lib32-mesa-demos 9.0.0-1
lib32-mesa-vdpau 23.1.6-1
lib32-nvidia-utils 535.104.05-1
lib32-vulkan-icd-loader 1.3.255-1
lib32-vulkan-intel 23.1.6-1
lib32-vulkan-radeon 23.1.6-1
libva-intel-driver 2.4.1-2
libva-mesa-driver 23.1.6-2
libva-vdpau-driver 0.7.4-6
libvdpau 1.5-1
libxxf86vm 1.1.5-1
linux61-nvidia 535.104.05-4
mesa 23.1.6-2
mesa-demos 9.0.0-2
mesa-utils 9.0.0-2
mesa-vdpau 23.1.6-2
mhwd-nvidia 535.104.05-1
mhwd-nvidia-390xx 390.157-8
mhwd-nvidia-470xx 470.199.02-3
nvidia-prime 1.0-4
nvidia-settings 535.104.05-1
nvidia-utils 535.104.05-1
vulkan-headers 1:1.3.262-1
vulkan-icd-loader 1.3.255-1
vulkan-intel 23.1.6-2
vulkan-radeon 23.1.6-2
vulkan-tools 1.3.255-1
xf86-input-elographics 1.4.3-1
xf86-input-evdev 2.10.6-3
xf86-input-libinput 1.4.0-1
xf86-input-void 1.4.2-1
xf86-video-amdgpu 23.0.0-1
xf86-video-ati 1:22.0.0-1
xf86-video-intel 1:2.99.917+923+gb74b67f0-1
xf86-video-nouveau 1.0.17-2
sudo dmesg | grep nvidia
[sudo] Passwort für gandalf: 
[    7.324022] nvidia: module license 'NVIDIA' taints kernel.
[    7.562626] nvidia-nvlink: Nvlink Core is being initialized, major device number 507
[    7.563729] nvidia 0000:01:00.0: enabling device (0000 -> 0003)
[    7.563864] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    7.814419] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  535.104.05  Sat Aug 19 00:59:57 UTC 2023
[    7.891777] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    7.891780] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[    8.369653] nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint.
[    8.432108] nvidia-uvm: Loaded the UVM driver, major device number 505.

What other information should I provide to better evaluate the problem?

I use Manjaro KDE an wayland. All Updates, all is Vanilla.

What should I look for, what else should I check to get to the root of the problem?

Thank you.
psyc

Nvidia is special (not open source) and needs a special command:

prime-run glmark2

The variable DRI_PRIME is only for open source drivers.

that ain’t work regardeless what you try. switch to x11-display session at login. this is the first step to get it run.

Hello Olli,

at this moment I found the decisive clue where my mistake lay. And you are right! You’re right, but I don’t want to switch to x11.

Here all details: PRIME - ArchWiki

[…]

Wayland-specific configuration

For the NVIDIA card with proprietary drivers:

DRI_PRIME=pci-0000_01_00_0 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia glmark2

=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      NVIDIA Corporation
    GL_RENDERER:    NVIDIA GeForce RTX 3050 6GB Laptop GPU/PCIe/SSE2
    GL_VERSION:     4.6.0 NVIDIA 535.104.05
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
    Surface Size:   800x600 windowed
=======================================================
[...]

nvidia-smi 
Fri Sep  8 20:50:11 2023       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.104.05             Driver Version: 535.104.05   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 3050 ...    Off | 00000000:01:00.0 Off |                  N/A |
| N/A   53C    P5              14W /  25W |     20MiB /  6144MiB |    100%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A       799      G   /usr/lib/Xorg                                 4MiB |
|    0   N/A  N/A      6222      G   glmark2                                       7MiB |
+---------------------------------------------------------------------------------------+


so it’s work fine for me!

Thank you very much!
psyc

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.