Linux Kernel 5.0 Released, How to Install it in Ubuntu

Last updated: March 4, 2019

Linux Kernel

Linus Torvalds announced the released of Kernel 5.0 yesterday afternoon. He wrote on lkml.org:

Ok, so the last week of the 5.0 release wasn’t entirely quiet, but it’s a lot smaller than rc8 was, and on the whole I’m happy that I delayed a week and did an rc8.

It turns out that the actual patch that I talked about in the rc8 release wasn’t the worrisome bug I had thought: yes, we had an uninitialized variable, but the reason we hadn’t immediately noticed it due to a warning was that the way gcc works, the compiler had basically initialized it for us to the right value. So the same thing that caused not the lack of warning, also effectively meant that the fix was a no-op in practice.

But hey, we had other bug fixes come in that actually did matter, and the uninitialized variable _could_ have been a problem with another compiler.

Regardless – all is well that ends well. We have more than a handful of real fixes in the last week, but not enough to make me go “Hmm, things are really unstable”. In fact, at least two thirds of the patches are marked as being fixes for previous releases, so it’s not like 5.0 itself looks bad.

Changes in Linux Kernel 5.0 include:

  • AMD Radeon FreeSync support
  • Logitech High Resolution Scrolling support
  • Raspberry Pi Touchscreen support out of the box.
  • New console font for HiDPI and retina screens.
  • Initial support for NVIDIA Turing GPUs
  • And numerous other changes

How to Install Linux Kernel 5.0 in Ubuntu:

The mainline kernels do not include any Ubuntu-provided drivers or patches. They are not supported and are not appropriate for production use

The mainline kernel packages for Linux 5.0 are available for download at the link below:

Download Kernel 5.0

Depends on your OS type, download and install the packages in turns:

  1. linux-headers-5.0.0-xxxxxx_all.deb
  2. linux-headers-5.0.0-xxx-generic(/lowlatency)_xxx_amd64(/i386).deb
  3. linux-modules-5.0.0-xxx-generic(/lowlatency)_xxx_amd64(/i386).deb
  4. linux-image-xxx-5.0.0-xxx-generic(/lowlatency)_xxx_amd64(/i386).deb

Select generic for common system, and lowlatency for a low latency system (e.g. for recording audio), amd64 for 64bit system, i386 for 32bit system, or armhf, arm64, etc for other OS types.

Alternatively you can download and install the kernel binaries via terminal commands (Ctrl+Alt+T):

For 64-bit OS:

cd /tmp/

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000_5.0.0-050000.201903032031_all.deb

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-image-unsigned-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-modules-5.0.0-050000-generic_5.0.0-050000.201903032031_amd64.deb

sudo dpkg -i *.deb

for 32-bit OS:

cd /tmp/

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000_5.0.0-050000.201903032031_all.deb

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-headers-5.0.0-050000-generic_5.0.0-050000.201903032031_i386.deb

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-image-5.0.0-050000-generic_5.0.0-050000.201903032031_i386.deb

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/linux-modules-5.0.0-050000-generic_5.0.0-050000.201903032031_i386.deb

sudo dpkg -i *.deb

Once installed, restart your computer and enjoy!

Uninstall Linux Kernel 5.0:

Restart your machine and select boot with the previous kernel in boot menu ‘Grub2 -> Advanced Option for Ubuntu’. Then run command to remove Linux Kernel 5.0:

sudo dpkg --purge linux-image-5.0.0-050000-generic linux-image-unsigned-5.0.0-050000-generic

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1

5 responses to Linux Kernel 5.0 Released, How to Install it in Ubuntu

  1. It’s worth noting that Ubuntu provides a somewhat modified kernel that contains features that are not found in the mainline version. For example, the Ubuntu kernel provides support for ZFS, but the mainline kernel does not. If you use ZFS and you switch to one of the mainline kernels – such as Kernel 5.0 – you will lose the ability to access your ZFS drives. (Eventually Ubuntu will modify their version and it will contain support for ZFS, but you’ll need to wait a little while.) For now, the recently-released Kernel 5.0 might break a few things in your system.

  2. Hi! Is there any ready distribution of Ubuntu 18.04 with 5 kernel? My laptop lets install only Ubuntu 19.04 (because of 5-th kernel).

    • This is brand new, but I’m running 18.04 with the linux-image-generic-hwe-18.04 kernel, and it has just been updated to tracking the 19.04 kernel — it updated from 4.18.0-25 to 5.0.0-23 . If the laptop limps along on 4.18 kernel you can use a 18.04.2 CD and on first update and reboot it’ll be running 5.0.0-23. Otherwise, 18.04.3 ISO is supposed to be ready August 8th.

  3. hi i followed the instructions and this error appeared :

    subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
    linux-headers-5.0.0-050000-generic
    linux-image-unsigned-5.0.0-050000-generic

    how can i fix this

    • Seems to be a problem with initramfs-tools, error 139. Any problem with? and sudo chmod -x /usr/share/initramfs-tools/hooks/SOMETHING (my was plymouth), sudo dpkg –configure -a .