Translation(s): none

(!) ?Discussion


The aim of this page is to help get users of iMac G5s up and running with Debian. It is to provide a clear idea of what can be expected to work and what simply won't work at this stage, and to provide the steps required in clear and concise steps.

NB: This page is outdated and no longer applies to current versions of Debian. It is here only for reference purposes.

A Few Notes About Hardware

There were three generations or "revisions" of iMac G5 produced by Apple. I am using a first generation 17" iMac G5, or iMac revA, and at this point this page will be most suited for this hardware. The revA came with a Nvidia ?GeForce 5200 Ultra graphics card.

The iMac G5 revB is different from the revA in that its backing is curved and it has an ATI Radeon 9600 graphics card. It also had an ambient light sensor to adjust the light at the bottom-right of the front.

The iMac G5 revC is different again as this is the only revision to have the iSight built in to the top. The iMac revC has an ATI Radeon X600 graphics card.

As far as I know, the only significant differences between the three generations in terms of Linux usabilty are that the revC (iSight) do not have any code available to bring the fans under control at this point, and that there is a possibility that revB and revC iMac's may be able to ?"AtiHowTo" enable 3d graphics with open source ATI drivers.

More info about iMac G5 revisions.

A Few Notes About Software

My experience thus far has been based entirely on using Debian Etch (testing, soon to be Debian 4.0). The last time I tried to use Debian 3.1 I was unable to install the system at all.

I performed a network install, but I assume all ppc images available here will work. Extensive installation notes for Debian 4.0 are already available here and current problems with the installer on powerpc are listed in the errata.

As a matter of interest: My system install currently exists on a small 6GB partition alongside MacOS X that is encrypted using dm-crypt with a 256bit AES key (available as an option during install). I have no separate swap partition, but I do have a separate /boot partition (required since my root partition is encrypted). I use Gnome as my desktop environment.

What You Can Expect from Linux on your iMac G5

Generally speaking, you can expect a fully functional desktop machine similar to MacOS X.

However, these things will require fixes and work-arounds to get working (explained on this page):

At this point, the following features simply won't work or are bugs that I don't know how to fix:

Fan/Thermal Control

This problem is solved in the latest builds of Debian Etch and will be sorted by the time Debian 4.0 is released.

Fans will rev to full speed without proper control. This isn't dangerous to your system - but it sure is annoying! In the meantime,the fan issue is solved simply through loading up the correct fan modules and forcing them to load on startup every time. In the terminal:

{{{sudo -s apt-get install powernowd cd /lib/modules/$(uname -r)/kernel/drivers/macintosh (ls | cut -d. -f1 | xargs -n1 modprobe) 2>/dev/null lsmod | cut -d" " -f1 | grep windfarm >> /etc/modules exit}}}

Done! Fans should slow down immediately and these modules will now load automatically for you every time you start up your system


This problem is solved in the latest builds of Debian Etch. If your install doesn't automatically have sound working, simply update your system and you'll see a new 2.6.18 kernel waiting for you. Once installed, and restarted, your system will have sound. Easy!


Sun provides a Java implementation for, you guessed it, x86, but not for ppc. They are in the process of finally open sourcing their code, but in the meantime ppc users must install a java binary provided by IBM. This is mostly important for allowing java applets on the web to work, but also applies to java programs like ?LimeWire.

1. Download the binary package.

To get IBM's Java binary, go to, and choose the J2SE 5.0 SDK for 32-bit iSeries/pSeries. This will require an annoying registration. When you finally get through the registration, pick the TGZ version of the JRE.

2. Install the required packages for Java installation using Synaptic or apt-get:

java-package libstdc++5 libgtk1.2 

3. Make a debian package out of the IBM Java file. In the terminal, move yourself to the directory where the ibm.tgz file is and enter this command:

make-jpkg ibm-java2-jre-50-linux-ppc.tgz

Then install the resulting debian package:

sudo dpkg -i ibm-j2re1.5_1.5.0_powerpc.deb

4. Configure and install the Firefox Plugin.

Run this command and make sure IBM Java 1.5 is the default Java, and not any other Java that may be installed on your system:

sudo update-alternatives --config java

