Kernel Configuration Guide
From Mactel-Linux
This page collects information about Linux kernel configuration and patching for Intel Macs. If you get a device working, please add instructions to this page.
Contents |
General Options
To be written...
- Enable ACPI, SMP, USB
h
EFI
Applies to: all models, but only if booting through elilo.
To be written...
- "Boot from EFI support" is required for booting through elilo.
Graphics
To be written...
- imacfb patch, proprietary ATI drivers, ...
mac Mini: i915.ko Kernel module, i810 xorg driver. (2D works, but 3D locks the x server sometimes)
what about drivers to use automatic backlight dimming?
Hard disk: ICH7 SATA
Applies to: iMac, MacBook Pro 15", Mac mini
The internal hard disk is connected to the SATA (Serial ATA) controller in the south bridge of the Intel 945 chipset (ICH7). Note that SATA disks show up as /dev/sda, not /dev/hd*.
To enable SATA support, you must enable the SCSI subsystem. The Intel chipset is supported by the ata_piix driver.
- Configuration options
- "Serial ATA (SATA) support" in "SCSI device support" -> "SCSI low-level drivers"
- "Intel PIIX/ICH SATA support" in "SCSI device support" -> "SCSI low-level drivers"
- Module name
- ata_piix
- Configuration macro
- CONFIG_SCSI_SATA, CONFIG_SCSI_ATA_PIIX
Optical drive: ICH7 PATA
Applies to: iMac, MacBook Pro 15" (unconfirmed), Mac mini
The optical drive (CD/DVD) is connected via PATA (Parallel ATA, also called IDE) to the south bridge (ICH7). It shows up as /dev/hda in the Linux device tree.
- Configuration options
- "Intel PIIXn chipsets support" in "ATA/ATAPI/MFM/RLL support"
- Module name
- piix
- Configuration macro
- CONFIG_BLK_DEV_PIIX
Ethernet: Marvell Yukon 2
Applies to: iMac, MacBook Pro 15", Mac mini
The Gigabit Ethernet port is supported by the "sky2" driver. This is a very recent driver; make sure you have a current kernel (i.e. 2.6.16).
- Configuration option
- "SysKonnect Yukon2 support" in "Network device support" -> "Ethernet (1000 Mbit)"
- Module name
- sky2
- Configuration macro
- CONFIG_SKY2
Wireless LAN: Broadcom BCM4311
Applies to: iMac
Included as of kernel 2.6.17.
modprobe bcm43xx ifconfig eth1 up iwconfig eth1 essid "NetworkName" dhclient eth1
Wireless LAN: Atheros
Applies to: MacBook Pro 15", MacBook (Black and White)
This works pretty much out of the box with madwifi and the standard wireless tools.
modprobe ath_pci iwconfig ath0 essid "NetworkName" dhclient ath0
- Works great with the madwifi driver. To scan, use the 'wirelesstool' that comes with the madwifi drivers!
Bluetooth
To be written...
- Should work with the standard USB driver (hci_usb)
Sound
- All current models use the HD Audio interface in the Intel chipset and a Sigmatel codec.
- Configuration options
- "Advanced Linux Sound Architecture" in "Sound"
- "Intel HD Audio" in "Sound" -> "Advanced Linux Sound Architecture" -> "PCI Devices"
The Sigmatel-Driver needs to be patched. Patch is here: http://www.madingley.org/macmini/
15" Core 2 Macbook Pros have been known to need a little extra work but sounds can be made to work with unpatched drivers:
- After install run 'alsaconf' as root
- Choose the detected Intel chipset
- Complete the wizard, the alsa module should load
- Sound will now come out of the 'Line IN' jack
- Run 'alsamixer' and use the 'm' key to unmute the sliders labeled 'Line In' and 'Side'
- Increasing the volume for 'Side', 'Front' and 'PCM' makes the internal speakers to kick on
Keyboard
Keyboard Layout
Using xorg "macintosh" Layout.% Example for a French keyboard :
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XKBModel" "macintosh"
Option "XKBLayout" "fr"
EndSection
Note : some shorcuts may be inverted (for example, to have a '[' you may need to press
alt + shift + (
instead of
shift + alt + (
like in OsX
An alternative French Keymap
If the default Xorg "macintosh" keyboard doesn't work for you, then you can use this one for a French Layout : http://kereoz.imaginair.net/downloads/macbookpro/fr_macbookpro% Copy this to /usr/share/X11/xkb/symbols/macintosh/
cp fr_macbookpro /usr/share/X11/xkb/symbols/macintosh/
And edit /etc/X11/xorg.conf to have
Section "InputDevice" Identifier "Keyboard0" Driver "kbd" Option "XKBLayout" "fr_macbookpro" Option "XKBModel" "macintosh" EndSection
Special keys
You can use pommed and gpomme for Debian SVN. Note that packages are available directly with most distributions. % For gentoo, you can add these lines to /etc/portage/package.keywords (2007.03)
app-laptop/pommed ~x86 sys-libs/libsmbios ~x86
Touchpad
What about right mouse button? X11 options to emulate this? To be written...
Make sure that support for button 2 and 3 emulation is compiled into the kernel.
# # Macintosh device drivers # CONFIG_MAC_EMUMOUSEBTN=y
Documentation for the MAC_EMUMOUSEBTN kernel configuration option reads:
This provides generic support for emulating the 2nd and 3rd mouse button with keypresses. If you say Y here, the emulation is still disabled by default. The emulation is controlled by these sysctl entries: /proc/sys/dev/mac_hid/mouse_button_emulation /proc/sys/dev/mac_hid/mouse_button2_keycode /proc/sys/dev/mac_hid/mouse_button3_keycode If you have an Apple machine with a 1-button mouse, say Y here.
You can use F11 for right button (button 3) and F12 for middle mouse button (button 2) by adding the following lines to /etc/sysctl.conf:
dev.mac_hid.mouse_button_emulation = 1 dev.mac_hid.mouse_button3_keycode = 87 dev.mac_hid.mouse_button2_keycode = 88

