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. See workaround below (backlight issue)
Hibernate not tried yetShut-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
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 withsudo 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"
Manual installation without USB-Ethernet Adapter
1. Download bcmwl-kernel-source deb package on an other computer.
- Transfer the file with USB-stick to your Macbook and install the required packages with:
sudo apt-get install dkms sudo dpkg -i bcmwl-kernel-source_6.30.223.141+bdcom-0ubuntu1_amd64.deb
Note: You can even enable Wifi using the Live-CD/ USB.
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
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.
Backtick and tilde keys
The tile and backtick key will print the greater than and less than symbol. To fix this:
1. Find the key code for the key that mapps to the "less" and "greater" signs
$ xmodmap -pk | grep greater 60 0x002e (period) 0x003e (greater) 94 0x003c (less) 0x003e (greater) 0x007c (bar) 0x00a6 (brokenbar) 0x007c (bar) 0x00a6 (brokenbar)
2. edit (or create) ~/.xmodmaprc and include the following line in it
keycode 94 = grave asciitilde
3. run xmodmap
$ xmodmap ~/.xmodmaprc
Thanks to emesjay from the thread Macbook with Ubuntu - backtick and tilde not working.
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. Copy tlp config tlp to /etc/default/tlp or adjust (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 99macbookair6 under /etc/pm/power.d/99macbookair6
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)
Suspend/resume backlight issue
There is a strange bug with backlight. All settings (using F1 F2 keys) work great but after suspend your can only get 0% or 100% backlight.
There is no real solution for the moment but there is now a workaround.
Look at comment 78 in https://bugs.freedesktop.org/show_bug.cgi?id=67454#c78
Patrik Jakobsson wrote a kernel module that directly programs the backlight driver and it works!
If you don't want to compile by yourself, Miek Gieben did it for you. It is in comment 82 https://bugs.freedesktop.org/show_bug.cgi?id=67454#c82
1. Download the deb file and install it
wget http://miek.nl/downloads/2013/mba6xbl-dkms_0.0.1_all.deb sudo dpkg -i mba6xbl-dkms_0.0.1_all.deb
2. If it does not exist, create a /etc/X11/xorg.conf containing:
Section "Device" Identifier "Intel Graphics" Driver "intel" Option "Backlight" "mba6x_backlight" EndSection
If /etc/X11/xorg.conf already exists, just add or edit the above section.
3. To get the driver automatically loaded on startup, add mba6x_bl to /etc/modules:
sudo echo "mba6x_bl" >> /etc/modules
In my case this fixed the problem (macbook air 13" core i7) and this finally makes my MBA usable under linux. I'm just missing the camera but it does not even work well under macOS!
|
|