Recently, I’d noticed some shenanigans going on with my installation of Elementary OS Freya. Bluetooth had become erratic and certain apps had started to bog down. To some, Bluetooth might not be such a deal breaker, but I rely on both a Bluetooth mouse and Bluetooth trackpad for my desktop, so this was starting to become a problem.

It turns out that the issues were stemming from the 3.16 kernel. Considering that the Linux 4.0 kernel has a completely new method of handling the likes of touchpads, I thought it might be a good idea to undertake the upgrade.

Now, if you remember, I had similar dealings with this when I upgraded my desktop from Ubuntu 14.10 to 15.04 (see my post “Tweak your touchpad to taste in Linux“), but since stepping away from Ubuntu, I assumed the issues that caused me to need to tweak the touchpad in the first place were gone.

Hello, old friend.

So, in order to get around the problems, I found myself having to upgrade the Elementary OS Freya kernel to the 4.x release. I’d been wanting to do this for a while anyway, in order to take advantage of some of the improvements and newer features found in the 4.x kernel. One of the biggest improvements is the ability to enable kernel upgrading that doesn’t require rebooting. This is a serious boon for server admins, but it does require a bit more work than most desktop users are willing to go through.

The kernel in my sites is 4.0.5, and it includes improvements for:

  • ARM, x86, MIPS, PowerPC, s390, ARM64, and PA-RISC hardware
  • Btrfs, EXT4, XFS, OverlayFS, jbd2, Optimized MPEG Filesystem (OMFS), and NFS file systems
  • Updated drivers (especially for ACPI, ATA, CLK, General-purpose input/output, GPU
  • Improved input/output memory management
  • Minor networking and sound fixes

With that said, let’s upgrade.

Word of warning

It should go without saying, upgrading a kernel isn’t like upgrading a user-space application. Things can go wrong. However, for the most part, this isn’t like the old days where you were compiling a kernel and hoping for the best. The process has smoothed out quite a lot.

Even so, when you upgrade to a kernel that isn’t found in Ubuntu’s standard repositories (or a Ubuntu-derivative, such as Elementary OS Freya), be aware that the new kernel will need to be manually updated from that point on. In other words, you won’t be seeing 4.x kernel updates in the built-in Software Updater application.

With that said, let’s upgrade.


Believe it or not, the process is incredibly simple. Here are the steps:

Download the necessary packages with the following commands (run from a terminal window):

For 32-bit systems

For 64-bit systems

Change into the directory you downloaded the files into and issue the following command to upgrade:

sudo dpkg -i linux-headers-4.0.5*.deb linux-image-4.0.5*.deb

Finally, issue the command sudo update-grub to update the grub bootloader.

Once everything has completed, reboot the machine, and you’re good to go. When the system reboots, open up a terminal window and issue the command uname -r to ensure you are in fact running the 4.0.5 kernel.

Once you’ve undertaken this upgrade, make sure to check for upgrades. In fact, immediately after upgrading to 4.0.5, I jumped right to 4.0.8 (download the necessary files for 4.0.8).

Upgrading the Linux kernel is something just about any user can do. If you’re wanting to get some of the improvements of the latest, greatest 4.x kernel, and you’re running a distribution that is holding tight to the 3.x release, give these instructions a try and see if your Linux machine doesn’t enjoy a bit more 4.x freedom.