I have Leap 15.6 and use a high resolution monitor with a graphics card that needs an nvidia driver.
Since a kernel update end September/start October the nvidia driver no longer functions and I am stuck with a 1024x786 resolution.
I tried many methods to restore/reinstall the nvidia driver, but none worked for me. This weekend I tried so much that I lost my snapper backup form before mentioned kernel update, so I hope the forum can help me.
inxi -Ga returns
I found an error in the startup log, stating that nvidia-persistenced.service was not running.
journalctl gave this information:
Nov 03 09:51:57 pcW nvidia-persistenced[1908]: Failed to query NVIDIA devices. Please ensure that the NVIDIA device files (/dev/nvidia*) exist, and that user 456 has read and write permissions for those files.
Nov 03 09:51:57 pcW nvidia-persistenced[1904]: nvidia-persistenced failed to initialize. Check syslog for more details.
There are no files starting with nvidia in /dev/.
And zypper se --installed-only nvidia returns
S | Name | Summary | Type
---+-------------------------------+-----------------------------------------------------------------------+-------
i | kernel-firmware-nvidia | Kernel firmware files for Nvidia Tegra and graphics drivers | pakket
i | libnvidia-egl-gbm1 | The GBM EGL external platform library | pakket
i | libnvidia-gpucomp | NVIDIA library for shader compilation (nvgpucomp) | pakket
i | nvidia-common-G06 | Common files for the NVIDIA driver packages | pakket
i | nvidia-compute-G06 | NVIDIA driver for computing with GPGPU | pakket
i | nvidia-compute-utils-G06 | NVIDIA driver tools for computing with GPGPU | pakket
i | nvidia-driver-G06-kmp-default | NVIDIA graphics driver kernel module for GeForce 700 series and newer | pakket
i | nvidia-driver-G06-kmp-meta | Meta package to select proprietary nvidia driver | pakket
i | nvidia-gl-G06 | NVIDIA OpenGL libraries for OpenGL acceleration | pakket
i | nvidia-modprobe | NVIDIA kernel module loader | pakket
i | nvidia-persistenced | A daemon to maintain persistent software state in the NVIDIA driver | pakket
i | nvidia-userspace-meta-G06 | Meta package to autoselect NVIDIA userspace packages | pakket
i | nvidia-video-G06 | NVIDIA graphics driver for GeForce 700 series and newer | pakket
i+ | openSUSE-repos-Leap-NVIDIA | openSUSE NVIDIA repository definitions | pakket
Fine, thank you, makes it much more understandable.
And for the future, Just include the line with the command inside the selection of what to copy. That is only one line more and will explain all to your audience without having to type extra stories like this one.
Also the most important thing is missing in the command, the Version.
So better post: zypper se -si nvidia
-s means more details
-i means installed-only
pcW:/home/winfried # zypper in -f nvidia-driver-G06-kmp-default
Refreshing service 'NVIDIA'.
Refreshing service 'openSUSE'.
Loading repository data...
Reading installed packages...
Forcing installation of 'nvidia-driver-G06-kmp-default-580.95.05_k6.4.0_150600.21-lp156.41.2.x86_64' from repository 'repo-non-free (15.6)'.
Resolving package dependencies...
The following package is going to be reinstalled:
nvidia-driver-G06-kmp-default
1 package to reinstall.
Package download size: 79.4 MiB
Package install size change:
| 235.1 MiB required by packages that will be installed
0 B | - 235.1 MiB released by packages that will be removed
Backend: classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): y
Automatically agreeing with nvidia-driver-G06-kmp-default package license.
Retrieving: nvidia-driver-G06-kmp-default-580.95.05_k6.4.0_150600.21-lp156.41.2.x86_64 (repo-non-free (15.6))
(1/1), 79.4 MiB
Retrieving: nvidia-driver-G06-kmp-default-580.95.05_k6.4.0_150600.21-lp156.41.2.x86_64.rpm .............[done (9.9 MiB/s)]
Checking for file conflicts: .......................................................................................[done]
make: Entering directory '/usr/src/linux-6.4.0-150600.21-obj/x86_64/default'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (SUSE Linux) 7.5.0
You are using:
MODPOST /usr/src/kernel-modules/nvidia-580.95.05-default/Module.symvers
make: Leaving directory '/usr/src/linux-6.4.0-150600.21-obj/x86_64/default'
make[1]: Entering directory '/usr/src/linux-6.4.0-150600.21'
make[2]: Map '/usr/src/linux-6.4.0-150600.21-obj/x86_64/default' wordt binnengegaan
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (SUSE Linux) 7.5.0
You are using:
The C compiler 'gcc' does not appear to be able to
create object files. Please make sure you have
your Linux distribution's libc development package
installed and that 'gcc' is a valid C compiler
name.
*** Failed CC sanity check. Bailing out! ***
Warning: Compiler version check failed:
The major and minor number of the compiler used to
compile the kernel:
gcc (SUSE Linux) 7.5.0, GNU ld (GNU Binutils; SUSE Linux Enterprise 15) 2.41.0.20230908-150100.7.46
does not match the compiler used here:
/usr/src/kernel-modules/nvidia-580.95.05-default/conftest.sh: regel 5017: gcc: opdracht niet gevonden
It is recommended to set the CC environment variable
to the compiler that was used to compile the kernel.
To skip the test and silence this warning message, set
the IGNORE_CC_MISMATCH environment variable to "1".
However, mixing compiler versions between the kernel
and kernel modules can result in subtle bugs that are
difficult to diagnose.
*** Failed CC version check. ***
make[3]: *** [/usr/src/kernel-modules/nvidia-580.95.05-default/Kbuild:290: cc_sanity_check] Fout 1
make[3]: *** Wachten op onvoltooide taken...
make[2]: *** [/usr/src/linux-6.4.0-150600.21/Makefile:2066: /usr/src/kernel-modules/nvidia-580.95.05-default] Fout 2
make[2]: Map '/usr/src/linux-6.4.0-150600.21-obj/x86_64/default' wordt verlaten
make[1]: *** [Makefile:226: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-6.4.0-150600.21'
make: *** [Makefile:138: modules] Error 2
/
install: cannot stat '/usr/src/kernel-modules/nvidia-580.95.05-default/nvidia*.ko': No such file or directory
depmod: WARNING: could not open modules.order at /lib/modules/6.4.0-150600.21-default: No such file or directory
depmod: WARNING: could not open modules.builtin at /lib/modules/6.4.0-150600.21-default: No such file or directory
rm -f -r conftest
make[1]: Entering directory '/usr/src/linux-6.4.0-150600.23.73'
make[2]: Map '/usr/src/linux-6.4.0-150600.23.73-obj/x86_64/default' wordt binnengegaan
CLEAN /usr/src/kernel-modules/nvidia-580.95.05-default/Module.symvers
make[2]: Map '/usr/src/linux-6.4.0-150600.23.73-obj/x86_64/default' wordt verlaten
make[1]: Leaving directory '/usr/src/linux-6.4.0-150600.23.73'
/
depmod: ERROR: fstatat(5, nvidia-drm.ko): No such file or directory
depmod: ERROR: fstatat(5, nvidia-modeset.ko): No such file or directory
depmod: ERROR: fstatat(5, nvidia-uvm.ko): No such file or directory
depmod: ERROR: fstatat(5, nvidia.ko): No such file or directory
depmod: ERROR: fstatat(5, nvidia-drm.ko): No such file or directory
depmod: ERROR: fstatat(5, nvidia-modeset.ko): No such file or directory
depmod: ERROR: fstatat(5, nvidia-uvm.ko): No such file or directory
depmod: ERROR: fstatat(5, nvidia.ko): No such file or directory
(1/1) Installing: nvidia-driver-G06-kmp-default-580.95.05_k6.4.0_150600.21-lp156.41.2.x86_64 .......................[done]
Running post-transaction scripts ...................................................................................[done]
Reboot showed no effects, I still an stuck with 1024x768 resolution.
pcW:/home/winfried # gcc --version
If 'gcc' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf gcc
pcW:/home/winfried # g++ --version
g++ (SUSE Linux) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
pcW:/home/winfried # zypper in -f gcc
Refreshing service 'NVIDIA'.
Refreshing service 'openSUSE'.
Loading repository data...
Reading installed packages...
Forcing installation of 'gcc-7-3.9.1.x86_64' from repository 'repo-oss (15.6)'.
Resolving package dependencies...
The following package is going to be reinstalled:
gcc
1 package to reinstall.
Package download size: 10.4 KiB
Package install size change:
| 0 B required by packages that will be installed
0 B | - 0 B released by packages that will be removed
Backend: classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: gcc-7-3.9.1.x86_64 (repo-oss (15.6)) (1/1), 10.4 KiB
Retrieving: gcc-7-3.9.1.x86_64.rpm ...................................................................................................................[done]
Checking for file conflicts: .........................................................................................................................[done]
(1/1) Installing: gcc-7-3.9.1.x86_64 .................................................................................................................[done]
pcW:/home/winfried # gcc --version
gcc (SUSE Linux) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I included my other actions too, following the first output.