Results 1 to 9 of 9

Thread: NVidia driver no longer loading after kernel update

  1. #1
    Join Date
    Dec 2009
    Beans
    13

    NVidia driver no longer loading after kernel update

    My desktop suddenly started to load in low resolution. I have an NVidia graphics card:
    Code:
    lspci -v 
    ...
    VGA compatible controller: NVIDIA Corporation GF116 [GeForce GTX 550 Ti] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: Gigabyte Technology Co., Ltd GF116 [GeForce GTX 550 Ti]
        Flags: bus master, fast devsel, latency 0, IRQ 12
        Memory at f6000000 (32-bit, non-prefetchable) [size=32M]
        Memory at e0000000 (64-bit, prefetchable) [size=128M]
        Memory at ec000000 (64-bit, prefetchable) [size=64M]
        I/O ports at bf00 [size=128]
        [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel modules: nvidiafb, nouveau
    But the NVidia card would not load:

    Code:
    $ cat /var/log/gpu-manager.log
    log_file: /var/log/gpu-manager.log
    last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
    new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
    can't access /run/u-d-c-nvidia-was-loaded file
    can't access /opt/amdgpu-pro/bin/amdgpu-pro-px
    Looking for nvidia modules in /lib/modules/5.3.0-26-generic/updates/dkms
    Looking for amdgpu modules in /lib/modules/5.3.0-26-generic/updates/dkms
    Is nvidia loaded? no
    Was nvidia unloaded? no
    Is nvidia blacklisted? no
    Is intel loaded? no
    Is radeon loaded? no
    Is radeon blacklisted? no
    Is amdgpu loaded? no
    Is amdgpu blacklisted? no
    Is amdgpu versioned? no
    Is amdgpu pro stack? no
    Is nouveau loaded? no
    Is nouveau blacklisted? yes
    Is nvidia kernel module available? no
    Is amdgpu kernel module available? no
    Vendor/Device Id: 10de:1244
    BusID "PCI:1@0:0:0"
    Is boot vga? yes
    Error: can't access /sys/bus/pci/devices/0000:01:00.0/driver
    The device is not bound to any driver.
    Error : Failed to open /dev/dri
    Error : Failed to open /dev/dri
    Error : Failed to open /dev/dri
    Error : Failed to open /dev/dri
    Does it require offloading? no
    last cards number = 1
    Has amd? no
    Has intel? no
    Has nvidia? yes
    How many cards? 1
    Has the system changed? No
    Single card detected
    Nothing to do
    
    My kernel is

    Code:
    $ uname -a
    Linux nerone 5.3.0-26-generic #28~18.04.1-Ubuntu SMP Wed Dec 18 16:40:14 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    I tried to no avail to purge old packages including NVidea drivers as suggested in https://askubuntu.com/questions/5944.../229663#229663

    My NVidia packages are in the 390 range:
    Code:
    dpkg -l | grep -i nvidia
    ii  libnvidia-cfg1-390:amd64 390.116-0ubuntu0.18.04.1 amd64 NVIDIA binary OpenGL/GLX configuration library
    ii  libnvidia-common-390 390.116-0ubuntu0.18.04.1 all  Shared files used by the NVIDIA libraries
    ii  libnvidia-compute-390:amd64 390.116-0ubuntu0.18.04.1    amd64    NVIDIA libcompute package
    ii  libnvidia-compute-390:i386  390.116-0ubuntu0.18.04.1    i386 NVIDIA libcompute package
    ii  libnvidia-decode-390:amd64  390.116-0ubuntu0.18.04.1    amd64    NVIDIA Video Decoding runtime libraries
    ii  libnvidia-decode-390:i386 390.116-0ubuntu0.18.04.1    i386 NVIDIA Video Decoding runtime libraries
    ii  libnvidia-encode-390:amd64  390.116-0ubuntu0.18.04.1    amd64    NVENC Video Encoding runtime library
    ii  libnvidia-encode-390:i386 390.116-0ubuntu0.18.04.1    i386 NVENC Video Encoding runtime library
    ii  libnvidia-fbc1-390:amd64  390.116-0ubuntu0.18.04.1    amd64    NVIDIA OpenGL-based Framebuffer Capture runtime library
    ii  libnvidia-fbc1-390:i386   390.116-0ubuntu0.18.04.1    i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
    ii  libnvidia-gl-390:amd64    390.116-0ubuntu0.18.04.1    amd64    NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
    ii  libnvidia-gl-390:i386 390.116-0ubuntu0.18.04.1    i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
    ii  libnvidia-ifr1-390:amd64  390.116-0ubuntu0.18.04.1    amd64    NVIDIA OpenGL-based Inband Frame Readback runtime library
    ii  libnvidia-ifr1-390:i386   390.116-0ubuntu0.18.04.1    i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
    rc  nvidia-304  304.132-0ubuntu0.16.04.2    amd64    NVIDIA legacy binary driver - version 304.132
    ii  nvidia-367  375.82-0ubuntu3   amd64    Transitional package for nvidia-375
    ii  nvidia-375  384.130-0ubuntu0.16.04.1    amd64    Transitional package for nvidia-384
    ii  nvidia-384  390.116-0ubuntu0.18.04.1    amd64    Transitional package for nvidia-driver-390
    ii  nvidia-compute-utils-390  390.116-0ubuntu0.18.04.1    amd64    NVIDIA compute utilities
    rc  nvidia-current  304.132-0ubuntu0.16.04.2    amd64    Transitional package for nvidia-current
    ii  nvidia-dkms-390 390.116-0ubuntu0.18.04.1    amd64    NVIDIA DKMS package
    ii  nvidia-driver-390 390.116-0ubuntu0.18.04.1    amd64    NVIDIA driver metapackage
    ii  nvidia-headless-no-dkms-390 390.116-0ubuntu0.18.04.1    amd64    NVIDIA headless metapackage - no DKMS
    ii  nvidia-kernel-common-390  390.116-0ubuntu0.18.04.1    amd64    Shared files used with the kernel module
    ii  nvidia-kernel-source-390  390.116-0ubuntu0.18.04.1    amd64    NVIDIA kernel source package
    rc  nvidia-opencl-icd-304 304.132-0ubuntu0.16.04.2    amd64    NVIDIA OpenCL ICD
    rc  nvidia-opencl-icd-367 375.39-0ubuntu0.16.04.1 amd64    Transitional package for nvidia-opencl-icd-375
    rc  nvidia-opencl-icd-384 390.77-0ubuntu0.18.04.1 amd64    Transitional package for nvidia-headless-390
    ii  nvidia-prime    0.8.8.2 all  Tools to enable NVIDIA's Prime
    ii  nvidia-settings 390.77-0ubuntu0.18.04.1 amd64    Tool for configuring the NVIDIA graphics driver
    ii  nvidia-utils-390  390.116-0ubuntu0.18.04.1    amd64    NVIDIA driver support binaries
    ii  xserver-xorg-video-nvidia-390   390.116-0ubuntu0.18.04.1    amd64    NVIDIA binary Xorg driver
    I rebooted and chose to use an earlier kernel and all worked!

    Code:
    uname -a
    Linux nerone 5.0.0-37-generic #40~18.04.1-Ubuntu SMP Thu Nov 14 12:06:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    
    cat /var/log/gpu-manager.log
    log_file: /var/log/gpu-manager.log
    last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
    new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
    can't access /opt/amdgpu-pro/bin/amdgpu-pro-px
    Looking for nvidia modules in /lib/modules/5.0.0-37-generic/updates/dkms
    Found nvidia module: nvidia-modeset.ko
    Looking for amdgpu modules in /lib/modules/5.0.0-37-generic/updates/dkms
    Is nvidia loaded? yes
    Was nvidia unloaded? no
    Is nvidia blacklisted? no
    Is intel loaded? no
    Is radeon loaded? no
    Is radeon blacklisted? no
    Is amdgpu loaded? no
    Is amdgpu blacklisted? no
    Is amdgpu versioned? no
    Is amdgpu pro stack? no
    Is nouveau loaded? no
    Is nouveau blacklisted? yes
    Is nvidia kernel module available? yes
    Is amdgpu kernel module available? no
    Vendor/Device Id: 10de:1244
    BusID "PCI:1@0:0:0"
    Is boot vga? yes
    Skipping "/dev/dri/card0", driven by "nvidia-drm"
    Skipping "/dev/dri/card0", driven by "nvidia-drm"
    Skipping "/dev/dri/card0", driven by "nvidia-drm"
    Skipping "/dev/dri/card0", driven by "nvidia-drm"
    Does it require offloading? no
    last cards number = 1
    Has amd? no
    Has intel? no
    Has nvidia? yes
    How many cards? 1
    Has the system changed? No
    Single card detected
    Nothing to do
    So I decided to change my boot options to use the earlier kernel.

    Find the boot options available:
    Code:
    sudo grep -Ei 'submenu|menuentry ' /boot/grub/grub.cfg | sed -re "s/(.? )'([^']+)'.*/\1 \2/"
    In my case I wanted the "advanced" top-level option (option 1, which immediately follows the default 0 for "ubuntu") and third submenu (ie, option 2)
    thus I changed the boot default:
    Code:
    sudo nano /etc/default/grub
    
    from
    Code:
    GRUB_DEFAULT=0
    to
    Code:
    GRUB_DEFAULT="1>2"
    then
    Code:
    sudo update-grub
    finally reboot

    All fine now. Looking forward to further Linux kernel updates that might address the issue.

    Or maybe there is a better work-around or fix?

  2. #2
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    8,430
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: NVidia driver no longer loading after kernel update

    The shim between the kernel and the binary blob is specific to each kernel version. If you install the driver through the package manager that shim generally gets automatically rebuilt by DKMS. If you install from elsewhere, such as the file from Nvidia's website, then it doesn't.

    Purging all the nvidia stuff and then installing the driver package should cause the shim to be built for the kernels you have installed. I got upgraded to 5.3 the other day and didn't have any problems, but I'm using a newer driver from the PPA.
    None but ourselves can free our minds

  3. #3
    Join Date
    May 2016
    Beans
    9

    Re: NVidia driver no longer loading after kernel update

    Thanks for that post, I had a similar problem this weekend, as the PC wouldn't recognise the monitor anymore and the profile in the graphical side of nvidia-settings was gone. Via nvidia-settings and Terminal I found that it couldn't find the registry key anymore. To be able to search for a proper solution I purged the nvidia driver (from the packages) and went back to nouveau for now. However, I need the proprietary driver for some games though. At some point, I do have to reinstall them.

  4. #4
    Join Date
    May 2013
    Location
    Galiza
    Beans
    4,009
    Distro
    Ubuntu

    Re: NVidia driver no longer loading after kernel update

    Please open Additional Drivers and install the recommended version as listed there. Do not install using the Nvidia binary or you will having this same problem in each kernel version update.

  5. #5
    Join Date
    Dec 2009
    Beans
    13

    Re: NVidia driver no longer loading after kernel update

    Thank you, @CatKiller, about the tip on DKMS. I had not realised that some code is compiled during the installation of NVidia drives.

    I have re-installed the NVidia drives from scratch using the commands:

    Code:
    sudo apt --purge autoremove nvidia*
    ubuntu-drivers list
    sudo apt install nvidia-driver-390
    The feedback in the terminal showed that the DKMS build worked for the Linux kernel 5.0 and some sanity testing was successful. Instead the build failed for kernel 5.3 and a log file generated:
    /var/crash/nvidia-kernel-source-390.0.crash

    Code:
    ProblemType: Package
    DKMSBuildLog:
     DKMS make.log for nvidia-390.116 for kernel 5.3.0-26-generic (x86_64)
     Sat 18 Jan 13:03:50 GMT 2020
     make[1]: Entering directory '/usr/src/linux-headers-5.3.0-26-generic'
     test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
     echo >&2;                            \
     echo >&2 "  ERROR: Kernel configuration is invalid.";        \
     echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
     echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";    \
     echo >&2 ;                            \
     /bin/false)
    Maybe some incompatability between the NVidia drivers and latest Linux in the repo?

    My repo sources are:
    Code:
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://gb.archive.ubuntu.com/ubuntu/ bionic main restricted
    deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://gb.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
    deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://gb.archive.ubuntu.com/ubuntu/ bionic universe
    deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic universe
    deb http://gb.archive.ubuntu.com/ubuntu/ bionic-updates universe
    deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
    ## team, and may not be under a free licence. Please satisfy yourself as to 
    ## your rights to use the software. Also, please note that software in 
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://gb.archive.ubuntu.com/ubuntu/ bionic multiverse
    deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic multiverse
    deb http://gb.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
    deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
    
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    #deb http://gb.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
    #deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
    
    deb http://security.ubuntu.com/ubuntu bionic-security main restricted
    deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
    deb http://security.ubuntu.com/ubuntu bionic-security universe
    deb-src http://security.ubuntu.com/ubuntu bionic-security universe
    deb http://security.ubuntu.com/ubuntu bionic-security multiverse
    deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
    
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    deb http://archive.canonical.com/ubuntu bionic partner
    # deb-src http://archive.canonical.com/ubuntu quantal partner
    Maybe the outcome will change with the next Linux/NVidia software update.

  6. #6
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    8,430
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: NVidia driver no longer loading after kernel update

    Quote Originally Posted by barbablu View Post
    The feedback in the terminal showed that the DKMS build worked for the Linux kernel 5.0 and some sanity testing was successful. Instead the build failed for kernel 5.3 and a log file generated:
    So, we've identified where the problem is. It's disappointing that kind of problem got through.

    I'd recommend trying the graphics drivers PPA. You can't use newer than the 390 branch with that card, but the PPA has a marginally newer version than the one in the standard repositories (390.129 vs 390.116) and the packaging is done by different people. Their install scripts might be able to handle the change better - I didn't have any problem going from 5.0 to 5.3 with my PPA driver, but mine's the 440 branch.

    Otherwise you could wait on the 5.0 kernel till the 5.3 gets an update again that makes it work with the nvidia package from the standard repository; official packages aren't supposed to break each other. Hopefully they won't let that state continue for long.
    None but ourselves can free our minds

  7. #7
    Join Date
    Dec 2009
    Beans
    13

    Thumbs up Re: NVidia driver no longer loading after kernel update

    Good news: I updated my system a few minutes ago and received NVidia 390 packages that went through the DKMS build fine. I can now start in full resolution under the latest kernel I have, 5.3!

  8. #8
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    8,430
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: NVidia driver no longer loading after kernel update

    Quote Originally Posted by barbablu View Post
    Good news: I updated my system a few minutes ago and received NVidia 390 packages that went through the DKMS build fine. I can now start in full resolution under the latest kernel I have, 5.3!
    Awesome
    None but ourselves can free our minds

  9. #9
    Join Date
    May 2020
    Beans
    1

    Re: NVidia driver no longer loading after kernel update

    Hello everyone,
    I had a similar problem after a system upgrade. Nvidia drivers and Xserver login were broken (except for Ubuntu on wayland which does not use the nvidia drivers). The only working combination of nvidia driver and kernel for me was to purge all nvidia drivers, install newest kernel and newest Nvidia driver from ppa.

    Working solution:
    nvidia-driver-440 440.82-0ubuntu0~0.18.04.1
    linux-image-5.3.0-51-generic 5.3.0-51.44~18.04.2

    Cheers

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •