Linux Kernel 5.4 is now an official LTS Release and is supported until 2022 {December 2021}. The Linux 5.4 kernel’s status was changed from “stable” to “longterm” – Kernel 5.4 Greg Maintainer Kroah-Hartman & Sasha Levin Released 2019-11-24 and Projected EOL Dec, 2021. https://www.kernel.org/category/releases.html
Longterm – There are usually several “longterm maintenance” kernel releases provided for the purposes of backporting bugfixes for older kernel trees. Only important bugfixes are applied to such kernels and they don’t usually see very frequent releases, especially for older trees.
Install Kernel 5.4 on 64 Bit Systems
Before you install Kernel, choose the proper upstream Kernel files. The build directories are nicely organized into per architecture groups. For example, if one is using a 64-bit/amd64 architecture and wants the generic kernel version you would want those files marked A, from the appropriate group.
If you want the low latency version, B. Build for amd64 succeeded (see BUILD.LOG.amd64):
AB – linux-headers-4.19.0-041900_4.19.0-041900.201810221809_all.deb
A – linux-headers-4.19.0-041900-generic_4.19.0-041900.201810221809_amd64.deb
B – linux-headers-4.19.0-041900-lowlatency_4.19.0-041900.201810221809_amd64.deb
A – linux-image-unsigned-4.19.0-041900-generic_4.19.0-041900.201810221809_amd64.deb
B – linux-image-unsigned-4.19.0-041900-lowlatency_4.19.0-041900.201810221809_amd64.deb
A – linux-modules-4.19.0-041900-generic_4.19.0-041900.201810221809_amd64.deb
B – linux-modules-4.19.0-041900-lowlatency_4.19.0-041900.201810221809_amd64.deb
Installing Kernel via Commandline
Run the following commands in terminal to install Kernel 5.4 on 64 Bit Systems – Build for amd64 Systems:
sudo apt-get update
sudo apt-get upgrade
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-headers-5.4.0-050400_5.4.0-050400.201911242031_all.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-headers-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-headers-5.4.0-050400-lowlatency_5.4.0-050400.201911242031_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-image-unsigned-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-image-unsigned-5.4.0-050400-lowlatency_5.4.0-050400.201911242031_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-modules-5.4.0-050400-generic_5.4.0-050400.201911242031_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4/linux-modules-5.4.0-050400-lowlatency_5.4.0-050400.201911242031_amd64.deb
sudo dpkg -i *.deb
Once installed, update the system:
sudo apt-get update
sudo apt-get upgrade
NOTE: Build for i386 failed (see BUILD.LOG.i386): linux-headers-5.4.0-050400_5.4.0-050400.201911242031_all.deb *_i386.deb
Uninstalling Upstream Kernels
Note that the upstream kernels have their own ABI namespace, so they install side by side with the stock Ubuntu kernels (each kernel has a separate directory under /lib/modules/VERSION for example). This means that you can keep several mainline and Ubuntu stock kernels installed at the same time and select the one you need from the GRUB boot menu.
If you would like to uninstall an upstream kernel anyway, execute the following to find the exact name of the kernel packages you want to uninstall:
dpkg -l | grep "linux\-[a-z]*\-"
and then execute the following to uninstall them:
sudo apt-get remove KERNEL_PACKAGES_TO_REMOVE
Remember that several packages can belong to one kernel version: common headers, architecture specific headers and the architecture specific image.
Also, once the mainline packages are removed, one may still see entries for these via the above dpkg command. To purge these entries execute at a terminal:
sudo dpkg --purge ENTRY