mathjax + gtag

Pages

Monday, August 1, 2016

OpenSUSE Leap 42.1 and nvidia kernel driver

The symptoms

Nvidia kernel drivers were not loaded after kernel update.

The problem

The package nvidia-gfxG04-kmp-default-367.35_k4.1.12_1-25.1.x86_64 runs a script that regenerates the kernel drivers and creates symlinks in /lib/modules/4.1.27-27-default/weak-updates/updates. After running:

# zypper in --force $(rpm -qa "nvidia-gfx*kmp*")

I noticed that the links were not beeing generated:

# zypper in --force $(rpm -qa "nvidia-gfx*kmp*")
Retrieving repository 'network:utilities' metadata ..........................................................................................................[done]
Building repository 'network:utilities' cache ...............................................................................................................[done]
Loading repository data...
Reading installed packages...
Forcing installation of 'nvidia-gfxG04-kmp-default-367.35_k4.1.12_1-25.1.x86_64' from repository 'nVidia Graphics Drivers'.
Resolving package dependencies...

The following package is going to be reinstalled:
  nvidia-gfxG04-kmp-default

1 package to reinstall.
Overall download size: 5.8 MiB. Already cached: 0 B. No additional space will be used or freed after the operation.
Continue? [y/n/? shows all options] (y): 
Retrieving package nvidia-gfxG04-kmp-default-367.35_k4.1.12_1-25.1.x86_64                                                     (1/1),   5.8 MiB ( 64.6 MiB unpacked)
Retrieving: nvidia-gfxG04-kmp-default-367.35_k4.1.12_1-25.1.x86_64.rpm ..........................................................................[done (2.2 MiB/s)]
Checking for file conflicts: ................................................................................................................................[done]
(1/1) Installing: nvidia-gfxG04-kmp-default-367.35_k4.1.12_1-25.1.x86_64 ....................................................................................[done]
Additional rpm output:
make: Entering directory '/usr/src/linux-4.1.27-27-obj/x86_64/default'
  Building modules, stage 2.
  MODPOST 0 modules
make: Leaving directory '/usr/src/linux-4.1.27-27-obj/x86_64/default'
/usr/src/kernel-modules/nvidia-367.35-default /
make "CC=cc" KBUILD_OUTPUT=/usr/src/linux-obj/x86_64/default KBUILD_VERBOSE= -C /lib/modules/4.1.27-27-default/source M=/usr/src/kernel-modules/nvidia-367.35-default ARCH=x86_64 NV_KERNEL_SOURCES=/lib/modules/4.1.27-27-default/source NV_KERNEL_OUTPUT=/usr/src/linux-obj/x86_64/default NV_KERNEL_MODULES="nvidia nvidia-uvm nvidia-modeset nvidia-drm" INSTALL_MOD_DIR=kernel/drivers/video modules
make[1]: Entering directory '/usr/src/linux-4.1.27-27'
make[2]: Entering directory '/usr/src/linux-4.1.27-27-obj/x86_64/default'
  Building modules, stage 2.
  MODPOST 4 modules
make[2]: Leaving directory '/usr/src/linux-4.1.27-27-obj/x86_64/default'
make[1]: Leaving directory '/usr/src/linux-4.1.27-27'
ld -T /lib/modules/4.1.27-27-default/source/scripts/module-common.lds -r -o nv-linux.o \
  nvidia.mod.o nvidia/nv-interface.o
/

Modprobe blacklist files have been created at /etc/modprobe.d to prevent Nouveau from loading. This can be reverted by deleting /etc/modprobe.d/nvidia-*.conf.

*** Reboot your computer and verify that the NVIDIA graphics driver can be loaded. ***

depmod: WARNING: //lib/modules/4.1.27-27-default/misc/vboxvideo.ko disagrees about version of symbol VBoxGuest_RTLogBackdoorPrintf
depmod: WARNING: //lib/modules/4.1.27-27-default/misc/vboxvideo.ko disagrees about version of symbol VBoxGuest_RTErrConvertToErrno
depmod: WARNING: //lib/modules/4.1.27-27-default/misc/vboxvideo.ko disagrees about version of symbol VBoxGuest_RTAssertShouldPanic
depmod: WARNING: //lib/modules/4.1.27-27-default/misc/vboxvideo.ko disagrees about version of symbol VBoxGuest_RTAssertMsg1Weak
depmod: WARNING: //lib/modules/4.1.27-27-default/misc/vboxvideo.ko disagrees about version of symbol VBoxGuest_RTAssertMsg2Weak
Warning: /lib/modules/4.1.27-27-default is inconsistent
Warning: weak-updates symlinks might not be created


