Linux on the 867 G4 PowerBook


This document describes my experiences with the new Apple Titanium PowerBook and installing Linux on it. The model of this PowerBook is "PowerBook3,5" version 3.2. It contains an 867 MHz processor, 256MB of system RAM, 40 GB ATA hard disk (Fujitsu), ATAPI CD-RW (Matshita), firewire, gigabit ethernet, two USB ports, ATI Radeon 9000 M9 video with digital video out and S-Video out, sound, and two CardBus slots, one internal for Airport only, and one general purpose slot.

The system ships with MacOS X 10.2.2. The first step in installing Linux is to choose a distribution and repartition the drive for it. My distribution of choice this time was Yellow Dog Linux. I chose this distribution in particular because it is entirely PowerPC based. The current version is 2.3, and while it had some difficulty installing, it seems to be quite stable overall.

For installation instructions, please refer to the online documentation on the Yellow Dog Linux website. The rest of this document will detail pitfalls, caveats, tips, and patches.

Software Upgrades

This PowerBook happens to be more recent than the Linux software available at the time of writing. I was therefore required to upgrade several components of the system to make the hardware fully functional. The upgrades included:

Unfortunately you will not get X11, full CPU speed, or other minor things working without these updates as of this time.

Keyboard

It can be very difficult and confusing to move from a full keyboard to the limited one present on the PowerBook. Particular problems of note:

Fortunately there are solutions to these problems. To access the function keys, always remember to hold in the "FN" key located in the bottom left corner of your keyboard. To send a Page Up or Page Down, hit FN-UpArrow or FN-DownArrow respectively. Home and End work in a similar fashion, via FN-LeftArrow and FN-RightArrow. To switch virtual terminals, you can use ALT-Left or ALT-Right, or ALT-FN-F??. From X11, you must use CTRL-ALT-FN-F??.

Trackpad

The trackpad is registered as /dev/input/mice on my machine, and this is the mouse device I had to use in /etc/XF86Config-4. Make the mouse InputDevice block in your XF86Config-4 file look like this:
Section "InputDevice"
        Identifier      "Mouse0"
        Driver          "mouse"
        Option          "Protocol" "IMPS/2"
        Option          "Device" "/dev/input/mice"
        Option          "Emulate3Buttons"       "true"
EndSection

The trackpad was very sensitive when I first started the X11 server. It moved too quickly to control, and it was set to accept a "tap" as a button click. I found this to be very easy to trigger by accident. To disable this, add the following line to /etc/rc.d/rc.local:

/usr/bin/trackpad notap

This program also contains several other settings related to trackpad tapping and dragging. In addition, you might find it helpful to ensure that you are using Click-To-Focus in your window manager settings, and to lower the trackpad sensitivity in the mouse settings for your desktop environment. In KDE, you can change the focus policy in KControl under Look and Feel->Window Behaviour. You can change the mouse sensitivity in KControl under Peripherals->Mouse.

By now you are probably wondering how to deal with having only one mouse button. Most desktop environments in X11 basically assume that you have at least 2 mouse buttons, and recommend at least three. A common alternative is to make the F10 and F11 keys behave as though they are the second and third mouse buttons. This can be done by adding the following lines to /etc/sysctl.conf:

dev.mac_hid.mouse_button_emulation = 1
dev.mac_hid.mouse_button2_keycode = 68
dev.mac_hid.mouse_button3_keycode = 87

FireWire, USB

There are no known problems with these. I do not have a FireWire device to test, but this should work as it has with previous G4 PowerBooks.

CardBus / PCMCIA

CardBus will not work after installation. This PowerBook has some different hardware settings, and the kernel socket driver seems to have some real issues with resource allocation. You will need to make the following modification to /etc/pcmcia/config.opts:
include memory 0xa0003000-0xa0ffffff
include port 0x9100-0x9fff
Make sure that there are no other "include memory" or "include port" lines near the top of that file.

In addition, you may need to enable card services by editting /etc/sysconfig/pcmcia and making it look like this:

PCMCIA=yes
PCIC=yenta_socket
PCIC_OPTS=
CORE_OPTS="probe_mem=0"
CARDMGR_OPTS=-f

Modem

This PowerBook comes with a built-in v.92 USB hosted modem made by Conexant. See Marc Boucher's website for the HCFUSB driver. This driver will work with the modem.

Ethernet

The built-in gigabit ethernet port should work with all 2.4.x kernels at least as far back as 2.4.19. One noteable problem is that the machine delays for a very long time on bootup if there is no ethernet cable connected to the port. This is most likely entirely dhcpcd's fault, but is very annoying when booting up from battery

There also appears to be a problem using cvs(1) with kernels starting at 2.4.20-rc3.

CD-RW and DVD Drive

The CD-RW and DVD drive is immediately recognised and accessible after the installation. DVD playing works fine via /dev/scd0. You can make a symbolic link from /dev/scd0 to /dev/dvd. You should also setup a rawdevice for the dvd drive in /etc/sysconfig/rawdevices and make a symbolic link /dev/rdvd to point to that raw device. I have not tested CD-R/RW burning as of this time, though I do not expect any problems. The drive is configured with ide-scsi emulation.

Video

The Radeon 9000 M9 chipset contained in this laptop is not yet supported by the Linux kernel nor XFree86 stable distributions. You must get the "bleeding" edge versions from CVS or rsync repositories.

To get XFree86 working, download XFree86 from CVS. You may need to apply this patch. Also, download the latest rsync kernel. In XF86Config-4, set your panel to "1280x854" resolution, and choose the "radeon" driver with the "Option" "UseFBDev". You can reference my XF86Config-4 file here.

DRI (OpenGL) does not work currently. Xvideo does though, and DVDs play nicely with Ogle. Xine does not work yet.

Audio

The kernel driver for the audio chipset is functional and usable, but the sound quality leaves much to be desired. There are audible crackles and garbling. Also, "arts" will not work and will render the soundcard rather useless. Sometimes "rmmod dmasound_pmac" "rmmod dmasound_core" and then "modprobe dmasound_pmac" will fix audio for you. I hope to find a fix for this soon.

CPU Frequency

If you looked at /proc/cpuinfo on bootup, you may have noticed that your 867MHz computer is running at 667MHz. No, most likely you have not been scammed. The computer starts up in power saving mode, and the OS is responsible for boosting the cpu power if it sees fit. You can view the current settings by looking at /proc/cpufreq. You can change them as well. See /usr/src/linux/Documentation/cpufreq for more information.

For a quick hint, you can execute this command line to go to full power:

echo -n "0%75%100%performance" >/proc/cpufreq

You should now see 867MHz in /proc/cpuinfo, as you would expect. If you wish to try a tool which can automatically manage your cpu frequency based on the state of your battery, please look here.

Power Management, Sleep

The "pmud" tool handles power management on PowerMacs. Be sure to remove any USB devices if you try to put your PowerBook to sleep. The USB subsystem appears to cause problems with this.

Clock

It seems as though OS 10.2.2 as shipped on this notebook stores the system date in UTC format. In order to keep the date consistent between reboots of the two systems it is necessary to do the same in Linux. You can set this in /etc/sysconfig/clock.
 
 



Last Updated: 12/27/02
Author: George Staikos
Email: staikos@NOSPAM@kde@NOSPAM.org (defang that to send me email)