nvidia problem (I think)

Hi,
I’m running opensuse 13.2 with nvidia-G02.
The system was running well until I made a really stupid mistake and added tumbleweed with an one-click install to my repos.

I’m not too experienced, but I somehow got the system back to factory (The system-packages got updated to tumbleweed or something like that)
I removed the addidtional repo and used:

zypper dup --from repo-oss

It seems to have worked, but the nvidia driver still don’t.

My /var/log/Xorg.0.log gives me:


 20.466] (II) LoadModule: "nvidia"
 20.466] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
 20.506] (II) Module nvidia: vendor="NVIDIA Corporation"
 20.506]    compiled for 4.0.2, module version = 1.0.0
 20.506]    Module class: X.Org Video Driver
 20.514] (EE) NVIDIA: Failed to load the NVIDIA kernel module. Please check your
 20.514] (EE) NVIDIA:     system's kernel log for additional error messages.
 20.514] (II) UnloadModule: "nvidia"
 20.514] (II) Unloading nvidia
 20.514] (EE) Failed to load module "nvidia" (module-specific error, 0)

The full file is here: http://pastebin.com/TnZCuELC

And I found in an older post: 

rpm -qa | egrep “nvidia|kernel”

:

kernel-devel-3.16.7-7.1.noarch
kernel-devel-3.19.1-2.1.noarch
kernel-desktop-3.19.1-2.1.x86_64
x11-video-nvidiaG02-304.125-34.1.x86_64
kernel-macros-3.16.7-7.1.noarch
kernel-firmware-20141122git-5.1.noarch
kernel-desktop-3.16.7-7.1.x86_64
nvidia-gfxG02-kmp-desktop-304.125_k3.16.6_2-33.1.x86_64
kernel-desktop-3.16.6-2.1.x86_64
nvidia-computeG02-304.125-34.1.x86_64
kernel-desktop-devel-3.19.1-2.1.x86_64
kernel-desktop-devel-3.16.7-7.1.x86_64



I hope that info helps to help me ;)
I tried all other tips I found, hope I didn't miss something obvious.
Thanks for any help.

You’re still booting Tumbleweed’s kernel 3.19.1, but only have the nvidia kernel modules installed for 13.2’s Kernel 3.16.
“zypper dup” does not remove the newer kernel, as you can have multiple kernels installed.

The nvidia driver should work fine when you boot kernel 3.16.7 though, you can select that in “Advanced Options” in the boot menu (should be the 3rd entry).

I would recommend you manually remove all kernel 3.19.1 packages. You can do that in YaST->Software Management using the “Versions” tab, or run this:

sudo zypper rm kernel-devel-3.19.1 kernel-desktop-3.19.1  kernel-desktop-devel-3.19.1

Oh yes thanks alot, I totally missed that.

I tried both now kernel 3.16.7 and also 3.16.2.1. No luck, I still get the same error.

There is no kernel 3.16.2.1. I suppose you mean 3.16.6?

No luck, I still get the same error.

Did you remove the packages as I told you?

I would suggest to boot to kernel 3.16.7 (should be the default now) and reinstall the nvidia kernel module package then. Maybe the kernel module got removed/overwritten or something.

sudo zypper in -f nvidia-gfxG02-kmp-desktop

If you get any error, please post it.

Yes, i meant 3.16.6 :). Yes, I’ve removed the versions you wrote.

I reinstalled the driver now under kernel 3.16.7 . I get the same error: Failed to load the NVIDIA kernel module.

I checked

zypper se -s "nividia*G02"

Maybe it helps. I get:


S | Name                      | Type    | Version                | Arch   | Repository             
--+---------------------------+---------+------------------------+--------+------------------------
i | nvidia-computeG02         | package | 304.125-34.1           | x86_64 | nVidia Graphics Drivers
v | nvidia-computeG02         | package | 304.125-34.1           | i586   | nVidia Graphics Drivers
  | nvidia-gfxG02-kmp-default | package | 304.125_k3.16.6_2-33.1 | x86_64 | nVidia Graphics Drivers
  | nvidia-gfxG02-kmp-default | package | 304.125_k3.16.6_2-33.1 | i586   | nVidia Graphics Drivers
i | nvidia-gfxG02-kmp-desktop | package | 304.125_k3.16.6_2-33.1 | x86_64 | nVidia Graphics Drivers
v | nvidia-gfxG02-kmp-desktop | package | 304.125_k3.16.6_2-33.1 | i586   | nVidia Graphics Drivers
  | nvidia-gfxG02-kmp-pae     | package | 304.125_k3.16.6_2-33.1 | i586   | nVidia Graphics Drivers

What output did you get when reinstalling the driver?

Try to remove it completely, and install it again:

sudo zypper rm  nvidia-gfxG02-kmp-desktop x11-video-nvidiaG02 nvidia-computeG02
sudo zypper in  nvidia-gfxG02-kmp-desktop x11-video-nvidiaG02 nvidia-computeG02

I’m not sure what you mean.
I have removed and then installed the packages.
While removing I got this:


2015-03-23 20:28:34|remove |nvidia-computeG02|304.125-34.1|x86_64|root@linux.site|
# 2015-03-23 20:28:51 nvidia-gfxG02-kmp-desktop-304.125_k3.16.6_2-33.1.x86_64 removed ok
# Additional rpm output:
# make: Entering directory '/usr/src/kernel-modules/nvidia-304.125-desktop'
# make: Leaving directory '/usr/src/kernel-modules/nvidia-304.125-desktop'
# 
2015-03-23 20:28:51|remove |nvidia-gfxG02-kmp-desktop|304.125_k3.16.6_2-33.1|x86_64|root@linux.site|
# 2015-03-23 20:36:03 nvidia-gfxG02-kmp-desktop-304.125_k3.16.6_2-33.1.x86_64.rpm installed ok
# Additional rpm output:
# make: *** /usr/src/linux-obj/x86_64/desktop: No such file or directory.  Stop.
# /usr/src/kernel-modules/nvidia-304.125-desktop /
# Your kernel was configured to include rivafb support!
# 
# The rivafb driver conflicts with the NVIDIA driver, please
# reconfigure your kernel and *disable* rivafb support, then
# try installing the NVIDIA kernel module again.
# 
# *** Failed rivafb sanity check. Bailing out! ***
# 
# Makefile.kbuild:239: recipe for target 'build-sanity-checks' failed
# make: *** [build-sanity-checks] Error 1
# /
# install: cannot stat '/usr/src/kernel-modules/nvidia-304.125-desktop/nvidia.ko': No such file or directory
# depmod: ERROR: fstatat(5, nvidia.ko): No such file or directory
# 

And after the install I got:


# *** Store current command line parameters ***
# Stored kernel commandline:
#  resume=UUID=2da88e9c-b98d-4131-9d1d-c77f3e64fd1f
# root=UUID=432f3a70-82d0-436d-986b-c8e0ea442419 rootflags=rw,relatime,space_cache rootfstype=btrfs
# *** Creating image file ***
# *** Creating image file done ***
# Update bootloader...
# update-alternatives: warning: /etc/alternatives/libglx.so has been changed (manually or by a script); switching to manual updates only
# 
2015-03-23 20:37:25|install|x11-video-nvidiaG02|304.125-34.1|x86_64|root@linux.site|nVidia Graphics Drivers|f8f57bc77b8936c9dba2eddb929021719b12c93e087a8c403f3c4aff847cb8ed| 

If it helps, I can post the full zypper history.

I meant: what output did you get in the terminal window, when you ran that “zypper” command?

I have removed and then installed the packages.
While removing I got this:

2015-03-23 20:28:51|remove |nvidia-gfxG02-kmp-desktop|304.125_k3.16.6_2-33.1|x86_64|root@linux.site|

2015-03-23 20:36:03 nvidia-gfxG02-kmp-desktop-304.125_k3.16.6_2-33.1.x86_64.rpm installed ok

Additional rpm output:

make: *** /usr/src/linux-obj/x86_64/desktop: No such file or directory. Stop.

/usr/src/kernel-modules/nvidia-304.125-desktop /

install: cannot stat ‘/usr/src/kernel-modules/nvidia-304.125-desktop/nvidia.ko’: No such file or directory

depmod: ERROR: fstatat(5, nvidia.ko): No such file or directory

Well, this definitely shows that the kernel module was missing.
And you seem(ed) to be missing /usr/src/linux-obj/x86_64/desktop as well which is part of kernel-desktop-devel.

So is it working now?
If not, try to reinstall kernel-desktop-devel:

sudo zypper in -f kernel-desktop-devel-3.16.7

And reinstall the kmp package again.

Btw: I found an older post, that I think is about the same problem. The solution was to use the package from the nvidia-page, not the repo.
https://forums.opensuse.org/showthread.php/485484-Another-Nvidia-good-new-problem/page4
So I guess, I will try that.

Ok, here the output from