Output of nvidia-gfxG04-kmp-default-367.35_k4.1.12_1-25.1.x86_64.rpm %posttrans script:
    Creating initrd: /boot/initrd-4.1.12-1-default
    Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force --force-drivers "nvidia   -drm" /boot/initrd-4.1.12-1-default 4.1.12-1-default
    *** Including module: bash ***
    *** Including module: warpclock ***
    *** Including module: i18n ***
    *** Including module: ifcfg ***
    *** Including module: drm ***
    *** Including module: plymouth ***
    *** Including module: kernel-modules ***
    Omitting driver i2o_scsi
    *** Including module: resume ***
    *** Including module: rootfs-block ***
    *** Including module: terminfo ***
    *** Including module: udev-rules ***
    Skipping udev rule: 91-permissions.rules
    Skipping udev rule: 80-drivers-modprobe.rules
    *** Including module: haveged ***
    *** Including module: systemd ***
    *** Including module: usrmount ***
    *** Including module: base ***
    *** Including module: fs-lib ***
    *** Including module: shutdown ***
    *** Including module: suse ***
    *** Including modules done ***
    *** Installing kernel module dependencies and firmware ***
    *** Installing kernel module dependencies and firmware done ***
    *** Resolving executable dependencies ***
    *** Resolving executable dependencies done***
    *** Hardlinking files ***
    *** Hardlinking files done ***
    *** Stripping files ***
    *** Stripping files done ***
    *** Generating early-microcode cpio image ***
    *** Constructing GenuineIntel.bin ****
    *** Store current command line parameters ***
    Stored kernel commandline:
    rd.driver.pre=nvidia
    rd.driver.pre=_drm
     resume=UUID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    root=UUID=xxxxxxxxxxxxxxxxxxxxxx rootflags=rw,relatime,data=ordered rootfstype=ext4
    *** Creating image file ***
    *** Creating image file done ***
    Some kernel modules could not be included
    This is not necessarily an error:
    swap
    _drm
    Update bootloader...
    Creating initrd: /boot/initrd-4.1.27-24-default
    Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force --force-drivers "nvidia   -drm" /boot/initrd-4.1.27-24-default 4.1.27-24-default
    *** Including module: bash ***
    *** Including module: warpclock ***
    *** Including module: i18n ***
    *** Including module: ifcfg ***
    *** Including module: drm ***
    *** Including module: plymouth ***
    *** Including module: kernel-modules ***
    Omitting driver i2o_scsi
    *** Including module: resume ***
    *** Including module: rootfs-block ***
    *** Including module: terminfo ***
    *** Including module: udev-rules ***
    Skipping udev rule: 91-permissions.rules
    Skipping udev rule: 80-drivers-modprobe.rules
    *** Including module: haveged ***
    *** Including module: systemd ***
    *** Including module: usrmount ***
    *** Including module: base ***
    *** Including module: fs-lib ***
    *** Including module: shutdown ***
    *** Including module: suse ***
    *** Including modules done ***
    *** Installing kernel module dependencies and firmware ***
    *** Installing kernel module dependencies and firmware done ***
    *** Resolving executable dependencies ***
    *** Resolving executable dependencies done***
    *** Hardlinking files ***
    *** Hardlinking files done ***
    *** Stripping files ***
    *** Stripping files done ***
    *** Generating early-microcode cpio image ***
    *** Constructing GenuineIntel.bin ****
    *** Store current command line parameters ***
    Stored kernel commandline:
    rd.driver.pre=nvidia
    rd.driver.pre=_drm
     resume=UUID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    root=UUID=xxxxxxxxxxxxxxxxxxxxxxx rootflags=rw,relatime,data=ordered rootfstype=ext4
    *** Creating image file ***
    *** Creating image file done ***
    Some kernel modules could not be included
    This is not necessarily an error:
    swap
    _drm
    Update bootloader...

The solution

Uninstall the virtualbox guest packages: virtualbox-guest-kmp-default, virtualbox-guest-tools and virtualbox-guest-x11 and rerun # zypper in --force $(rpm -qa "nvidia-gfx*kmp*") as root. After that, the links are created as follows:

/lib/modules/4.1.27-27-default/weak-updates/updates # l
total 8
drwxr-xr-x 2 root root 4096 Aug  1 15:41 ./
drwxr-xr-x 4 root root 4096 Jul 21 19:03 ../
lrwxrwxrwx 1 root root   51 Aug  1 15:41 nvidia-drm.ko -> /lib/modules/4.1.12-1-default/updates/nvidia-drm.ko
lrwxrwxrwx 1 root root   55 Aug  1 15:41 nvidia-modeset.ko -> /lib/modules/4.1.12-1-default/updates/nvidia-modeset.ko
lrwxrwxrwx 1 root root   51 Aug  1 15:41 nvidia-uvm.ko -> /lib/modules/4.1.12-1-default/updates/nvidia-uvm.ko
lrwxrwxrwx 1 root root   47 Aug  1 15:41 nvidia.ko -> /lib/modules/4.1.12-1-default/updates/nvidia.ko

No comments:

Post a Comment