Check to see that everything is installed fine:

java -version

Finally, set up the Firefox plugin:

{{{mkdir -p ~/.mozilla/plugins cd ~/.mozilla/plugins ln -s /usr/lib/j2sdk1.5-ibm/jre/bin/}}}

That's it! You may need to restart or log out for changes to take effect.

DVD Encrypted Playback

Most DVDs are encrypted with a weak encryption called CSS. This is easily broken, but the potential legal issues mean that the libdvdcss2 package required for this decryption is not installed by default and isn't available in the Debian repositories. Install libdvd-pkg and run this command:

sudo dpkg-reconfigure libdvd-pkg

Apple Keyboard

Want your Volume Down, Volume Up, Mute and Eject keys to work? Really easy.

In Gnome, simply go Desktop > Preferences > Keyboard Shortcut and scroll down until you find the desired commands and press the respective keys to enable them as shortcuts.

Mount MacOS X Partition

Most MaxOS X installations are formatted in HFS+. Linux can read, but not write, to HFS+ partitions. This is fine if, for instance, you want to play your music collection on your MacOS X installtion but if you want to be able to write to files you can either create a 3rd shared partition formatted with plain HFS (not extended, journalled, etc.) which both can read and write to or you can remove journalling from your MacOS X partition (which I wouldn't recommend).

Whether the format is HFS or HFS+, the process of manually and automatically mounting these partitions is essentially the same.

Manual Mount

1. In Gnome, go Desktop > Administration > Disks and note the device name of your disk (something like /dev/sda4).

2. In your terminal, make a directory to mount your disk to, and then mount it:

{{{sudo mkdir /mnt/mac (you can call the folder whatever you like) mount -t hfs /dev/sda4 /mnt/mac}}}

The -t command specifies the file format. This is either hfs or hfsplus depending on the partition. "/dev/sda4" specifies the partition you are mounting, and "mnt/mac" is the directory you are mounting it in. These will both change depending on your own circumstances.

Automatic Mount

1. In Gnome, go Desktop > Administration > Disks and note the device name of your disk (something like /dev/sda4).

2. Make a directory to mount your partition into:

sudo mkdir /mnt/mac (you can call the folder whatever you like)

3. Edit the file which describes what is mounted on start up.

sudo nano -w /etc/fstab

4. Add a line for your device such as this:

/dev/sda3    /mnt/shared     hfs     defaults,user   0 0

This is fairly self-explanatory. The first part is the device, the second is the directory you've created to mount the partition into. The third is the file format which could be, again, hfs or hfsplus. The fourth part is the mount options; what I have described above is a default mount, that is able to be done by the user. If I were mounting an hfsplus partition I would add "ro" to the options, becoming "defaults,user,ro" to make the partition read-only. The final two numbers are to specify two values which I don't understand but I am assured on good authority they should remain 0. ;)

5. Exit nano - control-x - and save on exit. Check the file works:

sudo mount -a

6. Restart, and you should find your drive(s) mounted on startup. You can create links in your Nautilus browser or on your desktop, if you like.

Minor Font Fix

Have you noticed that the occasional website you visit has sharp, pixelated fonts? Try, for example, this one. The problem is that websites like this are improperly designed and are forcing the use of Helvetica, which does not anti-alias (sub-pixel font smoothing). The fix for this is to force Helvetica fonts to change to the default sans-serif font, which can be easily anti-aliased.

You need to create a new font configuration file. In the terminal:

{{{cd ~ nano -w .fonts.conf}}}

Into nano, copy and paste (control-shift-v inside the terminal) this text:

