Trouble with Nvidia driver install for Optimus

Hi all, I just made the switch form Arch to Tumbleweed and I think I could get pretty settled here after some distro hopping. Now I do have an issue with getting my Nvidia driver setup to work properly, which was also a bit difficult on Arch, but mainly regarding Sleep/Hibernate there.

Now I have an Optimus setup, and want to use Prime-Offload again for Steam and such. I followed the guide for the driver install (which is not as intuitive as I thought tbh), and it seems like the official drivers got installed, but they dont seem to get loaded.

For installation I followed this approach, although the auto install with zypper found no changes to be made. Yast however did suggest the installation of the new packages.

zypper se -ir NVIDIA

[daniel@localhost ~]$ zypper se -ir NVIDIA
Repository : Time since last refresh
NVIDIA     : 3 min 11 s 


    Note: Running with user privileges. From time to time run 'zypper refresh' as root to make sure
    the repository metadata are complete and up-to-date.

Repository-Daten werden geladen...
Installierte Pakete werden gelesen...

S  | Name                          | Summary                                                               | Type
---+-------------------------------+-----------------------------------------------------------------------+------
i  | nvidia-compute-G06            | NVIDIA driver for computing with GPGPU                                | Paket
i  | nvidia-compute-G06-32bit      | 32bit NVIDIA driver for computing with GPGPU                          | Paket
i+ | nvidia-driver-G06-kmp-default | NVIDIA graphics driver kernel module for GeForce 700 series and newer | Paket
i  | nvidia-gl-G06                 | NVIDIA OpenGL libraries for OpenGL acceleration                       | Paket
i  | nvidia-gl-G06-32bit           | 32bit NVIDIA OpenGL libraries for OpenGL acceleration                 | Paket
i  | nvidia-video-G06              | NVIDIA graphics driver for GeForce 700 series and newer               | Paket
i  | nvidia-video-G06-32bit        | 32bit NVIDIA graphics driver for GeForce 700 series and newer         | Paket

inxi -Gxxz

[daniel@localhost ~]$ inxi -Gxxz
Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: Dell driver: i915
    v: kernel arch: Gen-12.1 ports: active: eDP-1 empty: DP-1,DP-2,DP-3
    bus-ID: 00:02.0 chip-ID: 8086:9a60
  Device-2: NVIDIA GA107GLM [RTX A2000 Mobile] vendor: Dell driver: N/A
    arch: Ampere pcie: speed: 16 GT/s lanes: 8 bus-ID: 01:00.0
    chip-ID: 10de:25b8
  Device-3: Microdia Integrated_Webcam_HD driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 3-11:4 chip-ID: 0c45:672e
  Display: x11 server: X.Org v: 21.1.12 with: Xwayland v: 23.2.6
    compositor: kwin_x11 driver: X: loaded: modesetting unloaded: fbdev,vesa
    alternate: intel dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1200 s-dpi: 96
  Monitor-1: eDP-1 model: LG Display 0x06b3 res: 1920x1200 dpi: 145
    diag: 396mm (15.6")
  API: EGL v: 1.5 platforms: device: 0 drv: iris device: 1 drv: swrast
    surfaceless: drv: iris x11: drv: iris inactive: gbm,wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.0.5 glx-v: 1.4
    direct-render: yes renderer: Mesa Intel UHD Graphics (TGL GT1)
    device-ID: 8086:9a60
  API: Vulkan v: 1.3.280 surfaces: xcb,xlib device: 0 type: integrated-gpu
    driver: N/A device-ID: 8086:9a60

How can I get now the correct drivers to be loaded for the GPU and Prime offload to be available? Also, whats the current state on hibernation? On Arch I needed to enable the Nvidia services for it, I found the same approach here but I am not really sure if that is really an up to date thing to do.

Many thanks in advance

@exen904 Hi and welcome to the Forum :smile:
Based on your Nvidia driver being N/A in your output, I suspect removing suse-prime will help…

Have a read of this recent thread https://forums.opensuse.org/t/my-intel-and-nvidia-drivers-are-installed-correctly-but-which-driver-is-actually-being-used/174864 for more details of a user with the same type of issue.

Thank you very much, I actually had the Thread open in a different tab :smiley: Good eyes with suse-prime, I completely missed that. It seems like the driver is getting detected now:

Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: Dell driver: i915
    v: kernel arch: Gen-12.1 ports: active: eDP-1 empty: DP-1,DP-2,DP-3
    bus-ID: 00:02.0 chip-ID: 8086:9a60
  Device-2: NVIDIA GA107GLM [RTX A2000 Mobile] vendor: Dell driver: nvidia
    v: 550.78 arch: Ampere pcie: speed: 16 GT/s lanes: 8 bus-ID: 01:00.0
    chip-ID: 10de:25b8
  Device-3: Microdia Integrated_Webcam_HD driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 3-11:4 chip-ID: 0c45:672e
  Display: x11 server: X.Org v: 21.1.12 with: Xwayland v: 23.2.6
    compositor: kwin_x11 driver: X: loaded: modesetting,nvidia
    unloaded: fbdev,vesa alternate: intel,nouveau,nv dri: iris gpu: i915
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1200 s-dpi: 96
  Monitor-1: eDP-1 model: LG Display 0x06b3 res: 1920x1200 dpi: 145
    diag: 396mm (15.6")
  API: EGL v: 1.5 platforms: device: 0 drv: nvidia device: 1 drv: iris
    device: 3 drv: swrast surfaceless: drv: nvidia x11: drv: iris
    inactive: gbm,wayland,device-2
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 24.0.5 glx-v: 1.4
    direct-render: yes renderer: Mesa Intel UHD Graphics (TGL GT1)
    device-ID: 8086:9a60
  API: Vulkan v: 1.3.280 surfaces: xcb,xlib device: 0 type: integrated-gpu
    driver: N/A device-ID: 8086:9a60 device: 1 type: discrete-gpu driver: N/A
    device-ID: 10de:25b8

Where I’m not exactly sure right now is the Vulkan API. type: discrete-gpu should be the Nvidia I guess? Maybe I dont need to be, but the driver: N/A worries me a bit.

@exen904 So if you install switcherooctl etc and then run switcherooctl glxinfo | grep "OpenGL renderer" or switcherooctl inxi -Gxxz you should see it in use?

So I did some looking around, seems to look good I think:

[daniel@fs0ciety ~]$ __NV_PRIME_RENDER_OFFLOAD=1 __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only glxinfo | grep "OpenGL renderer"
OpenGL renderer string: NVIDIA RTX A2000 Laptop GPU/PCIe/SSE2

switcherroctl still shows the Intel iGPU, but as Prime detects the Nvidia, I guess thats works as designed?

[daniel@fs0ciety ~]$ switcherooctl glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Mesa Intel(R) UHD Graphics (TGL GT1)

However, I noticed one issue with Steam in comparison to my old Arch install. In Steam I had set the paramter prime-run %command% to enable prime render offload when starting a game, which worked just fine. On Tumbleweed now, that seems to be not the correct way, as games dont start with the parameter set. Without, the Intel iGPU is used (at least for the 2D games I tested).

If I start Steam via terminal, I also get the corresponding output

/bin/sh: line 1: prime-run: command not found

My guess was that this is a syntax error, and well, I think I was right :slight_smile: So for anyone who maybe finds this thread, I changed the start paramter in steam to

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command%

and now games start and also use the Nvidia GPU as expected

switcherooctl has to be told which GPU to use and Intel is usually the default.

switcherooctl launch --gpu=1 glxinfo

Or whatever number your NVIDIA has, check

switcherooctl list

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