Translation(s): none
MacBook3,1
MacBook 13" Nov 2007
SATA / AHCI Mode
Many SATA controllers have two modes of operation: IDE mode (using the ata_generic or the ata_piix kernel modules for example), and AHCI mode (using the ahci module). Apple determines the mode of operation on boot based on whether the system is booted in EFI mode or BIOS compatibility mode (see the whole section on EFI/BIOS for more detail).
When you use BIOS mode the SATA controller will be switched to IDE mode. If you want to set the controller in AHCI mode while using BIOS compatibility before the kernel boots up, you can do it using GRUB2. The reason why you might want to do this, is because the AHCI mode and module ensures better performance under load, and is generally more stable.
The fix is to just add a setpci call on your GRUB configuration. To be safe you can test it by going into command line mode in GRUB, and doing something like this:
> lspci (check for the ID for IDE mode, in my case 8086:2828) > setpci -d 8086:2828 90.b=40 > lspci (The 2828 ID is now gone, replaced by 8086:2829, AHCI/SATA mode)
You can add this to your GRUB configuration, and avoid losing it on upgrades, by adding a script like this to /etc/grub.d/:
#!/bin/sh set -e ## Enable SATA (AHCI) mode on macbook 3,1 echo "setpci -d 8086:2828 90.b=40"
For more info see these blog posts:
Apple Keyboard
Configuration
You can set up the keyboard layout with this command:
$ sudo dpkg-reconfigure keyboard-configuration
This will change the config file /etc/default/keyboard into something like this:
XKBMODEL="apple_laptop" XKBLAYOUT="us" XKBVARIANT="mac" XKBOPTIONS="terminate:ctrl_alt_bksp"
… or another example:
XKBMODEL="pc105" XKBLAYOUT="fr" XKBVARIANT="mac" XKBOPTIONS="lv3:rwin_switch"
Default behaviour
'fn'+'Enter' -> Insert
'fn'+'Backspace' -> Delete
'fn'+'Up' -> PageUp
'fn'+'Down' -> PageDown
'fn'+'Left' -> Home
'fn'+'Right' -> End
'Clear' -> NumLock
Function key behaviour
The hid_apple module has a parameter called 'fnmode' to change the behaviour of the 'fn'-key
There's three settings for fnmode:
- 0 = disabled: Disable the 'fn' key. Pressing 'fn' has no effect
- 1 = fkeyslast: Enable the 'fn' key. Pressing 'F1-F12' keys will act as special keys. Pressing 'fn'+'F1-F12' will behave like 'F1-F12'.
- 2 = fkeysfirst: Enable the 'fn' key. Pressing 'F1-F12' keys will behave like the real 'F1-F12'. Pressing 'fn'+'F8' will act as the special key (play/pause in this case).
There's several ways to set this parameter:
using sysfs, for example:
$ echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode
as a module parameter (won't work if you compile hid_apple in your kernel):
$ echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf $ sudo modprobe --dry-run hid_apple
if this throws no error you can
$ sudo update-initramfs -u
on the kernel command line: edit /etc/default/grub, and add the following to the GRUB_CMDLINE_LINUX_DEFAULT variable:
hid_apple.fnmode=2
Swapped keys on international keyboards
The hid_apple module also has a parameter called 'iso_layout'
- 0 means international layout, so on an 'English International' keyboard the '§±'-key will be top left, and the '`~'-key will be next to left shift
- 1 swaps it around
There's several ways to set this parameter:
using sysfs, for example:
$ echo 0 | sudo tee /sys/module/hid_apple/parameters/iso_layout
as a module parameter (won't work if you compile hid_apple in your kernel):
$ echo options hid_apple iso_layout=0 | sudo tee -a /etc/modprobe.d/hid_apple.conf $ sudo modprobe --dry-run hid_apple
if this throws no error you can
$ sudo update-initramfs -u
on the kernel command line: edit /etc/default/grub, and add the following to the GRUB_CMDLINE_LINUX_DEFAULT variable:
hid_apple.iso_layout=0
See also
See also AppleKeyboard on Ubuntu's wiki.
System Summary
cpuinfo
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz stepping : 11 microcode : 0xb3 cpu MHz : 800.000 cache size : 4096 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm tpr_shadow vnmi flexpriority bogomips : 4388.95 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz stepping : 11 microcode : 0xb3 cpu MHz : 800.000 cache size : 4096 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 initial apicid : 1 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm tpr_shadow vnmi flexpriority bogomips : 4388.95 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:
lspci
00:00.0 Host bridge [0600]: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub [8086:2a00] (rev 03) 00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (primary) [8086:2a02] (rev 03) 00:02.1 Display controller [0380]: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (secondary) [8086:2a03] (rev 03) 00:1a.0 USB controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 [8086:2834] (rev 03) 00:1a.1 USB controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 [8086:2835] (rev 03) 00:1a.7 USB controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 [8086:283a] (rev 03) 00:1b.0 Audio device [0403]: Intel Corporation 82801H (ICH8 Family) HD Audio Controller [8086:284b] (rev 03) 00:1c.0 PCI bridge [0604]: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 [8086:283f] (rev 03) 00:1c.4 PCI bridge [0604]: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 [8086:2847] (rev 03) 00:1c.5 PCI bridge [0604]: Intel Corporation 82801H (ICH8 Family) PCI Express Port 6 [8086:2849] (rev 03) 00:1d.0 USB controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 [8086:2830] (rev 03) 00:1d.1 USB controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 [8086:2831] (rev 03) 00:1d.2 USB controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 [8086:2832] (rev 03) 00:1d.7 USB controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 [8086:2836] (rev 03) 00:1e.0 PCI bridge [0604]: Intel Corporation 82801 Mobile PCI Bridge [8086:2448] (rev f3) 00:1f.0 ISA bridge [0601]: Intel Corporation 82801HM (ICH8M) LPC Interface Controller [8086:2815] (rev 03) 00:1f.1 IDE interface [0101]: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) IDE Controller [8086:2850] (rev 03) 00:1f.2 SATA controller [0106]: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] [8086:2829] (rev 03) 00:1f.3 SMBus [0c05]: Intel Corporation 82801H (ICH8 Family) SMBus Controller [8086:283e] (rev 03) 02:00.0 Network controller [0280]: Broadcom Corporation BCM4321 802.11a/b/g/n [14e4:4328] (rev 03) 03:00.0 Ethernet controller [0200]: Marvell Technology Group Ltd. 88E8058 PCI-E Gigabit Ethernet Controller [11ab:436a] (rev 13) 04:03.0 FireWire (IEEE 1394) [0c00]: LSI Corporation FW322/323 [TrueFire] 1394a Controller [11c1:5811] (rev 61)
lsusb
Bus 002 Device 003: ID 05ac:8501 Apple, Inc. Built-in iSight [Micron] bDeviceClass 255 Vendor Specific Class bDeviceProtocol 255 Vendor Specific Protocol iProduct 2 Built-in iSight (Bus Powered) bDeviceClass 255 Vendor Specific Class bDeviceProtocol 255 Vendor Specific Protocol (Bus Powered) Bus 003 Device 003: ID 05ac:8205 Apple, Inc. Bluetooth HCI bDeviceClass 224 Wireless bDeviceProtocol 1 Bluetooth iProduct 0 Bus 007 Device 002: ID 05ac:8242 Apple, Inc. IR Receiver [built-in] bDeviceClass 0 (Defined at Interface level) bDeviceProtocol 0 iProduct 2 IR Receiver (Bus Powered) (Bus Powered) Bus 007 Device 003: ID 05ac:022a Apple, Inc. Internal Keyboard/Trackpad (MacBook Pro) (ISO) bDeviceClass 0 (Defined at Interface level) bDeviceProtocol 0 iProduct 2 Apple Internal Keyboard / Trackpad (Bus Powered) (Bus Powered) Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub bDeviceClass 9 Hub bDeviceProtocol 0 Full speed (or root) hub iProduct 2 EHCI Host Controller Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub bDeviceClass 9 Hub bDeviceProtocol 0 Full speed (or root) hub iProduct 2 EHCI Host Controller Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub bDeviceClass 9 Hub bDeviceProtocol 0 Full speed (or root) hub iProduct 2 UHCI Host Controller Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub bDeviceClass 9 Hub bDeviceProtocol 0 Full speed (or root) hub iProduct 2 UHCI Host Controller Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub bDeviceClass 9 Hub bDeviceProtocol 0 Full speed (or root) hub iProduct 2 UHCI Host Controller Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub bDeviceClass 9 Hub bDeviceProtocol 0 Full speed (or root) hub iProduct 2 UHCI Host Controller Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub bDeviceClass 9 Hub bDeviceProtocol 0 Full speed (or root) hub iProduct 2 UHCI Host Controller