Linux Kernel 6.0 has been released recently, with many features, including support for the newest generation of processors from Intel and AMD and security updates to improve performance on various hardware devices! For end-users, the most significant change will likely be new capabilities added alongside stability improvements. As always, it is crucial that users carefully evaluate any risks involved in upgrading to a new kernel before doing so.
Some of the various changes besides the typical CPU improvements include the following.
- Kernel support for NVMe in-band authentication.
- Runtime verification subsystem.
- Raspberry Pi 4 V3D kernel driver.
- IO_uring user-space block driver.
- Buffered writes on XFS file systems.
- Send Protocol V2 support for Btrfs.
- H.265/HEVC API promoted to stable.
For a complete list of changes, visit the 6.0 kernel changelog by visiting Kernel Newbies.
Users who installed the Nvidia drivers from the standard Mesa drivers will not be able to install the kernel using this method.
The following tutorial will teach you how to install Linux Kernel 6.0 on Pop!_OS 22.04 LTS release series using the command line terminal and remove and restore the original kernel.
Table of Contents
Before you begin, update your system to ensure all existing packages are up to date, as this is essential when installing/upgrading Linux kernels to avoid conflicts.
sudo apt update && sudo apt upgrade
Import PPA & Install Linux Kernel 6.0
The best option to install the Linux 6.0 kernels is to install the ppa:tuxinvader/jammy-mainline by TuxInvader. This has some of the most up-to-date mainline generic kernels and the previous 5.19 kernel. Pop!_OS users can safely use this, as Pop!_OS 22.04 LTS is based on Jammy Jellyfish LTS.
Please note that these kernels will naturally be removed and replaced with updated kernels from this PPA since the mainline kernel builds naturally become EOL within a smaller time frame than LTS kernels. But, once you add the PPA, you will naturally be prompted to upgrade each time a minor update or significant release comes forward.
Import the Jammy Mainline Tuxinvader PPA as follows.
First, make sure the following dependencies are installed.
sudo apt install dirmngr ca-certificates dkms software-properties-common gnupg gnupg2 apt-transport-https -y
Next, import the GPG key needed for all the repositories.
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/tuxinvader.gpg --keyserver keyserver.ubuntu.com --recv-keys 3844A6C1C6FD1056
If you have issues importing the GPG key from LaunchPAD, please see the end section on GPG troubleshooting at the end of the article.
gpg: keybox '/usr/share/keyrings/tuxinvader.gpg' created gpg: key 3844A6C1C6FD1056: public key "Launchpad PPA for tuxinvader" imported gpg: Total number processed: 1 gpg: imported: 1
Now, import the Jammy Mainline PPA using the following command. Please note you need to import both repositories listed here for anything on your system that may require the source kernel files.
echo 'deb [signed-by=/usr/share/keyrings/tuxinvader.gpg] https://ppa.launchpadcontent.net/tuxinvader/jammy-mainline/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list.d/tuxinvader.list echo 'deb-src [signed-by=/usr/share/keyrings/tuxinvader.gpg] https://ppa.launchpadcontent.net/tuxinvader/jammy-mainline/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list.d/tuxinvader.list
Once installed, update your repository list.
sudo apt-get update
Next, proceed to the installation of the Linux Kernel. Ensure that any sensitive documents are backed up in case anything goes wrong.
Next, install the 6.0 generic Linux kernel drivers by executing the following command.
sudo apt-get install linux-generic-6.0
Please note that this will only work during the lifetime of Linux Kernel 6.0. After its EOL, the command will not work, and you should not be seeking to install the generic version, regardless.
Once complete, you will need to reboot your system for the new kernel to be fully activated.
Once logged back into your system, run the following command to confirm the new kernel version is running.
For people that love pretty printouts, install the neofetch package.
sudo apt install neofetch -y
Now print your system specs that will show the kernel version as follows.
How to Restore Default Kernel
For users who find the new kernel has bugs for their hardware, say, loss of sound, use the following steps to restore the default kernel; if you installed an alternative kernel, replace the default kernel section with whatever you want to install.
First, remove the PPA.
sudo rm /etc/apt/sources.list.d/tuxinvader.list
Now run an APT update to ensure the repository is removed.
sudo apt-get update
Begin the removal and restoration; use the following command.
sudo apt-get autoremove linux-generic-6.0* linux-headers-6.0* linux-image-unsigned-6.0* linux-modules-6.0* -y
Next, you will see the following prompt advising that you must make sure a kernel is installed or re-installed before you reboot if you remove the current kernel.
Press the tab key, select <No>, and press the ENTER KEY.
Before we reboot, make sure the default generic is installed, do not fuss too much as you can install alternative versions later on as we are just trying to get your system back to working order.
sudo apt install --install-recommends linux-generic -y
Please do not ignore this command; failure to have a kernel installed may break your system.
Now verify the kernel installed, which should be the default generic kernel.
sudo uname -r
As mentioned above, you have fallen back to the default kernel.
For those who want options besides the PPA or manually installing, check out the following custom kernel tutorials, which often boast the latest Linux custom-built kernels.
- How to Install XanMod Linux Kernel on Pop!_OS 22.04 LTS – Edge branch contains the latest kernel.
How to Fix Broken LaunchPAD GPG Import
Users that have installed Pop!_OS 22.04 LTS for the first time or have not imported a GPG key before using the command line terminal will often have issues importing GPG keys from LaunchPAD PPAs due to the directories not being created. This is an easy fix. Use the following command that will, in turn, generate the directories.
sudo gpg --list-keys
As mentioned above, the necessary directories have been created. This can be skipped, and use the following GPG import command below. If you have any issues with directories missing for this and any other PPA GPG key in the future, just run the above command.
Comments and Conclusion
Mainline kernels contain cutting-edge code that may not have been thoroughly tested and thus may contain undiscovered bugs. However, upgrading to Linux Kernel 6.0 can offer several benefits for those willing to take the risk. In addition, to support the newest generation processors, the 6.0 kernel includes several other changes and improvements, such as better power management capabilities and updated drivers for various devices.
Overall, upgrading to Linux Kernel 6.0 can offer users a more stable and responsive experience and provide access to the latest features and improvements.