Nvidia Driver and secure boot issue

@exalted I suspect your hardware needs suse-prime to run and use the Nvidia GPU. Else something somewhere is stopping the driver to load.

Can you please paste as root user the output from;

lsinitrd | grep -E "nvidia|nouveau"

https://paste.opensuse.org/pastes/fb6986185170

@exalted so the nouveau driver is still there…

OK, there is a new Nvidia driver, can you please upgrade your system via zypper dup, reboot and check the inxi -Gxxz output and lsinitrd | grep -E "nvidia|nouveau"

lsinitrd | grep -E "nvidia|nouveau"
/usr/bin/lsinitrd: line 234: /boot/initrd-6.8.7-1-default: Permission denied
/usr/bin/lsinitrd: line 277: /boot/initrd-6.8.7-1-default: Permission denied
/usr/bin/lsinitrd: line 314: /boot/initrd-6.8.7-1-default: Permission denied
xzcat: /boot/initrd-6.8.7-1-default: Permission denied
xzcat: /boot/initrd-6.8.7-1-default: Permission denied
xzcat: /boot/initrd-6.8.7-1-default: Permission denied
cpio: premature end of archive
dr_exalted@localhost:~> inxi -Gxxz
Graphics:
  Device-1: Intel AlderLake-S GT1 vendor: Gigabyte driver: i915 v: kernel
    ports: active: none empty: DP-1, DP-2, DP-3, HDMI-A-1, HDMI-A-2, HDMI-A-3
    bus-ID: 00:02.0 chip-ID: 8086:4680
  Device-2: NVIDIA AD104 [GeForce RTX 4070] vendor: Gigabyte driver: nvidia
    v: 550.78 arch: Lovelace pcie: speed: 2.5 GT/s lanes: 16 bus-ID: 01:00.0
    chip-ID: 10de:2786
  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,nvidia display-ID: :0 screens: 2 default screen: 0
  Screen-1: 0 s-res: 1920x1080 s-dpi: 92
  Monitor-1: Unknown-1 mapped: DP-0 res: 1920x1080 dpi: 93
  Screen-2: 1 s-res: 1920x1080 s-dpi: 96
  API: EGL v: 1.5 platforms: device: 0 drv: nvidia device: 1 drv: iris
    device: 2 drv: swrast gbm: drv: kms_swrast surfaceless: drv: nvidia x11:
    drv: nvidia inactive: wayland
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.78
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 4070/PCIe/SSE2
  API: Vulkan v: 1.3.280 surfaces: xcb,xlib device: 0 type: discrete-gpu
    driver: N/A device-ID: 10de:2786 device: 1 type: integrated-gpu driver: N/A
    device-ID: 8086:4680

Hey, it seems like The drivers are now loaded, it again asked me to enroll for mok key, I can see the nvidia drivers now. Is there anything I should do now?

Also, One more question. when I do sudo zypper dup it gives me this:

Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...
2 Problems:
Problem: 1: the to be installed openSUSE-repos-Slowroll-NVIDIA-20240412.89bd714-2.1.x86_64 requires 'openSUSE-repos-Slowroll', but this requirement cannot be provided
not installable providers: openSUSE-repos-Slowroll-20240412.89bd714-2.1.x86_64[https-download.opensuse.org-b8f311f8]
                   openSUSE-repos-Slowroll-20240412.89bd714-2.1.x86_64[openSUSE:repo-oss]

Problem: 2: the installed openSUSE-repos-Tumbleweed-NVIDIA-20240412.89bd714-2.1.x86_64 requires 'openSUSE-repos-Tumbleweed', but this requirement cannot be provided

Problem: 1: the to be installed openSUSE-repos-Slowroll-NVIDIA-20240412.89bd714-2.1.x86_64 requires 'openSUSE-repos-Slowroll', but this requirement cannot be provided
not installable providers: openSUSE-repos-Slowroll-20240412.89bd714-2.1.x86_64[https-download.opensuse.org-b8f311f8]
                   openSUSE-repos-Slowroll-20240412.89bd714-2.1.x86_64[openSUSE:repo-oss]

 Solution 1: deinstallation of openSUSE-repos-Slowroll-NVIDIA-20240412.89bd714-1.1.x86_64
 Solution 2: deinstallation of openSUSE-repos-Tumbleweed-20240412.89bd714-2.1.x86_64
 Solution 3: keep obsolete openSUSE-repos-Slowroll-NVIDIA-20240412.89bd714-1.1.x86_64
 Solution 4: break openSUSE-repos-Slowroll-NVIDIA-20240412.89bd714-2.1.x86_64 by ignoring some of its dependencies

What should I do for this? and what is slowroll?

Simply uninstall sudo zypper rm openSUSE-repos-Slowroll-NVIDIA. Slowroll is another openSUSE distribution flavour…

1 Like

@exalted OK, now we are cooking with fire :smile:

So, I use an application called switcherooctl to switch an application to use the secondary gpu. It also depends on your games, I think some will use the nvidia gpu, but lets install that first and test.

As root user install and enable the service;

zypper in switcheroo-control
systemctl enable --now switcheroo-control.service

Then as your user run;

switcherooctl list

Then to test further, run;

glxinfo | grep "OpenGL renderer"

and then

switcherooctl glxinfo | grep "OpenGL renderer"

