MacBookAir (6,2) on Ubuntu 13.10 (Saucy Salamander)
This page aims to describe the steps needed, to fully enable all features of the 6-th Generation MacBookAir (release date: mid 2013) when using Ubuntu 13.10, Saucy Salamander.
You can find out, what model you have by typing at the terminal:
sudo dmidecode -s system-product-name
If you have a different model, please go here and find the right wiki.
Overview
Anything not mentioned here probably already works out of the box. If not, please refer to the Ubuntu Apple Users forum.
Feature
Support status
LCD Panel
Suspend & Hibernate
Suspend ok, but LCD brightness can't be adjusted after resume.
Hibernate not tried yet
Shut-down and Reboot
Keyboard functions (Brightness,volume,...)
Touchpad (appletouch)
Wireless (AirPort)
Bluetooth
iSight
Sound
Microphone
sound recoder is broken but recording with audacity works
External Monitor
Thunderbolt
To be verified
SD card slot
HFS+ (OS X disc partition)
mount read-only
Fan Control
according to tlp stat
Sensors (temps & fans)
according to tlp stat
GPU Power Save
(works out-of-the-box)
(works, with remarks)
(needs manual install)
(won't work)
(not yet documented)
Basic Installation Instructions
Common things about installing and maintaining Ubuntu on Intel-based Macs: Intel CPU-based Macintosh Generic Installation Instructions
Prerequisites
1. MacBookAir6,2
Check on OSX with sysctl hw.model Check on linux with sudo dmidecode -s system-product-name
2. Apple USB-Ethernet Adapter
3. USB-Stick (1GB at least)
4. ubuntu-13.10-desktop-amd64.iso.
- Note: Do not use the 'amd64+mac' iso image as here the USB-Stick cannot boot. (Do not ask me why.)
Partition Harddisk
1. Boot Macbook Air into OSX
2. Open Disk Utility
open /Applications/Utility/Disk\ Utility.app
3. Select "Macintosh HD" > (Tab)Partition
- Add (+) 3 more partitions
2nd Partition: Set 30-40GB for Ubuntu "/"
4th Partition: Set 4GB for Linux Swap partition
3rd Partition: Use as much space as left for "/home"
Prepare USB-Stick
1. In OSX
2. Download iso image to ~/Downloads
3. Open Terminal (a detailed description can be found here.
cd ~/Downloads # convert iso hdiutil convert -format UDRW -o ubuntu-13.10-desktop-amd64.img ubuntu-13.10-desktop-amd64.iso open /Applications/Utilities/Disk\ Utility.app # format the USB stick with MS-DOS VFAT diskutil list # check which /dev/diskX contains the USB stick - here it is "disk1" # then unmount the usb-stick diskutil unmountDisk /dev/disk1 # write img to usb stick - /!\ BE CAREFUL THAT disk1 REALLY IS YOUR USB-STICK sudo dd if=ubuntu-13.10-desktop-amd64.img.dmg of=/dev/rdisk1 bs=1m
Install Ubuntu
1. Restart and press "Alt"-Key on startup.
2. Make sure that the USB-Ethernet Adapter is inserted. (With a network connection the bcmwl-kernel-source module gets downloaded during the installation process.
- Select first USB-device labled "EFI-Boot" and press "Enter"
No splash screen shall be displayed but the Ubuntu installation menu. See Identifying if the computer boots the Ubuntu DVD in EFI mode. Select "Install Ubuntu" Note: If booting into BIOS-Mode is a bad choice as you can currently only run on one core. Bug
3. Choose "Something else" for partitioning.
- Please check the sizes in the list according to the partitioning for the step above. OSX Disk Utility leaves unallocated partitions inbetween which usually are arround 128MB in size. Do not try to delete these "blank" partitions. 2nd partition should be ext4 formatted and mounted "/". 3rd partition should be ext3 formatted and mounted "/home". (I use ext3 in order to use fuse-ext2 from OSX; ext4 is yet not supported) 4th partition should be swap (no format and mountpoint required) Proceed...
4. The installation process should run through smoothly.
5. Restart with pressed "Alt"-Key.
- Unfortunately selecting the "Windows" labled Partition (HD-icon) only displayed a black screen with a blinking cursor. Reboot into OSX again and install "refind".
Download Binary Zip-File Open a Terminal
cd Downloads unzip refind-bin-0.7.4.zip cd refind-bin-0.7.4 sudo ./install.sh
6. Restart again. Now a Ubuntu labled "/efi/ubuntu/grubx64.efi" should be shown.
- Select this an start it, now the grub-menu should be displayed. Select "Ubuntu". Now Ubuntu should boot.
Wireless (AirPort)
Requires an Apple USB-Ethernet Adapter.
1. Log into ubuntu 13.10 and open a terminal (Ctrl+Alt+t).
- Attach Apple USB-Ethernet Adapter. Enter the following commands:
sudo apt-get update sudo apt-get upgrade
This updates all packages
2. Start (Panel) > (Menu)System Settings > (Icon)Software & Updates (or from terminal /usr/bin/python3 /usr/bin/software-properties-gtk)
- Select (Tab)Additional Drivers and install Broadcom 802.11 Linux STA wireless driver from bcmwl-kernel-source
3. Now reboot again
- Select "Ubuntu"
Sound
Works.
Loudspeaker works, even if headset is attached. alsamixer running from termial is required to lower volume on loudspeaker while maintaining on headset.
iSight
iSight HD webcam does not work as Apple changed to PCI for higher resolution raw images. The camera is not recognized as USB device. The current iSight-Firmware cutter does not help here.
Touchpad (appletouch)
Works.
External Monitor
Requires at least kernel 3.11.6 - Take care with vanilla kernel as this might not contain the sound fix.
Function Keys
Works.
I personally prefer to use fn+Fkeys for the brightness and sound settings but leave the Fkeys for the applications without pressing fn. To change this behaviour
echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf sudo update-initramfs -u -k all
Then reboot. For further info on this topic check AppleKeyboard.
Finetuning Powersave functions
With the procedures enabled below ~10h on battery can be achieved.
1. Install powertop
sudo apt-get install powertop sudo powertop
Toggle through with "TAB" to Tunables Lots of "Bad" values should be displayed.
2. Install TLP
For detailed Instructions refer to tpl wiki.
sudo add-apt-repository ppa:linrunner/tlp sudo apt-get update sudo apt-get install tlp tlp-rdw
3. Edit tlp config /etc/default/tlp (only changes are shown)
DISK_IDLE_SECS_ON_AC=0 DISK_IDLE_SECS_ON_BAT=1 MAX_LOST_WORK_SECS_ON_BAT=15 DISK_APM_LEVEL_ON_BAT="1 1" RUNTIME_PM_ALL=1 RESTORE_DEVICE_STATE_ON_STARTUP=1
Restart tpl with sudo /etc/init.d/tlp restart Check if settings took effect with powertop.
4. Enable more powersaving options
Put this script under /etc/pm/power.d/99macbookair6
# # Macbook Air 6,2 power management script # copy to /etc/pm/power.d/99macbookair and chmod +x # # # @param $1 idVendor # @param $2 idProduct # @param $3 type of powercontrol (on|auto) # set_usb_power_control() { for dev in /sys/bus/usb/devices/* ; do if [ -e $dev/idVendor -a \ -e $dev/idProduct -a \ -e $dev/power/control ] ; then if [ x`cat $dev/idVendor` = x$1 -a \ x`cat $dev/idProduct` = x$2 ] ; then echo Setting $dev to $3 echo $3 > $dev/power/control fi fi done } case "$1" in true) # powersaving on # lower brightness (value from 1 to 15) echo 600 > /sys/class/backlight/intel_backlight/brightness # lower keyboard brightness value echo 16 > /sys/class/leds/smc\:\:kbd_backlight/brightness # Autosuspend for USB device Apple Internal Keyboard / Trackpad [Apple Inc.] # This is not handled by `tlp` set_usb_power_control 05ac 0291 auto ;; false) # powersaving off ;; *) exit 254 ;; esac exit 0
In /etc/rc.local add the following line:
/etc/pm/power.d/99macbookair6 true
5. Run sudo tlp stat
- Still
/sys/module/i915/parameters/i915_enable_rc6 = -1 (use per-chip default) /sys/module/i915/parameters/i915_enable_fbc = -1 (use per-chip default) /sys/module/i915/parameters/lvds_downclock = 0 (disabled) /sys/module/i915/parameters/semaphores = -1 (use per-chip default)
Add the following line in /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="pcie_aspm=force i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 acpi_backlight=vendor"
Then run sudo update-grub and reboot. After that:
/sys/module/i915/parameters/i915_enable_rc6 = 1 (enabled) /sys/module/i915/parameters/i915_enable_fbc = 1 (enabled) /sys/module/i915/parameters/lvds_downclock = 1 (enabled) /sys/module/i915/parameters/semaphores = -1 (use per-chip default)
|
|