Upgrade Ubuntu 12.04 LTS kernel to 3.11

I have various high-end PC’s, because I am really fond of lightning-fast hardware. But my development machines sometimes have issues with older kernels, because the drivers in the Ubuntu 12.04 LTS kernels that I run are outdated and do not support the kick-ass and brand-new hardware.

The reason I run 12.04 LTS is that most servers (I work with) run that version. And by running the latest long-term-stable on your development environment you can avoid writing software that cannot run on your production system, because it would simply not work there as well.

Even when you are limited to Ubuntu 12.04 LTS there are still many things you can choose. One thing you can tweak is your window manager. You can either run Ubuntu (using Unity), Xubuntu (with XFCE), Lubuntu (LXDE) or Kubuntu (KDE). You may run whatever variant you prefer, but Linus uses XFCE. My preference also goes to XFCE, and more particular Xubuntu, since it is lightweight and traditional in its layout.

The other thing you can tweak is the kernel version. You can upgrade to newer kernels if needed, even though these newer kernels are officially not supported on Ubuntu 12.04 LTS. The kind of issues that may be caused by having an old kernel include:

  • Not able to recover from standby (outdated power management support)
  • High power usage or noisy fan (also due to outdated power management support)
  • WiFi card not detected or other wireless issues (outdated WiFi chipsets support)
  • Random freezes or other stability issues (outdated motherboard chipsets support)
  • Crashing window manager or other video issues (outdated video chipsets support)

NB: If your USB device or PCI card is not recognized it may be sufficient to update your PCI and USB id’s with the following command:

sudo update-pciids && sudo update-usbids

The reason to not update to the latest (13.10) Ubuntu is that apart from the kernel, also the software packages will be updated. To get the best of both worlds, you would want to update your kernel, but not update the software packages. The good news is that you can. To get the latest kernel you can either “use the package manager”, “download and install” or “compile it yourself”. This post will cover the easiest of all the options, which is “use the package manager”.

Use the package manager to get a new kernel

To list all Linux kernel meta packages in Ubuntu, execute:

maurits@nuc:~$ apt-cache search kernel | grep linux-image | grep -v "\-3\."
linux-image - Generic Linux kernel image.
linux-image-extra-virtual - Linux kernel extra modules for virtual machines
linux-image-generic - Generic Linux kernel image
linux-image-server - Linux kernel image on Server Equipment.
linux-image-virtual - Linux kernel image for virtual machines
linux-image-generic-pae - Generic Linux kernel image
linux-image-lowlatency - lowlatency Linux kernel image
linux-image-lowlatency-pae - lowlatency Linux kernel image
linux-image-current-generic - Depends on the most recently released generic kernel image.
linux-image-generic-lts-quantal - Generic Linux kernel image
linux-image-generic-lts-raring - Generic Linux kernel image
linux-image-generic-lts-saucy - Generic Linux kernel image
linux-image-hwe-generic - Depends on the generic hardware enablement kernel image and headers.
maurits@nuc:~$ 

To remove all previously installed kernels:

sudo apt-get purge linux-image-* linux-headers-*

To install the latest 3.2 kernel:

sudo apt-get install linux-image-generic linux-headers-generic

To install the latest 3.5 kernel:

sudo apt-get install linux-image-generic-lts-quantal linux-headers-generic-lts-quantal

To install the latest 3.8 kernel:

sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring

To install the latest 3.11 kernel:

sudo apt-get install linux-image-generic-lts-saucy linux-headers-generic-lts-saucy

After rebooting, kernel 3.11 should be loaded. To check the kernel version after rebooting, open a terminal and type “uname -a”.

maurits@nuc:~$ uname -a
Linux nuc 3.11.0-13-generic #20~precise2-Ubuntu SMP Thu Oct 24 21:04:34 UTC 2013 x86_64 GNU/Linux
maurits@nuc:~$ 

That was easy right? Updates should automatically be installed. I hope it solves your Linux hardware issues as well.

21 thoughts on “Upgrade Ubuntu 12.04 LTS kernel to 3.11”

  1. Thanks! I needed this. This solves time I spent trying to fix my newer hardware, while running 12.04lts for the same reasons. Perfect.

  2. @qohelethTech: Great that it was useful to you, that makes my day!

  3. Just wanted to drop an info that I ran into cgroups issues when using LXC on Ubuntu 12.04 LTS and Kernel 3.8.0-29. Reverted back to 3.5 and no issues. So honestly I wouldn’t switch to 3.8 just yet – especially not on a server.

  4. You don’t need to remove the older kernel; when you install the newer one they will take precedent on boot.

    I like to keep the older kernel around just in case something bad happens you at least still have a known bootable kernel handy. And then after a while of using the new kernel THEN I remove the old one.

  5. @Rachael: Thank you for your comment. Is it also be possible to use the repository for kernel upgrades under Linux Mint? If so, do you know how?

  6. Even when I try to install 3.11
    The message on “uname -a” is

    Linux ubuntu 3.8.0-23-generic

    what should I do ?
    I want 3.11.0-23-generic

  7. @Raghvendra: Glad it did, thank you for commenting, it may help other people that experience the same.

  8. I noticed that for upgrades, I get both the 3.02 and 3.11 kernels downloaded and installed. Any way to tell apt to only look at the 3.11 series?

  9. Hello that such!.
    The manager Linux Mint actalisaciones comes unchecked by default in Red with Number 5 these:

    linux-firmeware
    linux-headers-3.13.0-24
    linux-headers-3.13.0-24-generic
    linux-image-3.13.0-24-generic
    Extra linux-image–3.13.0-24-generic
    linux-libc-dev

    It proved necessary to make and apply system updates and have a virtual Mauina (virtualbox) configured?.
    .

  10. @shero: I have no clue what you are asking. Are you using google translate?

  11. I’m getting the following error in my system

    $ uname -a
    Linux s2precise 3.2.0-58-generic-pae #88-Ubuntu SMP Tue Dec 3 18:00:02 UTC 2013 i686 i686 i386 GNU/Linux

    $ apt-get download linux-image-generic-lts-saucy linux-headers-generic-lts-saucy
    E: Unable to locate package linux-image-generic-lts-saucy
    E: Unable to locate package linux-headers-generic-lts-saucy

    synaptic / software-centre do not list it.
    searching in ubuntu packages website it shows http://packages.ubuntu.com/precise/linux-image-generic-lts-saucy
    » Ubuntu » Packages » precise (12.04LTS) » metapackages » linux-image-generic-lts-saucy

    I believe some repository needs to be added. If so which one?, otherwise how do i proceed?

  12. @sameer: If you search for “linux-image-generic-lts” which packages are available? Can you run “apt-cache search linux-image-generic-lts” to find that?

  13. on searching i get result. hence if somebody can confirm which ubuntu repository contains it, that may help.
    following are the entries in my /etc/apt/sources.list

    deb http://archive.canonical.com/ubuntu precise partner
    deb http://extras.ubuntu.com/ubuntu precise main
    deb http://archive.canonical.com/ precise partner
    deb http://archive.ubuntu.com/ubuntu precise main universe restricted multiverse
    ( besides virtualbox and some ppa.launchpad.net repositories )

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>