well I entered bunch of command but idk what happened
here:

sudo zypper in switcheroo-control
[sudo] password for root: 
Refreshing service 'openSUSE'.
Looking for gpg key ID 5A278D9C in cache /var/cache/zypp/pubkeys.
Looking for gpg key ID 5A278D9C in repository gitlab.com_paulcarroty_vscodium_repo.
  gpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg
Warning: File 'repomd.xml' from repository 'gitlab.com_paulcarroty_vscodium_repo' is signed with an unknown key '54678CF75A278D9C'.

    Note: Signing data enables the recipient to verify that no modifications occurred after the data
    were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system
    and in extreme cases even to a system compromise.

    Note: File 'repomd.xml' is the repositories master index file. It ensures the integrity of the
    whole repo.

    Warning: We can't verify that no one meddled with this file, so it might not be trustworthy
    anymore! You should not continue unless you know it's safe.

File 'repomd.xml' from repository 'gitlab.com_paulcarroty_vscodium_repo' is signed with an unknown key '54678CF75A278D9C'.
Continue? [yes/no] (no): yes
Building repository 'gitlab.com_paulcarroty_vscodium_repo' cache .......................................[done]
Loading repository data...
Reading installed packages...
'switcheroo-control' is already installed.
No update candidate for 'switcheroo-control-2.6-2.2.x86_64'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.
dr_exalted@localhost:~> systemctl enable --now switcheroo-control.service
Created symlink /etc/systemd/system/graphical.target.wants/switcheroo-control.service → /usr/lib/systemd/system/switcheroo-control.service.
dr_exalted@localhost:~> switcherooctl list
Device: 0
  Name:        Intel Corporation AlderLake-S GT1
  Default:     yes
  Environment: DRI_PRIME=pci-0000_00_02_0
dr_exalted@localhost:~> glxinfo | grep "OpenGL renderer"
OpenGL renderer string: NVIDIA GeForce RTX 4070/PCIe/SSE2
OpenGL renderer string: llvmpipe (LLVM 18.1.4, 256 bits)
dr_exalted@localhost:~> switcherooctl glxinfo | grep "OpenGL renderer"
OpenGL renderer string: NVIDIA GeForce RTX 4070/PCIe/SSE2
OpenGL renderer string: llvmpipe (LLVM 18.1.4, 256 bits)

Btw, it says Intel corporation alderlake as default? what does this mean. I am still using my nvidia driver as default right?

@exalted Still something weird going on, can you reboot the system and try the switcherooctl commands again.

You should see both the intel and nvidia cards in the output.

sudo switcherooctl list
[sudo] password for root: 
Device: 0
  Name:        NVIDIA Corporation AD104 [GeForce RTX 4070]
  Default:     yes
  Environment: __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only

Device: 1
  Name:        Intel Corporation AlderLake-S GT1
  Default:     no
  Environment: DRI_PRIME=pci-0000_00_02_0

Its showing both now. So, is it fixed?

@exalted Looking good, so the other commands;

glxinfo | grep "OpenGL renderer"

and then

switcherooctl glxinfo | grep "OpenGL renderer"
glxinfo | grep "OpenGL renderer"
OpenGL renderer string: NVIDIA GeForce RTX 4070/PCIe/SSE2
dr_exalted@localhost:~> switcherooctl glxinfo | grep "OpenGL renderer"
OpenGL renderer string: NVIDIA GeForce RTX 4070/PCIe/SSE2

So is this a desktop or a laptop?

It’s a desktop.
So, everything is fine now?

@exalted Ahh, ok, so if power off, enter the BIOS and set the default GPU to the onboard device, save and power off. Plug the monitor into the onboard gpu and power on.

Then run the two switcherooctl commands again and post the output.

My monitor is already plugged to the gpu.

@exalted OK, so when you say GPU, is this the Nvidia, or the motherboard one? And you have multiple monitors?

Nvidia, My monitor was always connected to the Nvidia GPU.No, I only have one monitor.

@exalted OK, so you have a couple of options with your setup;

Simple, just use the Nvidia card:
Reboot the system and go into the BIOS and disable the onboard/iGPU Intel device and set the Primary GPU to the Nvidia card.

You may also need to go into grub and press the e key to edit and at the end of the linux line add nvidia_drm.modeset=1, this may not be needed, so boot first if you get a black screen, then reboot and add the above.

If that all works, then as root user disable the switcherooctl service as this is not needed with;

systemctl disable --now switcheroo-control.service

You would need to go into YaST Bootloader and add the above kernel option and save to make permanent.

Better Game Performance, use Prime Render Offload with Intel default and Nvidia for offload;
Primer: https://download.nvidia.com/XFree86/Linux-x86_64/550.78/README/primerenderoffload.html

This would mean going into the BIOS set the onboard iGPU as default and plug the monitor into that port.

You may also need to go into grub and press the e key to edit and at the end of the linux line add nosimplefb=1, this may not be needed, so boot first if you get a black screen, then reboot and add the above.

Re-enable the switcherooctl service and run those switcherooctl tests again. Then can advise further.

@exalted As a side note, I run two desktops with Tumbleweed Nvidia/Nvidia, Intel/Intel ARC/Nvidia and a openSUSE Aeon laptop with AMD/AMD using switcherooctl without problems.