0

I recently updated/upgraded 22.04, and it broke my nvidia driver. It took me a couple of days to get an nvidia driver working. And that is using 5.15.0-69-generic. The newest kernels (6 . . .) don't even have header files. I think I can download them using sudo apt install linux-headers-$(uname-r) but the nvidia driver I was using no longer worked in the two 6... kernels.

So, I would like to specify the 5.15 ... kernel, rather than manually choosing it from grub.

Any suggestions would be welcome.

Thanks, Tim

DrTSPC
  • 67
  • 1
    All you should have to do is remove the version 6 kernel files and during that process it should update the grub to use the 5.15 Kernels. From a terminal window type in sudo apt remove linux- then press Tab 2x and it should show you the Kernel files. Remove the headers, image, and modules that deal with the 6x Kernel. Sounds like you can actually bypass the headers since they probably are not installed. – Terrance Apr 08 '23 at 04:06
  • 1
    You mention 6... kernels thus I'm not sure what you've done (5.15 is the GA kernel, 5.19 the current HWE with 6.2 the next -edge kernel, plus some OEM options), but you can always amend your grub config to default to whichever kernel you prefer (including have it survive upgrades, though you'll have to mark that kernel as being held so it's not removed when outdated). – guiverc Apr 08 '23 at 04:17

1 Answers1

-1

You can follow this asnwer

Installing the latest kernel. you can use an automated script to install the latest kernel:

Install the shell script which automatically checks and install the latest kernel:

wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh
sudo install ubuntu-mainline-kernel.sh /usr/local/bin/

Run the shell script:

sudo ubuntu-mainline-kernel.sh -c

Install the latest stable kernel:

sudo ubuntu-mainline-kernel.sh -i

Press Y to accept the installation.

Reboot to boot into the latest kernel:

sudo reboot

for the future, if you'd like to recheck and reinstall the latest stable kernel, you can simply run:

sudo ubuntu-mainline-kernel.sh -i

https://askubuntu.com/a/1388117/236992 The solution posted by Always Available is the best

Hunter_115
  • 58
  • 1
  • 9