So I finally got my white MacBook to do almost all the things I wanted it to, all at once.
- Suspend
- Hibernate
- Wireless
I tried nearly everything suggested in the forums online, to no avail. It got to the point where I decided to reformat my system, install Ubuntu all over again, and take a methodical approach. It worked, but with many hours.
So in the interest of encouraging others to run out, buy a brand new MacBook, and install Ubuntu onto it, here’s what I did.
(Caveat: A lot of this came from the Ubuntu Community MacBook page, which you should always check for updates before going through something like this.)
Step 1. Build and install a custom kernel image
I’ll note here that even though all my commands refer to 2.6.20-15, I still wound up with a kernel marked as 2.6.20-16. It works anyways.
- cd /usr/src
- sudo apt-get install linux-kernel-dev fakeroot m4
- sudo apt-get source linux-image-2.6.20-15-generic
- sudo apt-get build-dep linux-image-2.6.20-15-generic
- (apply the patch described here)
- cd linux-image-2.6.20_2.6.20
- export AUTOBUILD=1
- sudo debian/rules binary-debs flavours=generic
- sudo dpkg -i debian/build/linux-image-2.6.20-16-b98-generic_2.6.20-16.29_i386.deb
Step 2. Build and install custom linux-restricted-modules
This was harder. It required more tweaking of configuration files, some of which was available on KernelCustomBuild; other parts, I had to figure out myself.
- sudo apt-get build-dep linux-restricted-modules-2.6.20-15-generic
- sudo apt-get source linux-restricted-modules-2.6.20-15-generic
- cd linux-restricted-modules-2.6.20-2.6.20.5/
- (change abi_version to “16-b98″)
- sudo debian/rules debian/control
- (change flavours declaration to be just “generic”)
- (clear the value of vmware_server_extra_flavours)
- (clear the value of vmware_tools_extra_flavours)
- (change the value of LTMODEM to 0, because it broke)
- sudo debian/rules binary
- sudo dpkg -i ../linux-restricted-modules-2.6.20-16-b98-generic_2.6.20.5-16.28_i386.deb
- sudo dpkg -i ../linux-restricted-modules-common_2.6.20.5-16.28_all.deb
Step 3. Install ndiswrapper
For this, you don’t need my help. You need to look at Glyph’s “MacBookBuntu Take 2″. Just don’t forget the part about adding ndiswrapper to /etc/default/acpi-support, or it’ll stop working after you come back out of suspend or hibernate.
Step 4. Configure Bluetooth?
Before I reinstalled Ubuntu, I couldn’t get dial-up over Bluetooth to work, despite following Glyph’s very illustrated guide. However, with a new kernel, I’m going to give it another try.
But not until tomorrow.
![[ Hacker ]](/static/images/hacker.png)
Did you figure out *why* it was necessary to build a custom kernel? I am still happily using everything stock, except the 1.43 ndiswrapper module I built to get the version that actually works with the atheros card in C2D macbooks.
Beats me. The patch disables most of the ata_host_suspend function, so I guess it’s doing something that the new revision of MacBooks doesn’t support. I really hope this stuff all gets ironed out for Gutsy, but right now, it’s functional.
There is a bug open for this, but it doesn’t have that many more details on why the problem exists: https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/92635
In case anyone reading this is experiencing a similar problem, I have the third revision of the MacBook line, which came out in May 2007. Glyph has one of the “rev2″ models, which came out November 2006.