Should I Upgrade to the “Mainline” Kernels in Ubuntu?
Tags: ubuntu
Published: 2021-12-04 10:57:23

---
title: Should I Upgrade to the “Mainline” Kernels in Ubuntu?
published: true
date: 2021-11-27 07:14:54 UTC
tags: Ubuntu
canonical_url: https://stackallflow.com/ubuntu/should-i-upgrade-to-the-mainline-kernels-in-ubuntu/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">kernel</span><span style="font-size: 1.2em; color: initial;">mainline-kernel</span><span style="font-size: 1.2em; color: initial;">ppa</span><span style="font-size: 1.2em; color: initial;">updates</span><span style="font-size: 1.2em; color: initial;">upgrade</span></p>
</header>

Newer “mainline” versions of the kernel are available from the [Ubuntu kernel team](http://kernel.ubuntu.com/~kernel-ppa/mainline/), e.g. 3.4 and 3.5, while Ubuntu 12.04 is on 3.2.

- What are the mainline kernels?
- Are they better than my existing kernel?
- What are the pros and cons of upgrading to a mainline kernel?
- Will I easily be able to go back?

#### Best Answer

# Upgrading to a mainline kernel is usually _not_ a good idea

> Most of the basic information in this answer is from the [Mainline Builds wiki](http://www.google.com/url?sa=t&rct=j&q=mainline+builds&source=web&cd=6&ved=0CG4QFjAF&url=https%3A%2F%2Fwiki.ubuntu.com%2FKernel%2FMainlineBuilds&ei=1g7-T8zwOJGK2QX2qqy9Dw&usg=AFQjCNH9xkOHt1sffSUM1XVpnVrwLs_9Dw&cad=rja)

### 1. They are provided only for testing and are unsupported

- The mainline kernels are built from the latest unmodified “mainline” Linux kernel sources.
- The Ubuntu kernel team provides these _only_ for testing and debugging purposes, to see whether issues have been fixed “upstream”, i.e. by the _Linux_ kernel developers.
- They are therefore not supported and must be used _at your own risk;_ you can report possible bugs to kernel.org via _kernel-oops_, or if you want a faster solution, try posting to the [Linux Kernel Mailing List](http://en.wikipedia.org/wiki/Linux_kernel_mailing_list.)

### 2. They will often break drivers, especially Nvidia/AMD and wireless (Broadcom)

- The mainline kernels do not include any Ubuntu-provided drivers or patches
- This means **no binary drivers** for graphics, wireless, etc. are provided
- If you try installing binary drivers downloaded directly from the manufacturers, there is a very good chance they will not work because the mainline headers may be incompatible.
  - This will be especially true for non-LTS versions after 12.04 (12.10, 13.04, …), because the mainline kernels are built using the last _LTS_ toolchain (compilers, etc.), which is generally older than the toolchain on the latest non-LTS release.

### 3. You should only install these if you believe they may fix a critical problem you are having with the current kernel

- Newer kernels sometimes contain fixes for a hardware or filesystem problem you may have. For example, the internal HD4000 graphics on the latest Intel _Ivy Bridge_ CPUs occasionally froze, [a bug](https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/993187) which was fixed in kernels 3.3.6 and newer.
- You can try installing a mainline kernel in these circumstances, and see if it helps your problem.
- If it does, you should consider upgrading to the latest Ubuntu+1 kernel instead, which _does have_ binary drivers available for it.

### 4. If you install a mainline or other newer kernel, you can still choose to use your old (stable) kernel by selecting it at boot-time:

- Keep <kbd>Shift</kbd> pressed after turning on your computer.
- You will see the Grub menu as shown below. User the down arrow to go to “Previous Linux Versions” and press <kbd>Enter</kbd> ![enter image description here](https://i.stack.imgur.com/RA0tx.png)
- Select the option which has a version of _x.x.x-generic_, NOT one that has _x.x.x- **yyyyyy** -generic_ and press <kbd>Enter</kbd>. This is usually the first option unless you have installed multiple mainline/custom kernels. ![enter image description here](https://i.stack.imgur.com/HZ72h.png)

The post [Should I Upgrade to the “Mainline” Kernels in Ubuntu?](https://stackallflow.com/ubuntu/should-i-upgrade-to-the-mainline-kernels-in-ubuntu/) appeared first on [Stack All Flow](https://stackallflow.com).