Apple Powerbook Titanium 400 MHz

I currently have an Apple Titanium Powerbook as my laptop. It's a very nice laptop, and all of its hardware is supported (except S-VHS out). Before my Titanium I had a old Powerbook 3400, but its battery died, and a laptop without a working battery is no fun. For information about other of Apple's Powerbooks see: TuxMobil - Linux on laptops, notebooks, PDAs, mobile phones.

NOTE! Kernel Preemption does not work well on PowerPC!

Here is the dmesg for the machine

[ Top | Bottom ]

Motorola PPC7410 400 MHz

The Powerbook gets very very hot, especially underneath, and on the right side, where the powercord is plugged in. But I have only witnessed the fan kick in after it has been compiling for an hour or longer, and the temperature reached 34-36 C (see below). So, as long as it's running stable, don't be worried about it.

Contents of /proc/cpuinfo:
processor       : 0
cpu             : 7410, altivec supported
temperature     : 7-9 C (uncalibrated)
clock           : 400MHz
revision        : 17.2 (pvr 800c 1102)
bogomips        : 796.67
machine         : PowerBook3,2
motherboard     : PowerBook3,2 MacRISC2 MacRISC Power Macintosh
detected as     : 71 (PowerBook Titanium)
pmac flags      : 0000000b
L2 cache        : 1024K unified
memory          : 384MB
pmac-generation : NewWorld
Code listing 2.1

The CPU supports frequency scaling, switching from 400MHz to 300Mhz. This conserves some battery power, and makes the Powerbook run a little bit cooler.

To enable CPUfreq read my guide: CPU frequency scaling. You also have to enable
Support for Apple PowerBooks
Code listing 2.2
CPUfreq is supported and working in kernels newer than 2.6.7-mm5.

For more information:

GCC Optimizing

Read how to use optimized GCC settings

I use the followering CFLAGS/CXXFLAGS:

NOTE! Adapt the settings to your system/CPU!
CFLAGS="-O2 -mcpu=7400 -maltivec -mabi=altivec -pipe -fsigned-char -mpowerpc-gfxopt -ffast-math -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

CHOST="powerpc-unknown-linux-gnu"
Code listing 2.3
[ Top | Bottom ]

Titanium motherboard

The Powerbook Titanium 400 Mhz contains a nice amount of onboard features:

Integrated Sound

I have had some problems with the ALSA sound system in older 2.6.x kernels (tested with kernel 2.6.5-rc2-mm5), but in newer 2.6.x kernels it works without any problems, and without any noise or distortion. See my configuring ALSA page for instructions on getting ALSA working. To enable support for sound in the Powerbook enable
<M> PowerMac (AWACS, DACA, Burgundy, Tumbler, Keywest)
Code listing 3.1
under "ALSA PowerMac devices"

USB

Not much to say, enable this in your kernel:
Device Drivers  --->
    USB support  --->
        <*> Support for Host-side USB
	[*]   USB device filesystem
	<*> OHCI HCD support
	<*> USB Human Interface Device (full HID) support
Code listing 3.2
lspci -v should report something like:
0001:10:18.0 USB Controller: Apple Computer Inc. KeyLargo USB (prog-if 10 [OHCI])
	Flags: bus master, medium devsel, latency 16, IRQ 27
	Memory at a0002000 (32-bit, non-prefetchable)

0001:10:19.0 USB Controller: Apple Computer Inc. KeyLargo USB (prog-if 10 [OHCI])
	Flags: bus master, medium devsel, latency 16, IRQ 28
	Memory at a0001000 (32-bit, non-prefetchable)
Code listing 3.3

Firewire 400

Enable the following:
Device Drivers  --->
    IEEE 1394 (FireWire) support  --->
        <M> IEEE 1394 (FireWire) support
        <M>   OHCI-1394 support
        <M>   SBP-2 support (Harddisks etc.)
        [*]     Enable Phys DMA support for SBP2 (Debug)
Code listing 3.4

