Fix Graphics in Ubuntu 10.04 Lucid Lynx on a Toshiba Portégé

This is a brief follow on from my previous note on how to fix networking for the same setup.

After recently purchasing the awesome Humble Bundle V, it became apparent that I'd never got the graphics working properly on my laptop with Ubuntu 10.04. For those crazy people out there who, like me, want to run Ubuntu 10.04 on their new laptop, here's how to get the graphics drivers installed and working.

Hardware


Before you follow these steps, you should make sure that your hardware is an Intel Graphics Controller. I'm using a Toshiba Portégé (Z835-ST6N03), so you may need to adjust some steps if you're using different hardware.

To find our your exact hardware, you can use lspci. You may get an unhelpful response if you haven't updated your PCI IDs though,
> lspci | grep 'VGA'
00:02.0 VGA compatible controller: Intel Corporation Device 0116 (rev 09)


Updating your IDs and running the command again will give you something more descriptive.
> sudo update-pciids
Downloaded daily snapshot dated ...
> lspci | grep 'VGA'
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)


New Graphics Drivers


The source of my information comes straight from Stefan Glasenhardt's Intel Graphics Driver blog post (German), and the packages to install come from his PPA.

Run the following to install the drivers,
sudo add-apt-repository ppa:glasen/intel-driver
sudo apt-get update
sudo apt-get upgrade


Then create /etc/X11/xorg.conf and add the following,
Section "Device" 
    Identifier "card0" 
    Driver "intel" 
EndSection


Finally, if you aren't already running the latest kernel from backports, now is the time to do that,
sudo apt-get install linux-image-generic-lts-backport-natty linux-headers-generic-lts-backport-natty


Once you reboot, your graphics should all be working nicely. This also means compiz will now work if you feel like having fancy desktop effects.
Picture of Rich Adams.

Hi! I'm Rich. By day I work on cloud security at Indeed. By night I wear a cape and fight crime1. I'm on Twitter as @r_adams, and also used to write things on the PagerDuty blog.

1 probably not true

Additional Reading

Other articles/posts on similar subject matter (some of these may be more recent than this one),

References

A list of all the links that appear in this note,