- Thomas' Webjar full of joy -
| Author: | Thomas Langewouters |
|---|---|
| description: | The pitfalls I encountered over the year I worked with an iBook G4 running Linux. |
On one of the last days of august 2005 I purchased a brand-new 12" G4 Apple iBook Laptop. This page is dedicated to this beautiful piece of hardware, I will share my experiences here. You can also read here how I installed Gentoo Linux on it back then.
I needed a laptop so I could conveniently work for school anywhere on campus, and drag around my work with me. So I took a look at laptop offerings from various hardware companies. I made a list of guidelines in selecting my machine of choice:
Along with those qualities, the iBook had some nice features that made me hooked on it even harder:
When it comes to running Linux on it, hardware accelerated 3D video is certainly missed (there are no proprietary ATI drivers for PowerPC available), but besides that, all hardware works and is supported by Linux.
Note
The following text dates back to 2006, A text about setting up Debian on the iBook in 2008 (not published yet) is currently in the making.
I wrote down the hardest tricks that I had to pull to get Gentoo Linux running on my iBook. Back then, most Linux distributions didn't support the new hardware, and I had quite a struggle getting everything to work. These days everything works well.
USB worked out of the box, no problems whatsoever, be sure to enable the following things in your kernel:
Works fine. Enable Firewire (enable IEE 1394 in kernel)
The iBook's PowerMac Snapper chip, gets detected fine and works great on kernels later then 2.6.14. I had to make an effort to get it working on Linux 2.6.13.1, but since this information is irrelevant now, I removed it.
As of kernel 2.6.14, the appletouch driver is included with Linux. This driver works great. To have a middle and left mouse button, enable mouse button emulation by putting dev/mac_hid/mouse_button_emulation = 1 in /etc/sysctl.conf
Works perfectly, use the sungem kernel driver
Works, with pbbuttonsd, this program also does power management.
I haven't done any modem-related research since I don't want or plan to use the modem.
Development of a free driver is ongoing, and since Linux 2.6.17, an experimental driver is included into the kernel. This driver however, doesn't play nice with the later revisions of the bcm43xx chipset (my iBook has one) Take a look at the Native Airport Express Drivers thread on the gentoo forums.
Since ATI doesn't release enough specifications, it's hard for Open Source developers to write 3D drivers, Mesa emulates OpenGL on the CPU, but this is slow and consumes a lot of CPU. There is related info though, a howto on the gentoo ppc forum titled "Get DRI working on a Powerbook with Radeon 9600/M10". This forum thread is about the older generation of ATI cards, included in older Powerbooks.
Suspend to ram works great.
This works great, the built-in ATAPI Matshita drive works fine with cdrecord, and therefore all GUI programs like gnome baker, k3b, ... work perfectly.
If you connect the monitor before X is started, you get a cloned screen. It should be possible to do dual screen, have a look at Alessandro Ronchi's Linux On The IBookG4 page.
My iBook has a Cambridge Silicon Radio chipset, it is connected via the USB bus. The command hid2hci has to be run before the bluetooth services are started, in gentoo this is done by setting HID2HCI_ENABLE=true in /etc/conf.d/bluetooth. It works fine using the bluez bluetooth stack.
I use ifplugd with the wired Ethernet chip, this way plugging in a cable automatically configures the link with a static or dynamic IP address. Pbbuttonsd is the power management daemon that proceeds to suspend on cover close and resumes later. Because ALSA acts weird after suspend to ram, I put a script in /etc/power/event.d (named alsasound) that runs alsasound stop before, and alsasound start a suspend to ram. The same for ifplugd (because the link doesn't seem to come up after resume).
There is not much special about installing Gentoo on a PPC machine. The Gentoo install documentation is very good, all I have to add is some advice: copy the live CD kernel and modules, to your new root, and add an entry in your yaboot.conf for it (give it an obvious name; eg 'live CD kernel').
I had to change my kernel configuration several times before I had a working kernel. It's faster to boot from disk than from CD-ROM, this trick would have saved me some time.