SBP-2 enables support for harddisks and CD burners. To use a CD burner follow my CD burning guide.

lspci -v should report something like:
0002:24:0e.0 FireWire (IEEE 1394): Apple Computer Inc. UniNorth FireWire (rev 01) (prog-if 10 [OHCI])
	Flags: bus master, 66Mhz, medium devsel, latency 0, IRQ 40
	Memory at f5000000 (32-bit, non-prefetchable)
Code listing 3.5
dmesg should report something like:
ohci1394: $Rev: 1223 $ Ben Collins <bcollins@debian.org>
ohci1394: fw-host0: Unexpected PCI resource length of 1000!
ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[40]  MMIO=[f5000000-f50007ff]  Max Packet=[2048]
ieee1394: Host added: ID:BUS[0-00:1023]  GUID[000393fffe10ac76]
ieee1394: got invalid ack 252 from node 65535 (tcode 0)
SCSI subsystem initialized
sbp2: $Rev: 1219 $ Ben Collins <bcollins@debian.org>
Code listing 3.6
[ Top | Bottom ]

ATI Rage 128 Mobility M3 AGP 2x 8MB

Works almost perfectly. DRI and OpenGL works in all color depths except 24bit (probably because the graphics card only has 8MB ram).

I have experienced problems after sleep and with the graphics card set to run in AGP 2x mode. XFree will run very slow after wakeup, and the following error will appear in /var/log/XFree.0.log:

(EE) R128(0): Idle timed out, resetting engine...
Code listing 4.1
Note!: I don't see this problem in newer versions of X.org and the Linux kernel.

It does not look like S-VHS out is supported, but external VGA does almost work, see the monitor section for more information.

[ Top | Bottom ]

15.2" LCD display

This is the xorg.conf I'm using. The screen is capable of 1152x786 in 24bit color.

External VGA monitor

By using a tool called m3mirror, developed by Benjamin Herrenschmidt, mirroring of the LCD screen to an external VGA monitor should work, but only in the 2.4 kernel series. If you are running a 2.6 kernel (Like me), you have to select which display to use before you boot Linux.

Either just turn the Powerbook on, and close the lid (really annoying if you run pbbuttonsd) with the external monitor connected, and the Powerbook should boot up using the external monitor. Option 2 also involves booting, but here you use a kernel parameter to select the display you want to use: Currently broken?

Add the following to your /etc/yaboot.conf (replace image with your kernel, and root with your root)
image=/boot/vmlinux-2.6.5-rc2-mm5
	label=Crt-on
	alias=c
	root=/dev/hda4
	read-only
	append="video=aty128fb:crt:1,lcd:0"
Code listing 5.1
[ Top | Bottom ]

Network

Integrated 10/100Mbit Ethernet

The integrated Ethernet uses the sungem driver. You have to enable it in your kernel:
Device Drivers  --->
    Networking support  --->
        [*] Networking support
	[*] Network device support
              Ethernet (10 or 100Mbit)  --->
	          [*] Ethernet (10 or 100Mbit)
	          <*>   Sun GEM support
Code listing 6.1
lspci -v should report something like:
0002:24:0f.0 Ethernet controller: Apple Computer Inc. UniNorth GMAC (Sun GEM) (rev 01)
	Flags: bus master, 66Mhz, slow devsel, latency 16, IRQ 41
	Memory at f5200000 (32-bit, non-prefetchable) [size=f5100000]
	Expansion ROM at 00100000 [disabled]
Code listing 6.2

For more information:

Built-in 56.6Kbit modem

It looks like the modem is supported by linuxants HCFUSB driver. I have not tried it.

Airport / WLAN

I have not gotten my hands on an airport card yet.
[ Top | Bottom ]

Integrated IrDA port

Integrated IrDA port

It should be supported, but I can't get the irattach program to run. You could try the instructions to enable IrDA on my Powerbook 3400
[ Top | Bottom ]

PCMCIA

Integrated Type II/III

