NVidia + Tumbleweed + Wayland + Gnome 45

Hi guys, I’ve installed the NVidia drivers but when I run the NVidia X Server settings I can’t set any configuration settings. I think because it’s still using the default Intel graphic card.

How can I switch to NVidia? I while ago I was using X11 with suse-prime but it doesn’t work on Wayland.

I tried envycontrol as well but it doesn’t seem to do anything. With that I select the nvidia mode but it does nothing. I’m stuck with the Intel graphic card.

This is what I got:

Any tips?

My laptop is a Dell XPS 15 9520 with a GeForce RTXTM 3050 Ti.

@fracasula look at installing switcheroo-control and use the Nvidia GPU on demand?

Or are you wanting it active all the time?

I’d like to be able to switch so that when travelling I can use the Intel one since it uses a lot less lower.

@fracasula well on demand (Prime Render Offload) should work then? GNOME has switcherooctl dbus integration so you can right click an application and launch that application with the (discrete) Nvidia GPU.

Screenshot from 2023-12-09 08-03-21

@malcolmlewis thanks for the tip I didn’t know that. I hope it works with Steam. I’m not sure I got the PRIME offload installed and configured btw, will look for an howto and try it out later, thanks.

@fracasula you don’t need prime at all (delete it all…)… It does work with steam. See this big long thread here, as long as pipewire is running fine, the new user in this thread borked their system a little…
Ref: https://forums.opensuse.org/t/good-hardware-unexperienced-user/170733

I suspect your good to go now, just need switcheroo installed…

1 Like

I guess maybe something is wrong in the configuration. I installed switcheroo and I enabled it but:

$ switcherooctl list
Device: 0
  Name:        Intel Corporation Alder Lake-P Integrated Graphics
  Default:     yes
  Environment: DRI_PRIME=pci-0000_00_02_0

$ switcherooctl nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
$ /sbin/lspci -nnk | grep -EA3 "VGA|Display|3D"
0000:00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-P Integrated Graphics Controller [8086:46a6] (rev 0c)
	Subsystem: Dell Device [1028:0b19]
	Kernel driver in use: i915
	Kernel modules: i915
--
0000:01:00.0 3D controller [0302]: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] [10de:25a0] (rev a1)
	Subsystem: Dell Device [1028:0b19]
	Kernel modules: nouveau
0000:a4:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5260 PCI Express Card Reader [10ec:5260] (rev 01)
$ xrandr --listproviders

Providers: number : 0
$ glxinfo | grep "OpenGL renderer"

OpenGL renderer string: Mesa Intel(R) Graphics (ADL GT2)

@fracasula you need to force the re-install of the nvidia rpms, it’s using nouveau… also remove suse-prime and any lingering xorg files (even though on Wayland). Also have you added the nosimplefb kernel option?

I have changed the following on /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="splash=silent resume=/dev/system/swap quiet security=apparmor mitigations=auto"
GRUB_CMDLINE_LINUX="nosimplefb=1"

Then grub2-mkconfig -o /boot/grub2/grub.cfg.

When reinstalling the nvidia drivers zypper was automatically reinstalling suse-prime, I didn’t notice so I had to set it as “taboo” and then I did:

sudo zypper in -f nvidia-driver-G06-kmp-default nvidia-compute-G06 nvidia-compute-G06-32bit nvidia-gl-G06 nvidia-gl-G06-32bit nvidia-video-G06 nvidia-video-G06-32bit nvidia-utils-G06

Of course suse-prime is now removed, I backed up the /etc/X11 folder and removed it completely from there.

Also added this to /etc/modprobe.d/nvidia.conf:

blacklist nouveau

Then I created /etc/dracut.conf.d/nvidia.conf with add_drivers+="nvidia nvidia-modeset nvidia-drm" in it, then sudo dracut -f.

I also realized that EnvyControl added this to my modprobe configuration:

# Automatically generated by EnvyControl

options nvidia-drm modeset=1
options nvidia NVreg_UsePageAttributeTable=1 NVreg_InitializeSystemMemoryAllocations=0

Rebooting now.

Nothing changed, the switcherooctl list cmd is still showing just the Intel card:

Device: 0
  Name:        Intel Corporation Alder Lake-P Integrated Graphics
  Default:     yes
  Environment: DRI_PRIME=pci-0000_00_02_0

@fracasula what about the lspci output?

Playing around on MicroOS/GNOME?Wayland (Dual AMD GPUS), seems it prefers DRI_PRIME (thats amd/intel only), so might have to see if the following works;

__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"

@malcolmlewis there you go:

$ lspci | grep -i "vga\|nvidia"

0000:00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P Integrated Graphics Controller (rev 0c)
0000:01:00.0 3D controller: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] (rev a1)

I changed the regex for grep because NVIDIA isn’t showing up if I just grep by vga.

@fracasula needs to be /sbin/lspci -nnk | grep -EA3 "VGA|Display|3D" :wink:

That gives:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  151 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  50
  Current serial number in output stream:  51

That gives:

0000:00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-P Integrated Graphics Controller [8086:46a6] (rev 0c)
	Subsystem: Dell Device [1028:0b19]
	Kernel driver in use: i915
	Kernel modules: i915
--
0000:01:00.0 3D controller [0302]: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] [10de:25a0] (rev a1)
	Subsystem: Dell Device [1028:0b19]
	Kernel modules: nouveau
0000:a4:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5260 PCI Express Card Reader [10ec:5260] (rev 01)

@fracasula so still got the nouveau driver… as root run dracut -f --regenerate-all and reboot

1 Like

Damn, you’re right :smile:
I regenerated everything with dracut -f --regenerate-all and rebooted but it’s still there:

0000:01:00.0 3D controller [0302]: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] [10de:25a0] (rev a1)
	Subsystem: Dell Device [1028:0b19]
	Kernel modules: nouveau
0000:a4:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5260 PCI Express Card Reader [10ec:5260] (rev 01)

Any idea about how to eradicate nouveau? I thought adding blacklist nouveau to /etc/modprobe.d would do the trick.

In there I have two files:

  • /etc/modprobe.d/00-blacklist-nouveau.conf
  • /etc/modprobe.d/nvidia.conf

In the 2nd one I got:

# Automatically generated by EnvyControl

options nvidia-drm modeset=1
options nvidia NVreg_UsePageAttributeTable=1 NVreg_InitializeSystemMemoryAllocations=0

Will try changing /etc/default/grub too by adding nomodeset as I read it should be used to disable nouveau:

GRUB_CMDLINE_LINUX="nosimplefb=1 nomodeset"

With this one I end up with a black terminal screen (with a blinking cursor):

GRUB_CMDLINE_LINUX="nosimplefb=1 nomodeset"

It never gets to the usual login screen. I waited a few minutes but it stays stuck like that.

I had to start in terminal mode, edit /etc/default/grub and remove nomodeset in order to be able to login again.