Debian Wheezy on Apple Powerbook G4

Powerbook G4 12" running Debian Wheezy

Last week I upgraded an Apple Powerbook G4 12" to Debian Wheezy. This machine has 1280 MB RAM, a 1333 MHz PowerPC processor, 60 GB HDD, optical Superdrive, and Airport Extreme wireless card among other things. The purpose of this installation is to provide this laptop with an up-to-date and secure operating system. This article intends to be a brief description of the setup process. Needless to say: if you follow these steps, do it at your own risk.

First, I downloaded the latest Debian PowerPC ISO, with XFCE4 as the default desktop environment. Only the first CD of the set was necessary, since I performed a network installation (through ethernet). The installation of the base system was smooth and straightforward. When prompted by Tasksel, the following tasks were selected:

  • Desktop environment
  • SSH server
  • Laptop.

At the end of the installation the bootloader Yaboot was installed. The HDD was properly partitioned from a previous Linux configuration, so I will not get into any details here regarding the bootloader (there are plenty of guides out there dealing with this topic).

The first bootup was correct. Besides some flickering on various stages there were no noticeable problems. At the login screen, however, about the lowest third of the display showed some kind of glitches. These were fixed when the desktop background appeared, but they weren't really gone, probably due to some issue with the framebuffer or the graphics chip. The video driver in use is nouveau, which provides decent 2D and 3D graphics acceleration. Nevertheless, Nvidia is to be blamed for the lack of support for the PowerPC architecture. You should thank anyway the developers of the Nouveau free-driver for their awesome work.
Glitches did continue to show up, for instance during window scrolling. I managed to fix this somehow with the following command:

xrandr --fb 1024x769

You can run xfce4-session-settings and include the previous command in order to be automatically launched at startup.

Video playback: works perfectly using both mplayer2 and VLC by selecting the OpenGL accelerated video driver. I recommend Smplayer as the default video player.

The xfce4-power-manager didn't provide any information of remaining battery. I installed the package "ibam" which prints out the remaining time on the terminal. In order to have it on the taskbar I added the generic monitor applet to the panel running the following custom script:

Filename [batt.sh]:

#!/bin/bash
ibam | tail -n 1 | awk '{print $5}'

Don't forget to make the script executable by running:
chmod +x batt.sh

Wireless card: worked after installing the Broadcom 430 driver:
apt-get install firmware-b43-installer

Bluetooth: works out of the box. It's very convenient to install the package blueman. After restarting XFCE the blueman-applet showed up on the panel.

CPU
I realized that the ondemand CPU governor was not working correctly, falling back into the performance governor and making the computer hot and the fan quite noisy. The following line appeared on dmesg, clearly indicating that the kernel was not handling correctly frequency scaling.

ondemand governor failed, too long transition latency of HW, fallback to performance governor

Some websites suggest this is the result of a linux kernel team decision. A simple solution is to handle scaling in userspace. I downloaded a small utility named cpudyn, which worked like a charm. It's no longer available on Debian Wheezy, however I downloaded and installed manually the Debian Squeeze version, working right away.

The Fn volume keys and pbbuttonsd worked out of the box, but due to the problem stated above about the nvidia driver, no brightness support works by default. As far as I remember, the pbbuttonsd manpage suggested a kernel recompile might fix this issue.

Eventually, some Kernel Oops happened at random times, involving the process mii-tool. It caused the crash of the Sun Gem Gigabit Ethernet kernel module. I couldn't do any further research since I returned the laptop to its legitimate owner. A temporary workaround was to blacklist the sungem module on /etc/modprobe.d/ (which leaves the ethernet in unusable state). Perhaps in the near future I have the opportunity to fix the problem properly, since this person is a close friend.

Overall, this installation resulted in a quite small and usable laptop. The default battery pack provides over two hours of wireless web browsing at maximum display brightness, so it's a decent choice for travelling or carrying around.

UPDATE: Toni contributed by sending the Conky configuration file of his Powerbook. Thanks!