Enable it with:
Bus options  --->
    PCCARD (PCMCIA/CardBus) support  --->
        <M> PCCard (PCMCIA/CardBus) support
	<M>   16-bit PCMCIA support
	<M> CardBus yenta-compatible bridge support
Code listing 8.1
lspci -v should report something like:
0001:10:1a.0 CardBus bridge: Texas Instruments PCI1211
	Flags: bus master, medium devsel, latency 16, IRQ 58
	Memory at a0000000 (32-bit, non-prefetchable)
	Bus: primary=10, secondary=11, subordinate=14, sec-latency=176
	Memory window 0: 90000000-9ffff000
	I/O window 0: 00001000-00008fff
	I/O window 1: 00000000-00000003
	16-bit legacy interface ports at 0001
Code listing 8.2
[ Top | Bottom ]

Built-in Apple keyboard

Console keymap

If you need keys that are not in the default layout you have to modify: /usr/share/keymaps/i386/qwerty/<Your language>.map.gz, e.g. where dk-latin1.map is the danish keymap (and yes i386 is correct for PPC/Macintosh). I based my keymap, on the se-lat6.map.gz file. I just copied it to dk-latin1-mac.map.gz, and edited it to fit the danish language.

In Gentoo you use this keymap by editing /etc/rc.conf:

KEYMAP="dk-latin1-mac"
Code listing 9.1

Download my dk-latin1-mac.map.gz

NOTE! I could not get delete working, but if you press Fn+Backspace you will get delete.

If you want to modify it further, you can use the utility showkey in a console to see the keycode for the key you pressed.

X server keymap

Use the following configuration in your X configuration file:
Section "InputDevice"
	Driver                "kbd"   
	Identifier            "Keyboard0"
	Option                "Protocol"              "Standard"
	Option                "XkbRules"              "xfree86"
	Option                "XkbModel"              "macintosh"
	Option                "XkbLayout"             "dk"
EndSection
Code listing 9.2
The mapping is a bit weird: Alt is mode_switch (aka AltGr) and Apple/Option is left alt. To change this follow the instructions in Keyboards: Adding or remapping keys on how to create a ~/.xmodmap file. Add the following lines:
keycode 107 = KP_Enter
keycode 108 = Delete
keycode 115 = ISO_Level3_Shift Multi_key
Code listing 9.3

This maps the Apple/Option key to AltGr, and the Enter key to Delete.

Note! if you use any special keys in your password, you might need to modify the system's keycode file: /usr/lib/X11/xkb/keycodes/xfree86

Function keys

I prefer to use the function keys (F1 to F12) primarily as function keys, and not as the special Powerbook buttons (brightness/volume/cdrom eject), so either edit /etc/pbbuttonsd.conf so it reads:
KBDMode	= fkeysfirst
Code listing 9.4
Or use Powerprefs, which also allows you to easily enable/disable tapping/drag lock on the touchpad.

For more information:

[ Top | Bottom ]

Mouse/Touchpad

Built-in ADB touchpad

To emulate the 2nd and 3rd mouse buttons you need support for it in your kernel:
Device Drivers  --->
   Macintosh device drivers  --->
       [*] Support for ADB input devices (keyboard, mice, ...)
       [*]   Support for mouse button 2+3 emulation
Code listing 10.1
Then add the following to /etc/sysctl.conf :
# Enable mouse button emulation
dev.mac_hid.mouse_button_emulation = 1
# Set 2nd button to 87 - F11
dev.mac_hid.mouse_button2_keycode = 87
# Set 3rd button to 88 - F12
dev.mac_hid.mouse_button3_keycode = 88
Code listing 10.2
Now F11 and F12 will function as your 2nd and 3rd mouse button.

External USB mouse

Enable generic USB support, and in the "InputDevice" section of your X configuration file use:
Option	"Device"	"/dev/input/mice"
Code listing 10.3
This way you can use the touchpad and any external mouse at the same time.
[ Top | Bottom ]
Hi! you have reached the old part of my homepage, be sure to checkout my new site, especially posts tagged with "powerbook"