Why this page?

Because i want to regroup some interesting informations/process/hooks to configure iMac Intel 5,1 late 2006 model with Debian GNU/Linux Lenny (2008/08/28)

Update (2011/08/12) : aluminium iMac Intel 12,1 / Wheezy , see the "video" section.

Before starting

This hardware can be used with i386 or amd64 architecture. The little bench test i made shows that the use of amd64 arch improve cache read access.

Get space from others filesystems or OS

I successfully re-partionned the drive of the iMac with gparted to get some Gigas for GNU/Linux :)

After installing

It is recommended to install with the ethernet interface (sky2 driver) if netinstall (wireless not natively supported by linux driver)

Update (2015/12/08) No issues with default stable nor testing install.


Wireless on this model (Broadcom 4328) is not yet supported by any Linux driver1. NDISwrapper does the job quite well.

Update (2015/12/08) See https://wiki.debian.org/wl no need for ndiswrapper / driver loading / init script anymore.


$ sudo aptitude install module-assistant
$ sudo m-a prepare
$ sudo m-a auto-install ndiswrapper

Driver loading (non-dfsg/non-free)

$ wget http://ftp.us.dell.com/network/R151517.EXE
$ mkdir driver
$ unzip -a R151517.EXE -d driver/
$ cd driver/DRIVER/
$ sudo ndiswrapper -i bcmwl5.inf
$ sudo ndiswrapper -l
$ sudo ndiswrapper -m
$ sudo modprobe ndiswrapper
$ echo ndiswrapper >> /etc/modules
$ echo "blacklist b43" >> /etc/modprobe.d/blacklist.conf # don't load generic driver !

Init script

echo << EOF
#! /bin/sh
# Provides: ndiswrapper
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: enable to load ndiswrapper
# Description: enable to load ndiswrapper

rmmod ohci_hcd
rmmod ssb
rmmod ndiswrapper
modprobe ndiswrapper
modprobe ssb
modprobe ohci_hcd

############# end file ############
$ sudo chmod 755 /etc/init.d/ndiswrapper
$ sudo ln -s /etc/init.d/ndiswrapper /etc/rc2.d/S99ndiswrapper

Alternative: graphical installation

$ sudo aptitude install ndisgtk

Some help here: http://doc.ubuntu-fr.org/bcm4328

More information on NDISwrapper is available on this wiki.

iSight (integrated Webcam)

$ sudo aptitude install isight-firmware-tools

Firmware location on Mac OS X filesystem (required and non-free)


uvc module loading

Update (2015/12/08) Not needed on testing. Not tried on stable.

$ sudo modprobe uvcvideo
$ sudo echo "uvcvideo" >> /etc/modules

{i} You can test the integrated webcam with cheese for example.


Automatically discovered, nothing to do

Screen resolution

Nothing to do, Xorg (1.4.2 release now), recognize and adapt resolution.


Nothing to do specific; multimedia shorcuts (Sound level, mute, eject) are functionnal with Gnome (2.22.3 now)

Update (2015/12/08) If you want normal behaviour of 'F' keys, then configure as a module parameter following instructions on: https://wiki.debian.org/InstallingDebianOn/Apple/PageFragmentKeyboard


Aluminium iMac intel 12,1 mid 2011 and 7,1 mid 2007 (and potentially other models)

* Xorg radeon driver (default setup after installation)

The RadeonHD 6600M needs KMS to run Xorg with the free radeon Xorg driver. By default, KMS is enabled, but the card needs a non-free firmware that is not installed and will make the screen unuseable at boot time when the kernel initialiazes KMS. You will need to install the package "firmware-linux-nonfree (http://packages.debian.org/wheezy/firmware-linux-nonfree). For this, modify the grub command line (press e) and add to the kernel boot parameters :


You will then be able to boot and login as root. Edit /etc/apt/sources.list to add contrib and non-free, you should have something like :

deb http://mirror.aarnet.edu.au/debian wheezy main contrib non-free

And install firmware-linux-nonfree:

aptitude update
aptitude install firmware-linux-nonfree

Reboot, and enjoy your new Debian :)

iMac Intel 5,1 late 2006 (and potentially other models)

Update (2015/12/08) on this specific iMac model: It doesn't work on stable. Go for testing and you'll get a reasonable working driver: still some glitches and flashing second monitor from time to time. AMD dropped support for older graphics cards in Catalyst v. 9.3, which also requires the use of a Kernel older than v. 2.6.28 and X server older than v. 1.5. See: http://askubuntu.com/questions/310754/ati-radeon-xpress-1200-graphics-card-driver-install-problems

Interesting links: https://wiki.debian.org/AtiHowTo https://wiki.debian.org/ATIProprietary

2 choices:


Update (2015/12/08) This package does not exist on stable: https://packages.debian.org/search?keywords=radeonhd

Installed by default Desktop install and provide 3D/2D acceleration support

$ sudo aptitude install xserver-xorg-video-radeonhd
$ glxgears # from mesa-utils
13798 frames in 5.0 seconds = 2759.461 FPS
13968 frames in 5.0 seconds = 2793.599 FPS
13927 frames in 5.0 seconds = 2785.283 FPS


