Score:2

Nvidia v495 kernel doesn't load after upgraded to kernel 5.16

cn flag

The Nvidia version 495.46 display driver hasn't loaded after the linux-generic-5.16 installation. I removed some of the older kernel modules using sudo apt autoremove. The graphics card I'm using is NVIDIA GeForce RTX 2080 Ti Rev. Here is the result of dmesg

sudo dmesg | grep nvidia
[    0.619407] nvidia-gpu 0000:01:00.3: enabling device (0000 -> 0002)
[    3.869919] audit: type=1400 audit(1642964710.963:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=947 comm="apparmor_parser"
[    3.869921] audit: type=1400 audit(1642964710.963:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=947 comm="apparmor_parser"

And the Secure boot is disabled from the UEFI config. The motherboard model is ROG STRIX Z490-I GAMING

Terrance avatar
id flag
The NVIDIA driver is not compatible with the 5.16 mainline kernel (yet). It will not build via DKMS into the 5.16 kernel.
Kenryu Shibata avatar
cn flag
oh, ok thanks btw. Then I will stick with kernel 5.13
guiverc avatar
cn flag
You've provided no OS & release details; but 5.16 is not a *supported* kernel for any on-topic release of Ubuntu. What OS & release are you using?
Score:5
pw flag
Oli

Actually just been through this to test out 5.16. I've seen this before on other kernels that Nvidia hasn't fully supported yet and it's been hard to fix, but this time it's quite easy to work around.

  1. Open /usr/src/nvidia-495.46/nvidia-uvm/uvm_migrate_pageable.c in the editor of your choice (I chose nano) as root.
  2. Search for MIGRATE_PFN_LOCKED. You will find two instances where the code reads | MIGRATE_PFN_LOCKED at the end of the line.
  3. Just remove these phrases. Leave the rest of the line, and leave the semicolon at the end of the line. Get both, save and exit your editor.
  4. Compile via sudo dkms autoinstall — there should be no error now.
  5. Reboot to Ⓥictory

I got this from a community patch published on the nvidia forum, but copying and pasting that around is harder than just opening up the file and editing it manually. Please use that post as a reference for what you should end up with.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.