Replace Nvidia with Nouveau driver

I’ve got disturbing glitches on my desktop (black or inverse square behind the cursor and more). Therefore I want to try to switch back from the Nvidia properiaty driver to Nouveau. How to get back to Nouveau? I’ve tried to remove the Nvidia repo and all Nvidia, but didn’t succeed to get Nouveau.

#  | Alias                                        | Name                                                         | Enabled | GPG Check | Refresh
---+----------------------------------------------+--------------------------------------------------------------+---------+-----------+--------
 1 | download.nvidia.com-$releasever              | nVidia Graphics Drivers                                      | Yes     | (r ) Yes  | Yes
 2 | ftp.gwdg.de-openSUSE_Leap_$releasever        | Packman Repository                                           | Yes     | (r ) Yes  | Yes
 3 | google-chrome                                | google-chrome                                                | Yes     | (r ) Yes  | Yes
 4 | opensuse-guide.org-openSUSE_Leap_$releasever | Libdvdcss Repository                                         | Yes     | (r ) Yes  | Yes
 5 | packman                                      | Packman                                                      | Yes     | (r ) Yes  | Yes
 6 | repo-backports-update                        | Update repository of openSUSE Backports                      | Yes     | (r ) Yes  | Yes
 7 | repo-non-oss                                 | Non-OSS Repository                                           | Yes     | (r ) Yes  | Yes
 8 | repo-oss                                     | Main Repository                                              | Yes     | (r ) Yes  | Yes
 9 | repo-sle-update                              | Update repository with updates from SUSE Linux Enterprise 15 | Yes     | (r ) Yes  | Yes
10 | repo-update                                  | Hovedpakkebrønn for oppdateringer                            | Yes     | (r ) Yes  | Yes
11 | repo-update-non-oss                          | Oppdateringspakkebrønn (ikke åpen kildekode)                 | Yes     | (r ) Yes  | Yes

inxi -Fz
System:
  Kernel: 5.3.18-59.37-default x86_64 bits: 64 Desktop: Gnome 3.34.5 
  Distro: openSUSE Leap 15.3 
Machine:
  Type: Desktop System: MSI product: MS-7971 v: 1.0 serial: N/A 
  Mobo: MSI model: Z170-A PRO (MS-7971) v: 1.0 serial: <filter> 
  UEFI: American Megatrends v: 1.K0 date: 07/10/2018 
CPU:
  Topology: Quad Core model: Intel Core i7-6700K bits: 64 type: MT MCP 
  L2 cache: 8192 KiB 
  Speed: 801 MHz min/max: 800/4200 MHz Core speeds (MHz): 1: 800 2: 800 
  3: 800 4: 801 5: 800 6: 800 7: 801 8: 800 
Graphics:
  Device-1: NVIDIA GK208B [GeForce GT 730] driver: nvidia v: 470.86 
  Display: server: X.org 1.20.3 driver: nvidia 
  unloaded: fbdev,modesetting,vesa resolution: <xdpyinfo missing> 
  OpenGL: renderer: NVIDIA GeForce GT 730/PCIe/SSE2 v: 4.6.0 NVIDIA 470.86 

After switching to a DVI monitor cable the Graphics OpenGL line changed a bit to

OpenGL: renderer: llvmpipe (LLVM 11.0.1 256 bits) v: 4.5 Mesa 20.2.4 

Hi
Did you remove the nouveau blacklist file and run mkinitrd?

If gone, the following command should return nothing.


fgrep nouveau /etc/modprobe.d/*

What does the output from the following show when you switch gpu connectors?


xrandr --listmonitors

But LLVM is good…

No, I didn’t. Although this is something I never or seldom do, IMO this driver switch task should have been solved easy in a targeted SDB document :wink:
There are some about Nvidia, but I didn’t find what I searched for.

Therefore:rm “nouveau blacklist file” - below?

fgrep nouveau /etc/modprobe.d/*
/etc/modprobe.d/nvidia-default.conf:blacklist nouveau
/etc/modprobe.d/nvidia-preempt.conf:blacklist nouveau

xrandr --listmonitors
Monitors: 1
 0: +*DVI-D-0 2560/597x1440/336+0+0  DVI-D-0

The cable I switched from was a DVI/HDMI cable to the current DVI/DVI cable, which now makes the screen’s max resolution available.

inxi:

Graphics:  Device-1: NVIDIA GK208B [GeForce GT 730] driver: nvidia v: 470.86 
           Display: x11 server: X.org 1.20.3 driver: nvidia unloaded: fbdev,modesetting,vesa 
           resolution: <xdpyinfo missing>

I’ve used 15.3 successful with nouveau and Mesa, before I did an unsuccessful online upgrade to 15.4 alpha, and therefore “downgraded” to from a 15.3 media "update"installation. Due to a black installation screen in both cases, I used among other the previous noticed ‘nouveau.modeset=0’ …

(Just to mentione I have also Tumbleweed and 15.4 alpha installed and running fine with nouveau and Mesa in a triple boot on the same workstation). Remarkable is that some grub 15.3 boots fine into a seemingly stable gnome graphics desktop - while other times with the mentioned graphical glitches. And sometime restart from 15.3 hangs on a black screen, before I add Ctrl-alt-del which continues the reboot.
Therefore I tried to switch to Nvidia drivers, which did not make the graphics better, rather the opposite.

Hi
Some more questions, what kernel are you running as there is default and preempt preset (It may be part of the problem)…


uname -a

Linux localhost.localdomain 5.3.18-59.37-preempt #1 SMP PREEMPT Mon Nov 22 12:29:04 UTC 2021 (d10168e) x86_64 x86_64 x86_64 GNU/Linux

(I just add it here at the same time, though I plan(ned) another post about it:
Firefox gets and reports remarkabel often tab crashes using bookmarks, or i.e when I tried to open a direct link to this reply from thunderbird.
Google-Chrome works using the same. I’ve tried to remove MozillaFirefox 91.4.0-152.9.1 and reinstall it again with zypper, without change)

Hi
I would suggest switching back to the default kernel and add a lock for the preempt one… and also remove those two blacklist files as well as rebuilding initrd with the mkinitrd command.

Not sure how to switch back: just remove the preempt kernel and reinstall the default?

My triple-boot grub-menu contains four Advanced options for 15.3: preemt and recovery, default and recovery.
Can this be used to switch kernel permanent? Possibly it is the default from here that works, I’ll do a test.

Hi
Boot to the default kernel and then remove/lock, that should leave just the default options in grub.

I did the following three steps, but obviously it was not enough or didn’t work (I didn’t know how to add lock for preemt if that also was meant?):

  1. Booted the default kernel from Grub Advanced - 3th option.

  2. Removed the nouveau lock files:

rm /etc/modprobe.d/nvidia-default.conf /etc/modprobe.d/nvidia-preempt.conf 

  1. rebuilding initrd with the mkinitrd
mkinitrd

rebooted (15.3 default option)

uname -a 
Linux localhost.localdomain 5.3.18-59.37-preempt #1 SMP PREEMPT Mon Nov 22 12:29:04 UTC 2021 (d10168e) x86_64 x86_64 x86_64 GNU/Linux 

inxi

Graphics: 
  Device-1: NVIDIA GK208B [GeForce GT 730] driver: nvidia v: 470.86  
  Display: wayland server: X.org 1.20.3 driver: nvidia  
  unloaded: fbdev,modesetting,vesa resolution: <xdpyinfo missing>  
  OpenGL: renderer: llvmpipe (LLVM 11.0.1 256 bits) v: 4.5 Mesa 20.2.4  
xrandr --listmonitors 
Monitors: 1 
 0: +XWAYLAND0 2560/600x1440/340+0+0  XWAYLAND0

Hi
You need to boot to the default kernel, then should be back at the nouveau driver as well… then need to look at removong the preempt one…

Rebooted to the default kernel which change, but not the graphics driver

inxi -Fz 
System: 
  Kernel: 5.3.18-59.37-default x86_64 bits: 64 Desktop: Gnome 3.34.5  
  Distro: openSUSE Leap 15.3  
Machine: 
  Type: Desktop System: MSI product: MS-7971 v: 1.0 serial: <filter>  
  Mobo: MSI model: Z170-A PRO (MS-7971) v: 1.0 serial: <filter>  
  UEFI: American Megatrends v: 1.K0 date: 07/10/2018  
CPU: 
  Topology: Quad Core model: Intel Core i7-6700K bits: 64 type: MT MCP  
  L2 cache: 8192 KiB  
  Speed: 801 MHz min/max: 800/4200 MHz Core speeds (MHz): 1: 800 2: 800  
  3: 801 4: 800 5: 801 6: 800 7: 800 8: 800  
Graphics: 
  Device-1: NVIDIA GK208B [GeForce GT 730] driver: nvidia v: 470.86  
  Display: wayland server: X.org 1.20.3 driver: nvidia  
  unloaded: fbdev,modesetting,vesa resolution: <xdpyinfo missing>  
  OpenGL: renderer: llvmpipe (LLVM 11.0.1 256 bits) v: 4.5 Mesa 20.2.4  

(Notice also ACPI errors and ACPI BIOS errors scrolling over the console boot screen, and wonder if these is related to the black install screen and required nouveau.modeset=0 setting)

Hi
Ok, so if you remove the nouveau.modeset=0 boot (edit at grub temporarily via pressing the e key and remove that part, F10 to boot) option and boot to the default kernel?

Yes, thanks. That works with some graphics messages? Clean boot console.

System:
  Kernel: 5.3.18-59.37-default x86_64 bits: 64 Desktop: Gnome 3.34.5 
  Distro: openSUSE Leap 15.3 
.......]
Graphics:
  Device-1: NVIDIA GK208B [GeForce GT 730] driver: nouveau v: kernel 
  Display: x11 server: X.org 1.20.3 driver: modesetting FAILED: nvidia 
  unloaded: fbdev,vesa resolution: <xdpyinfo missing> 
  OpenGL: renderer: NV106 v: 4.3 Mesa 20.2.4

Hi
Now uninstall all the nvidia drivers and kernel-preempt…

Sorry, something went wrong…
Possibly I uninstalled too many packages, because now the default kernel boots only with low resolution 1024x768 available

xrandr --listmonitors
xrandr: Failed to get size of gamma for output default
Monitors: 1
 0: +*default 1024/271x768/203+0+0  default

And no nouveau driver?

System:
  Kernel: 5.3.18-59.37-default x86_64 bits: 64 Desktop: Gnome 3.34.5 
  Distro: openSUSE Leap 15.3 
......
Graphics:
  Device-1: NVIDIA GK208B [GeForce GT 730] driver: N/A 
  Display: x11 server: X.org 1.20.3 driver: modesetting FAILED: nvidia 
  unloaded: fbdev,vesa resolution: <xdpyinfo missing> 
  OpenGL: renderer: llvmpipe (LLVM 11.0.1 256 bits) v: 4.5 Mesa 20.2.4 

What related I have left

zypper se -i kernel-default kernel.preemt-devel nvidia nouveau
Laster pakkebrønndata...
Leser installerte pakker...

S  | Name                    | Summary                                                      | Type
---+-------------------------+--------------------------------------------------------------+------
i  | Mesa-dri-nouveau        | Mesa DRI plug-in for 3D acceleration via Nouveau             | pakke
i+ | kernel-default          | The Standard Kernel                                          | pakke
i  | kernel-default-devel    | Development files necessary for building kernel modules      | pakke
i  | kernel-default-extra    | The Standard Kernel - Unsupported kernel modules             | pakke
i  | kernel-default-optional | The Standard Kernel - Optional kernel modules                | pakke
i+ | kernel-firmware-nvidia  | Kernel firmware files for Nvidia Tegra and graphics drivers  | pakke
i  | libdrm_nouveau2         | Userspace interface for Kernel DRM services for NVIDIA chips | pakke
i  | libvdpau_nouveau        | XVMC state tracker for Nouveau                               | pakke

I preserved kernel-firmware-nvidia because else it would remove also proprietary video application I’ve installed. I have not tested yet if this app does work with the default kernel, or if I have to re-install it.

However, booting default recovery works correctly:

xrandr --listmonitors
Monitors: 1
 0: +*DVI-D-1 2560/597x1440/336+0+0  DVI-D-1

System:
  Kernel: 5.3.18-59.37-default x86_64 bits: 64 Desktop: Gnome 3.34.5 
  Distro: openSUSE Leap 15.3 
.....
Graphics:
  Device-1: NVIDIA GK208B [GeForce GT 730] driver: nouveau v: kernel 
  Display: x11 server: X.org 1.20.3 driver: modesetting unloaded: fbdev,vesa 
  resolution: <xdpyinfo missing> 
  OpenGL: renderer: NV106 v: 4.3 Mesa 20.2.4 

How to bring this boot option as default boot?

Hi
Install xf86-video-nouveau also make sure that modeset line is gone from your boot options.

Yeah, that solved it. I removed the kernel parameter ‘nouveau.modeset=0’ permanently using ‘yast2 bootloader’

Thanks for good and patient help :wink:
Terje J. H