$ sudo m-a auto-install fglrx
$ sudo aticonfig --initial # generate xorg.conf with fglrx section


$ fglrxinfo 
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon X1600
OpenGL version string: 2.1.7769 Release

Apple Infrared Remote

As you have seen before, the IR Receiver is connected via USB bus:

$ lsusb |grep -i ir
Bus 004 Device 003: ID 05ac:8240 Apple, Inc. IR Receiver [build-in]

This don't require any other kernel support and you just have to install lirc:

$ sudo apt-get install lirc

Edit /etc/lirc/hardware.conf:

# /etc/lirc/hardware.conf
# Arguments which will be used when launching lircd

#Don't start lircmd even if there seems to be a good config file

#Don't start irexec, even if a good config file seems to exist.

#Try to load appropriate kernel modules

# Run "lircd --driver=help" for a list of supported drivers.
# If DEVICE is set to /dev/lirc and udev is in use /dev/lirc0 will be
# automatically used instead

# Default configuration files for your hardware if any

Generate /etc/lirc/lircd.conf:

$ sudo irrecord -H macmini -d /dev/usb/hiddev0 /etc/lirc/lircd.conf # generate /etc/lirc/lircd.conf.conf

that give you:

begin remote

  name  Apple_remote_iMac5,1
  bits            8
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  pre_data_bits   24
  pre_data       0x87EE27
  gap          211986
  toggle_bit_mask 0x0

      begin codes
          VOLUP                    0x0B
          VOLDOWN                  0x0D
          BACKWARD                 0x08
          FORWARD                  0x07
          PLAY                     0x04
          MENU                     0x02
      end codes

end remote

Because if not you don't have volume up button enabled (not investigated).

Restart lirc:

$ sudo /etc/init.d/lirc restart

Launch irw to verify:

$ irw

and push buttons, you may see:

0000000087ee270b 00 VOLUP Apple_remote_iMac5,1
0000000087ee270d 00 VOLDOWN Apple_remote_iMac5,1
0000000087ee2708 00 BACKWARD Apple_remote_iMac5,1
0000000087ee2707 00 FORWARD Apple_remote_iMac5,1
0000000087ee2704 00 PLAY Apple_remote_iMac5,1
0000000087ee2702 00 MENU Apple_remote_iMac5,1

After pressing button Pause, Volume up, Next, Volume down, Precedent, Menu.

You can now have a ~/.lircrc to use this buttons !

Thanks http://idebian.wordpress.com/2008/07/15/infrared-in-linux-lirc/ :)

Sensors (applesmc module)

Loading modules

{i} >= 2.6.27 kernel has support


To manage fan speed:

# echo "1" > /sys/devices/platform/applesmc.768/fanX_manual
# echo "1200" > /sys/devices/platform/applesmc.768/fanX_output

Where X could be 1 (ODD fan), 2 (HDD fan) or 3 (CPU fan).

{i} : Gnome sensors applet can be used for showing temperature and fan speed. You can alternatively use the sensors command to verify the speed.

Temperature and fan descriptions

Here is a complete list of the 12 temp sensors (mactel-linux-devel archive):

# cat > /etc/sensors.d/applesmc-isa-0300.conf << EOF
label "temp1" "Ambient"
label "temp2" "Enclosure Bottom"
label "temp3" "CPU A"
label "temp4" "unknown TC0P"
label "temp5" "GPU Heatsink"
label "temp6" "GPU"
label "temp7" "unknown TG0T"
label "temp8" "Heatsink A"
label "temp9" "Heatsink B"
label "temp10" "Memory Controller"
label "temp11" "unknown Ts0P"
label "temp12" "unknown Ts1P"

Sensors command now show us the right label:

$ sensors
Adapter: ISA adapter
ODD :            2996 RPM  (min =  800 RPM)
HDD :            2998 RPM  (min = 1400 RPM)
CPU :            2995 RPM  (min =  800 RPM)
Ambient:          +27.5°C                                    
Enclosure Bottom: +38.0°C                                    
CPU A:            +38.0°C                                    
unknown TC0P:     +41.5°C                                    
GPU Heatsink:     +42.0°C                                    
GPU:              +38.0°C                                    
unknown TG0T:     +45.0°C                                    

Adapter: ISA adapter
Core 0:      +31.0°C  (high = +100.0°C, crit = +100.0°C)  

Adapter: ISA adapter
Core 1:      +35.0°C  (high = +100.0°C, crit = +100.0°C)  

{i} : you have to load the coretemp kernel module to have cpu temperature.

Software suspend

The iMac Intel presented here seems to consume 220 Watts (french measure).

Boot loader

grub2 boot loader works very good in the Linux partition:

sudo aptitude install grub-pc
sudo vi /etc/default/grub  # edit your partitions !!!
sudo grub-install /dev/<your_linux_partition>
sudo vi /boot/grub/device.map  # if necessary
sudo update-grub2

{i} : Please note that grub2 partition number now start at 1 and not 0


See Also