{{{<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd">


<!-- Helvetica is a non true type font, and will look bad. This replaces it with whatever is the default sans-serif font -->

<match target="pattern" name="family" > <test name="family" qual="any" > <string>Helvetica</string> </test> <edit mode="assign" name="family" > <string>sans-serif</string> </edit> </match> <dir>~/.fonts</dir>


Exit (control-x), and save. Now log out and back in, and you should find those few ugly websites with properly anti-aliased fonts now.

I thought I'd just make a list of applications that work well in Debian and on the iMac G5, and which are good MacOS X relacements.

Of course, there are the standard Debian desktop packages, like Firefox, OpenOffice, and Gimp which are well known, well-supported, and are perfect MacOS X-equivalents.

Also recommended:

VLC Media Player Also available on MacOS X, this player works well and will play virtually every file format under the sun, including DVDs. An easy install - just remember to install and configure the ESD plugin if you have ESD enabled (as explained above).

F-Spot Photo Manager An iPhoto equivalent. Simple and easy to use.

Firestarter If you enabled firewall in your kernel, then this is a wonderful little frontend for configuring your ports. It's very easy to use, and their website explains configuration if you need help.

Jokosher A Garageband-type audio editor. This doesn't come with the loops and tracks like Garageband, but it is great for editing sound tracks, far simpler than Audacity, and good for podcasts for example.

XChat Gnome Brilliant and simple IRC chat client. Similar to XChat on the Mac.

Seahorse A GPG key manager for Gnome. Clean and simple. Much nicer than any Mac version of GPG.

Scribus An ?InDesign equivalent. To be honest, I haven't used this much and still prefer ?InDesign, but it's on its way to becoming just as good.

Compiling Your Kernel [Deprecated]

This used to be a necessary step to enable sound and fan control but it is no longer necessary. I have left it here for reference sake. Please note, that the configuration instructions of the kernel will probably not include Airport or Bluetooth modules, and you may also find that User Switching will freeze your system. Please let us know if you know how to configure the kernel to fix these issues.

I should stress this is nowhere near as hard you might expect. If you follow these instructions, you'll be fine.

Please follow these steps to install a new kernel:

1. Enable sudo (a command that allows to to execute other commands as root, short for "super user do..."). In the terminal:

{{{cd /etc su (type root password) nano -w sudoers}}}

Using nano, scroll down to the bottom of the page, and add this line at the very bottom:

yourusername ALL=(ALL) ALL

Press control-x and save on exit.

2. Install the required components to compile a kernel. Using Synaptic (or apt-get in the terminal) install the following packages:

build-essential kernel-package libncurses5-dev

3. Download and unpack the kernel source. Head along to in your browser, and copy the link to the latest full kernel (the link under the F). In the terminal:

{{{cd /usr/src sudo wget sudo tar -xvjf latestkernel.tar.bz2}}}

You can also download the sources of the Debian kernels:

sudo apt-get install linux-source-2.6.18 (or later)

4. Configure the kernel. In the terminal:

{{{cd /usr/src/latestkernel sudo make g5_defconfig sudo make menuconfig}}}

Now the fun part. You've already configured the kernel with a default G5 kernel, and both sound and fan control are already enabled. But there's a few other configuration options which are recommended.

General Speed:
Block Layer > IO Schedulers > Default IO Scheduler > CFQ
Kernel Options > Timer Frequency > 1000Hz
Kernel Options > Preemption Model > Voluntary Kernel (Desktop)

To enable a firewall:
Networking > Networking Options > Network Packet Filtering > Netfilter Xtables support (Y) make every option that appears beneath it a module by press M
Networking > Networking Options > Network Packet Filtering > IP: Netfilter Configuration > IP Tables Support (Y) make every option that appears beneath it, except "raw table support", a module.
Networking > Networking Options > Network Packet Filtering > ARP Tables Support (Y) make the two options that appear beneath it modules.

Airport and Bluetooth:
I don't know. Please help me with this.

Now exit, and save configuration on exit.

5. Make the Kernel into a Debian Package. In the terminal

{{{cd /usr/src/latestkernel sudo make-kpkg clean sudo make-kpkg -initrd --revision=imacg5 kernel_image kernel_headers modules_image}}}

...and play the waiting game. All going well, 30 minutes later, you'll have a compiled kernel package. You can call your kernel whatever you like, so long as it has a number in it (--revision=something1).

6. Install the kernel packages.

{{{cd /usr/src ls (this will show you the image and header package names) sudo dpkg -i kernel-header-latestkernel.deb sudo dpkg -i kernel-image-latestkernel.deb}}}

Now restart and you're all done! You should have fan control and sound on start up.

See also: InstallingDebianOn/Apple