Try updating the Kernel, the default kernel for ubuntu 21.10
at the time of writing should be 5.13.0-20-generic
.
Use the following command to check
$ uname -r
5.13.0-20-generic
Let’s update the system first so that all repositories are up to date. To update the system we used the following command.
$ sudo apt update && sudo apt upgrade -y
After the process is complete we can now download the Linux kernel headers from Ubuntu kernel mainline page. Use the following code to accomplish that:
$ wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.15-rc7/amd64/linux-headers-5.15.0-051500rc7_5.15.0-051500rc7.202110251930_all.deb
$ wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.15-rc7/amd64/linux-headers-5.15.0-051500rc7_5.15.0-051500rc7.202110251930_all.deb
--2021-11-01 10:58:10-- https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.15-rc7/amd64/linux-headers-5.15.0-051500rc7_5.15.0-051500rc7.202110251930_all.deb
Resolving kernel.ubuntu.com (kernel.ubuntu.com)... 91.189.94.216
Connecting to kernel.ubuntu.com (kernel.ubuntu.com)|91.189.94.216|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12189104 (12M) [application/x-debian-package]
Saving to: ‘linux-headers-5.15.0-051500rc7_5.15.0-051500rc7.202110251930_all.deb’
linux-headers-5.15.0-051500r 100%[===========================================>] 11.62M 16.1MB/s in 0.7s
2021-11-01 10:58:11 (16.1 MB/s) - ‘linux-headers-5.15.0-051500rc7_5.15.0-051500rc7.202110251930_all.deb’ saved [12189104/12189104]
- wget: this is used to retrieved content from the website.
- wget -c: instruct the system to continue downloading partially downloaded images.
Next, we can download Linux Generic headers with the following command.
$ wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.15-rc7/amd64/linux-headers-5.15.0-051500rc7-generic_5.15.0-051500rc7.202110251930_amd64.deb
When this is complete we can now download Linux kernel image from the following:
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.15-rc7/amd64/linux-image-unsigned-5.15.0-051500rc7-generic_5.15.0-051500rc7.202110251930_amd64.deb
Lastly, we can download the modules required to build the kernel.
$ wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.15-rc7/amd64/linux-modules-5.15.0-051500rc7-generic_5.15.0-051500rc7.202110251930_amd64.deb
Install new kernel now with the following command:
$ sudo dpkg -i *.deb
Selecting previously unselected package linux-headers-5.15.0-051500rc7-generic.
(Reading database ... 62253 files and directories currently installed.)
Preparing to unpack linux-headers-5.15.0-051500rc7-generic_5.15.0-051500rc7.202110251930_amd64.deb ...
Unpacking linux-headers-5.15.0-051500rc7-generic (5.15.0-051500rc7.202110251930) ...
Selecting previously unselected package linux-headers-5.15.0-051500rc7.
Preparing to unpack linux-headers-5.15.0-051500rc7_5.15.0-051500rc7.202110251930_all.deb ...
Unpacking linux-headers-5.15.0-051500rc7 (5.15.0-051500rc7.202110251930) ...
Selecting previously unselected package linux-image-unsigned-5.15.0-051500rc7-generic.
Preparing to unpack linux-image-unsigned-5.15.0-051500rc7-generic_5.15.0-051500rc7.202110251930_amd64.deb ...
Unpacking linux-image-unsigned-5.15.0-051500rc7-generic (5.15.0-051500rc7.202110251930) ...
Selecting previously unselected package linux-modules-5.15.0-051500rc7-generic.
Preparing to unpack linux-modules-5.15.0-051500rc7-generic_5.15.0-051500rc7.202110251930_amd64.deb ...
Unpacking linux-modules-5.15.0-051500rc7-generic (5.15.0-051500rc7.202110251930) ...
Setting up linux-headers-5.15.0-051500rc7 (5.15.0-051500rc7.202110251930) ...
Setting up linux-headers-5.15.0-051500rc7-generic (5.15.0-051500rc7.202110251930) ...
Setting up linux-image-unsigned-5.15.0-051500rc7-generic (5.15.0-051500rc7.202110251930) ...
I: /boot/vmlinuz is now a symlink to vmlinuz-5.15.0-051500rc7-generic
I: /boot/initrd.img is now a symlink to initrd.img-5.15.0-051500rc7-generic
Setting up linux-modules-5.15.0-051500rc7-generic (5.15.0-051500rc7.202110251930) ...
Processing triggers for linux-image-unsigned-5.15.0-051500rc7-generic (5.15.0-051500rc7.202110251930) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.15.0-051500rc7-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-051500rc7-generic
Found initrd image: /boot/initrd.img-5.15.0-051500rc7-generic
Found linux image: /boot/vmlinuz-5.13.0-20-generic
Found initrd image: /boot/initrd.img-5.13.0-20-generic
done
After installation is complete we can reboot the system for the new changes to take effect.
$ sudo shutdown -r now
Now you can check the version of the Linux kernel you are running again to see if we are successful with our installation
$ uname -r
5.15.0-051500rc7-generic
The above solved the shutdown bug for me, i hope it solves yours too.
Stay Safe!!