sudo zypper in -f nvidia-gfxG02-kmp-desktop
2015-03-23 21:26:30 nvidia-gfxG02-kmp-desktop-304.125_k3.16.6_2-33.1.x86_64.rpm installed ok
# Additional rpm output:
# make: Entering directory '/usr/src/linux-3.16.7-7-obj/x86_64/desktop'
# make[1]: Entering directory `/usr/src/linux-3.16.7-7-obj/x86_64/desktop'
#   CC [M]  /usr/src/kernel-modules/nvidia-304.125-desktop/nv.o
# In file included from /usr/src/kernel-modules/nvidia-304.125-desktop/nv-linux.h:15:0,
#                  from /usr/src/kernel-modules/nvidia-304.125-desktop/nv.c:13:
# /usr/src/kernel-modules/nvidia-304.125-desktop/conftest.h:11:2: error: #error remap_page_range() conftest failed!
#  #error remap_page_range() conftest failed!
#   ^
# /usr/src/kernel-modules/nvidia-304.125-desktop/conftest.h:13:2: error: #error vmap() conftest failed!
#  #error vmap() conftest failed!
#   ^
# /usr/src/kernel-modules/nvidia-304.125-desktop/conftest.h:14:2: error: #error agp_backend_acquire() conftest failed!
#  #error agp_backend_acquire() conftest failed!
#   ^
# /usr/src/kernel-modules/nvidia-304.125-desktop/conftest.h:32:2: error: #error kmem_cache_create() conftest failed!
#  #error kmem_cache_create() conftest failed!
#   ^
# /usr/src/kernel-modules/nvidia-304.125-desktop/conftest.h:33:2: error: #error on_each_cpu() conftest failed!
#  #error on_each_cpu() conftest failed!
#   ^
# /usr/src/kernel-modules/nvidia-304.125-desktop/conftest.h:34:2: error: #error smp_call_function() conftest failed!
#  #error smp_call_function() conftest failed!
#   ^
# /usr/src/kernel-modules/nvidia-304.125-desktop/conftest.h:41:2: error: #error INIT_WORK() conftest failed!
#  #error INIT_WORK() conftest failed!
#   ^
# /usr/src/kernel-modules/nvidia-304.125-desktop/conftest.h:42:2: error: #error acpi_walk_namespace() conftest failed!
#  #error acpi_walk_namespace() conftest failed!
#   ^
# /usr/src/kernel-modules/nvidia-304.125-desktop/conftest.h:46:2: error: #error pci_dma_mapping_error() conftest failed!
#  #error pci_dma_mapping_error() conftest failed!
#   ^
# In file included from /usr/src/linux-3.16.7-7/include/uapi/linux/stddef.h:1:0,
#                  from /usr/src/linux-3.16.7-7/include/linux/stddef.h:4,
#                  from /usr/src/linux-3.16.7-7/include/uapi/linux/posix_types.h:4,
#                  from /usr/src/linux-3.16.7-7/include/uapi/linux/types.h:13,
#                  from /usr/src/linux-3.16.7-7/include/linux/types.h:5,
#                  from /usr/src/linux-3.16.7-7/include/uapi/linux/capability.h:16,
#                  from /usr/src/linux-3.16.7-7/include/linux/capability.h:15,
#                  from /usr/src/linux-3.16.7-7/include/linux/sched.h:15,
#                  from /usr/src/linux-3.16.7-7/include/linux/utsname.h:5,
#                  from /usr/src/kernel-modules/nvidia-304.125-desktop/nv-linux.h:40,
#                  from /usr/src/kernel-modules/nvidia-304.125-desktop/nv.c:13:
# /usr/src/linux-3.16.7-7/include/asm-generic/qrwlock.h: In function ‘queue_write_trylock’:
# /usr/src/linux-3.16.7-7/include/asm-generic/qrwlock.h:93:35: warning: comparison between signed and unsigned integer expressions -Wsign-compare]
#           cnts, cnts | _QW_LOCKED) == cnts);
#                                    ^
# /usr/src/linux-3.16.7-7/include/linux/compiler.h:159:40: note: in definition of macro ‘likely’
#  # define likely(x) __builtin_expect(!!(x), 1)
#                                         ^
# In file included from /usr/src/linux-3.16.7-7/include/uapi/linux/stddef.h:1:0,
#                  from /usr/src/linux-3.16.7-7/include/linux/stddef.h:4,
#                  from /usr/src/linux-3.16.7-7/include/uapi/linux/posix_types.h:4,
#                  from /usr/src/linux-3.16.7-7/include/uapi/linux/types.h:13,
#                  from /usr/src/linux-3.16.7-7/include/linux/types.h:5,
#                  from /usr/src/linux-3.16.7-7/include/uapi/linux/capability.h:16,
#                  from /usr/src/linux-3.16.7-7/include/linux/capability.h:15,
#                  from /usr/src/linux-3.16.7-7/include/linux/sched.h:15,
#                  from /usr/src/linux-3.16.7-7/include/linux/utsname.h:5,
#                  from /usr/src/kernel-modules/nvidia-304.125-desktop/nv-linux.h:40,
#                  from /usr/src/kernel-modules/nvidia-304.125-desktop/nv.c:13:
# /usr/src/linux-3.16.7-7/arch/x86/include/asm/uaccess.h: In function ‘copy_from_user’:
# /usr/src/linux-3.16.7-7/arch/x86/include/asm/uaccess.h:712:26: warning: comparison between signed and unsigned integer expressions -Wsign-compare]
#   if (likely(sz < 0 || sz >= n))
#                           ^
# /usr/src/linux-3.16.7-7/include/linux/compiler.h:159:40: note: in definition of macro ‘likely’
#  # define likely(x) __builtin_expect(!!(x), 1)
#                                         ^
# /usr/src/linux-3.16.7-7/arch/x86/include/asm/uaccess.h: In function ‘copy_to_user’:
# /usr/src/linux-3.16.7-7/arch/x86/include/asm/uaccess.h:730:26: warning: comparison between signed and unsigned integer expressions -Wsign-compare]
#   if (likely(sz < 0 || sz >= n))
#                           ^
# /usr/src/linux-3.16.7-7/include/linux/compiler.h:159:40: note: in definition of macro ‘likely’
#  # define likely(x) __builtin_expect(!!(x), 1)
#                                         ^
# In file included from /usr/src/kernel-modules/nvidia-304.125-desktop/nv.c:13:0:
# /usr/src/kernel-modules/nvidia-304.125-desktop/nv-linux.h: At top level:
# /usr/src/kernel-modules/nvidia-304.125-desktop/nv-linux.h:147:2: error: #error "struct file_operations compile test likely failed!"
#  #error "struct file_operations compile test likely failed!"
#   ^
# In file included from /usr/src/kernel-modules/nvidia-304.125-desktop/nv.c:13:0:
# /usr/src/kernel-modules/nvidia-304.125-desktop/nv-linux.h:163:27: fatal error: asm/semaphore.h: No such file or directory
#  #include <asm/semaphore.h>
#                            ^
# compilation terminated.
# /usr/src/linux-3.16.7-7/scripts/Makefile.build:273: recipe for target '/usr/src/kernel-modules/nvidia-304.125-desktop/nv.o' failed
# make[3]: *** [/usr/src/kernel-modules/nvidia-304.125-desktop/nv.o] Error 1
# /usr/src/linux-3.16.7-7/Makefile:1359: recipe for target '_module_/usr/src/kernel-modules/nvidia-304.125-desktop' failed
# make[2]: *** [_module_/usr/src/kernel-modules/nvidia-304.125-desktop] Error 2
# Makefile:195: recipe for target 'sub-make' failed
# make[1]: *** [sub-make] Error 2
# Makefile:24: recipe for target '__sub-make' failed
# make: *** [__sub-make] Error 2
# make: Leaving directory '/usr/src/linux-3.16.7-7-obj/x86_64/desktop'
# /usr/src/kernel-modules/nvidia-304.125-desktop /
# NVIDIA: calling KBUILD...
# make[1]: *** /usr/src/linux: No such file or directory.  Stop.
# NVIDIA: left KBUILD.
# nvidia.ko failed to build!
# Makefile.kbuild:250: recipe for target 'module' failed
# make: *** [module] Error 1
# /
# install: cannot stat '/usr/src/kernel-modules/nvidia-304.125-desktop/nvidia.ko': No such file or directory
# depmod: ERROR: fstatat(5, nvidia.ko): No such file or directory

I have removed and installed the nvidia-drivers. I think the zypper-errors from my last post were mainly because I only updated the main nvidia file.
I will reboot, now and see what happens.

I wouldn’t recommend that at all.

Ok, here the output from

sudo zypper in -f nvidia-gfxG02-kmp-desktop
# In file included from /usr/src/kernel-modules/nvidia-304.125-desktop/nv.c:13:0:
# /usr/src/kernel-modules/nvidia-304.125-desktop/nv-linux.h:163:27: fatal error: asm/semaphore.h: No such file or directory
#  #include <asm/semaphore.h>
#                            ^
# compilation terminated.

semaphore.h should be part of kernel-devel AFAICT.
So try to reinstall that as well:

sudo zypper in -f kernel-devel-3.16.7

Afterwards reinstalling nvidia-gfxG02-kmp-desktop should really work.

But to be sure, can you please post the output of the following?

ls -la /usr/src

Maybe some symlink is missing there/set wrong which is causing the problem.

I doubt that.

Ok, thanks alot :slight_smile: All works perfect again.

I reinstalled the kernel-devel package as you suggested, but zypper still printed errors when compiling the nvidia-gfxG02-kmp-desktop driver.
I don’t know what really did it, maybe I should have rebooted after reinstalling the kernel packages.

In the end I rebooted only with the nouveau-driver, then installed the nvidia-drivers with yast and all is fine.

Should actually not be necessary.

But anyway, glad to hear it’s working again now! :slight_smile: