13

As 16.10 is getting released, is it possible to use its kernel in 16.04?

I know it will be offered in 16.04.2 due on February, but with problems my laptop is having on 16.04 I would rather start using it earlier.

muru
  • 197,895
  • 55
  • 485
  • 740

6 Answers6

15

The second point release for Ubuntu 16.04 (Xenial Xerus) is scheduled for February 16th, 2017. It will be powered by Linux kernel 4.8 replacing the currently used 4.4 branch.

To test the upcoming HWE Stack before the official release of 16.04.2:

sudo apt-get install linux-generic-hwe-16.04-edge

This package has been available in the xenial repository since early December 2016.

Note: This kernel package is no longer available under the name linux-generic-lts-yakkety described in older answers.

See https://wiki.ubuntu.com/Kernel/RollingLTSEnablementStack for more details on Ubuntu's new approach for offering HWE kernels.

4

Do this:

sudo add-apt-repository ppa:canonical-kernel-team/ppa 
sudo apt update
sudo apt install linux-image-generic-lts-yakkety

Cheers!

ThiagoCMC
  • 829
  • 4
  • 13
  • 27
  • Your proposed solution falls just short. You will get an error message Error! Your kernel headers for kernel 4.8.0-25-generic cannot be found. As you need to install other packages $ sudo apt-get install linux-headers-generic-lts-yakkety linux-signed-generic-lts-yakkety – Antonio Dec 06 '16 at 19:50
  • Note that the repository will warn you: It IS NOT RECOMMENDED that you subscribe to this PPA. – k0pernikus Dec 07 '16 at 16:19
  • 1
    linux-image-generic-lts-yakkety package seems to have been deleted: https://www.ubuntuupdates.org/package/canonical_kernel_team/xenial/main/base/linux-image-generic-lts-yakkety – Denys Kniazhev-Support Ukraine Jan 07 '17 at 16:51
3

Here is what I did and it works great. I've been using it with the Cinnamon 3.2 desktop:

sudo add-apt-repository ppa:canonical-kernel-team/ppa
sudo apt update
sudo apt install linux-image-generic-lts-yakkety

This will allow any updates to come to you via the software updater.

If you don't like it, you can uninstall:

sudo apt-get install ppa-purge
sudo apt purge linux-image-generic-lts-yakkety
sudo ppa-purge ppa:canonical-kernel-team/ppa
k0pernikus
  • 6,115
Dave
  • 1,454
  • Note that the repository will warn you: It IS NOT RECOMMENDED that you subscribe to this PPA. – k0pernikus Dec 07 '16 at 16:18
  • Yes, this is true, the kernels are more like a "work in progress", so to speak, before they become an official release. So, you you may have more frequent updates. I have not any problems or issues. – Dave Dec 09 '16 at 02:16
  • The ppa is used for building pre-release and test kernels. – Dave Dec 09 '16 at 04:38
2

Now you can manually download and install mainline kernels from Ubuntu mainline PPA.

This is not recommended, because these kernels will never get updates and do not have Ubuntu patches.

After 16.10 is released, not immediately, linux-generic-hwe-16.04-edge will appear in official repos for 16.04.

You can install it and get the new kernel with regular updates.

Pilot6
  • 90,100
  • 91
  • 213
  • 324
0

You can try and if this works, the solution will not be supported by Canonical and by the LTS users. With this you are going to have TWO problems instead of one.

Remember that 16.10 will have its own upgrade policy. And this will affect your environment because you are going to merge the Yakkety kernel with Xenial packages.

If the kernel gives problems to you, you can try the first response here: How to update kernel to the latest mainline version without any Distro-upgrade?, and update your kernel to the latest mainline version that helps you.

ADDED: Ubuntu Long Term Support (LTS) releases (such as 16.04) have 5 years of support, with security updates and bugfixes, but it's assumed that you are going to use the components of the LTS release and minimize usage of components from other releases or PPAs. 16.10 is a non-LTS version, which only has support until August 2017. If you use the kernel from a non-LTS release in an LTS release, with a different timeframe of support, you will depend only on yourself, because you are going to use a core component (the kernel) from a non-LTS release in a LTS release.

Yonsy Solis
  • 862
  • 2
  • 8
  • 20
  • -1 @Pilot6's answer already mentions the mainline kernel option. Your first two paragraphs are vague; please add specific details. – wjandrea Oct 21 '16 at 18:28
  • @wjandrea the answer that you suggest was given after mine (mine was from Oct 12, the answer that you indicate was from Oct 13). We need to wait some months to have yaketti kernel releases in LTS will not work NOW, so the only option NOW is the mainline version that i link (and the answer that you indicate and was given AFTER mine indicate this too...) – Yonsy Solis Oct 21 '16 at 22:08
  • OK, I get what you're saying now. And yeah, Pilot6's answer was after yours. I missed that, sorry. I removed my downvote. – wjandrea Oct 22 '16 at 00:23
0

Yes you can use Kernel 4.8 in Ubuntu 16.04 but..

When the push to upgrade Ubuntu 14.04 to 16.04 appeared during system updates I went ahead. Immediately I had problems with my laptop and upgraded the kernel from 4.4 to 4.6.3, 4.7.5 and now am using 4.8.1. Ubuntu 16.10 ships with 4.8.0 one level below.**

As others mentioned previously when you manually install a specific kernel version it's not automatically updated. I don't mind sitting on a version that's working for me though. Manually installed kernels are not automatically removed by Ubuntu system updates giving you the freedom of booting with various versions you've installed. Conversely you need to monitor the size of /boot and periodically clean out older versions you no longer want/need:

rick@dell:~$ ls -l /boot/init*
-rw-r--r-- 1 root root 29784512 Sep 14 19:16 /boot/initrd.img-3.13.0-92-generic
-rw-r--r-- 1 root root 35594578 Sep 14 19:16 /boot/initrd.img-4.4.0-36-generic
-rw-r--r-- 1 root root 35599246 Sep 20 17:21 /boot/initrd.img-4.4.0-38-generic
-rw-r--r-- 1 root root 44243520 Oct 12 03:43 /boot/initrd.img-4.4.0-42-generic
-rw-r--r-- 1 root root 34749637 Sep 14 19:16 /boot/initrd.img-4.6.3-040603-generic
-rw-r--r-- 1 root root 34621634 Sep 14 19:16 /boot/initrd.img-4.7.1-040701-generic
-rw-r--r-- 1 root root 34620508 Sep 14 19:16 /boot/initrd.img-4.7.2-040702-generic
-rw-r--r-- 1 root root 34621988 Sep 18 09:56 /boot/initrd.img-4.7.3-040703-generic
-rw-r--r-- 1 root root 42865461 Oct  7 16:52 /boot/initrd.img-4.7.5-040705-generic
-rw-r--r-- 1 root root 45625235 Oct  8 15:10 /boot/initrd.img-4.8.1-040801-generic

Users of specific hardware are almost forced to upgrade their kernel to fix errors that effect their platform. Typically this is due to new hardware but could also be related to an Intel or Nvidia glitch introduced in the older kernel.

When installing a newer kernel be advised it isn't supported by Ubuntu.

How to install a newer Kernel

Pictures and more detailed instructions for manually installing a new can be found at: Ubuntu 15.10: Various "types" of freezes and now unexpected shutdown. A breif summary is provided here.

To see what kernel versions are available for installations type this into your browser address bar:

http://kernel.ubuntu.com/~kernel-ppa/mainline/

Scroll down to the kernel version you want to install and click on the link. I'll assume you are on Intel / AMD 64-bit platform and want the generic Kernel version. For myself I want to download 4.8.3 to get the "Dirty Cow" security patch as discussed here: What is "Dirty COW" bug and How do I protect against that bug?.

After selecting the kernel 4.8.3 link I scroll down to the section Build for amd64 succeeded and see the following files:

  linux-headers-4.8.3-040803_4.8.3-040803.201610200531_all.deb
  linux-headers-4.8.3-040803-generic_4.8.3-040803.201610200531_amd64.deb
  linux-headers-4.8.3-040803-lowlatency_4.8.3-040803.201610200531_amd64.deb
  linux-image-4.8.3-040803-generic_4.8.3-040803.201610200531_amd64.deb
  linux-image-4.8.3-040803-lowlatency_4.8.3-040803.201610200531_amd64.deb

We don't want "low latency" just "generic" plus "all". First we need to download them to our system using the wget command. Then we need to install them and finally reboot the system:

cd /tmp
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8.3/linux-headers-4.8.3-040803_4.8.3-040803.201610200531_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8.3/linux-headers-4.8.3-040803-generic_4.8.3-040803.201610200531_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8.3/linux-image-4.8.3-040803-generic_4.8.3-040803.201610200531_amd64.deb
sudo dpkg -i *.deb
sudo reboot

Remember manually installed Kernels like we've just done, are not automatically deleted by Ubuntu. Ubuntu automatically deletes older kernel versions it installs only keeping the current version and the version previous to it. Therefore monitor the size of your /boot directory and periodically remove kernels you manually installed and no longer need. Don't use rm (remove) command, follow instructions found using google.

  • @CharlesGreen I put a heading at the top starting with the word Yes. I removed most of the last paragraph suggesting OP post his problems before upgrading Kernel. Can you reconsider your judgement? – WinEunuuchs2Unix Oct 21 '16 at 22:50
  • You demonstrate good knowledge of the subject and in my view you are expressing appropriate caution and warnings - but the op is asking how to implement a newer kernel. I'll revise my vote on that shortly. – Charles Green Oct 21 '16 at 23:25
  • @CharlesGreen I never realized if he was asking how to install a kernel. I'll add that section. – WinEunuuchs2Unix Oct 21 '16 at 23:31
  • It was not terribly clear, because the op was asking both 'how-to', and 'is it possible' – Charles Green Oct 21 '16 at 23:33
  • 1
    @CharlesGreen I see the "How can I..." in the title now. I missed that the first go around. Anyway I've added the section on how to find the kernel files on Ubuntu webpages, download them and install them. – WinEunuuchs2Unix Oct 21 '16 at 23:56