Enabling Suspend on the Macbook : Ubuntu 7.10

By | 2007/10/25

In continued testing on my macbook it appears that I have suspend working solidly. If you enjoy this feature you may want to look into this tutorial. I have never really used suspend/hibernate much in the past because it has been buggy, but now that it appears to be working well I think I may give it a try.

note: To use suspend (in my experience) on the macbook you have to downgrade the 2.6.22-14 kernel (current in 7.10) to the 2.6.22-12 kernel. I don’t think there are many huge changes between the two, and I have not seen a loss of other functionality, but I figured I should get that out of the way right at the start. If you’re not comfortable reverting your kernel or know a specific reason you should not, you can stop reading here.

Suspend on the Macbook

Suspend is a nice feature that lets you virtually “pause” your machine to be brought back in its exact state at a later time. This is very nice for laptops and mobile machines that are always on the go and going up and down quite a bit. The current kernel in Ubuntu 7.10, the 2.6.22-14 kernel, has a few issues with suspend. It will allow machines to go into suspend, but not properly come back again. (bug #151016).

Installing the required kernel packages

As mentioned above the last known kernel version to properly support suspend on the macbook (and some other models – see the bug report for details) is the 2.6.22-12 kernel. The following steps will help you install the packages needed in order to run that kernel version and enable the suspend feature. Install the following packages in this order:

  1. sudo aptitude install linux-image-2.6.22-12-generic
  2. sudo aptitude install linux-headers-2.6.22-12
  3. sudo aptitude install linux-headers-2.6.22-12-generic
  4. sudo aptitude install linux-ubuntu-modules-2.6.22-12-generic
  5. sudo aptitude install linux-restricted-modules-2.6.22-12-generic

You’ll next need to update your grub settings to use this kernel instead of the current latest automagically at boot time. If you are running the stock Ubuntu 7.10 installation with the 2.6.22-14 kernel (at the time of this writing this is the only kernel released for 7.10) it is a very simple update. Edit the /boot/grub/menu.lst file and change the default line from 0 to 2.

If you have other kernel images installed take a look into the file, view the boot entries near the bottom and look for the one listed as 2.6.22-12. Count down from the first entry starting with 0 (ie; 0,1,2,3…) and replace your default line to that number. REMEMBER GRUB STARTS COUNTING AT ZERO, NOT ONE.

At this point you should be able to reboot and test suspend. In my use it has been solid since making the above changes. Also note that if you have compiled anything against your previous kernel you’ll need to do it again for this version. (ie; if you followed yesterdays post about compiling wireless support for the macbook you’ll need to repeat those steps.)

7 thoughts on “Enabling Suspend on the Macbook : Ubuntu 7.10

  1. Pingback: [email protected] » Schlaf gut, Silversurfer

  2. Phil Hagelberg

    Odd. Suspend has worked out of the box on my Macbook Pro. It’s of the Santa Rosa chipset.

    Strangely, this is the first machine I’ve ever installed Ubuntu on in which suspend worked but hibernate did not. (I’m inclined to blame the binary Nvidia drivers here.)

  3. Alan Pope

    Forgive my ignorance.. but aren’t you putting your machine at risk by deliberately using a kernel which you aren’t getting updates for?

  4. Pingback: ProductiveLinux » Get Ubuntu 7.10 ‘Gutsy Gibbon’ to Properly Suspend Your Macbook

  5. Francis Irving

    What repository are you getting the kernel images from? I don’t have them in mine…

    Couldn’t find any package whose name or description matched “linux-image-2.6.22-12-generic”

  6. Anonymous

    The packages aren’t in the repositories. Use this:

    $ wget http://launchpadlibrarian.net/9471523/linux-image-2.6.22-12-generic_2.6.22-12.39_i386.deb http://launchpadlibrarian.net/9471519/linux-headers-2.6.22-12_2.6.22-12.39_all.deb http://launchpadlibrarian.net/9471524/linux-headers-2.6.22-12-generic_2.6.22-12.39_i386.deb http://launchpadlibrarian.net/9498000/linux-ubuntu-modules-2.6.22-12-generic_2.6.22-12.32_i386.deb http://launchpadlibrarian.net/9470141/linux-restricted-modules-2.6.22-12-generic_2.6.22.4-12.3_i386.deb

    $ sudo dpkg –install linux-image-2.6.22-12-generic_2.6.22-12.39_i386.deb
    $ sudo dpkg –install linux-headers-2.6.22-12_2.6.22-12.39_all.deb
    $ sudo dpkg –install linux-headers-2.6.22-12-generic_2.6.22-12.39_i386.deb
    $ sudo dpkg –install linux-ubuntu-modules-2.6.22-12-generic_2.6.22-12.32_i386.deb
    $ sudo dpkg –install linux-restricted-modules-2.6.22-12-generic_2.6.22.4-12.3_i386.deb


Leave a Reply