Contents |
MacBookAir (6,2) on Ubuntu 14.04 (Trusty Tahr)
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 14.04, Trusty Tahr.
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.
(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-14.04-desktop-amd64.iso.
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-14.04-desktop-amd64.img ubuntu-14.04-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-14.04-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) (Direct Download refind-bin-0.8.2.zip)
Open a Terminalcd Downloads unzip refind-bin-0.8.2.zip cd refind-bin-0.8.2 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 or an Apple Thunderbolt-Ethernet Adapter.
1. Log into ubuntu 14.04 and open a terminal (Ctrl+Alt+t).
- Attach Apple X-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. You may want to change default ALSA sound card (needed for Lubuntu) - put this in /etc/asound.conf :
defaults.ctl.card 1 defaults.pcm.card 1 defaults.timer.card 1
iSight
Patrik Jakobsson wrote a driver for the camera which appears to work, though is still listed as experimental. It depends on kernel 3.19 minimum and you should run
sudo modprobe -r bdc_pci
prior to following the Get started on Debian instructions for Trusty.
Touchpad (appletouch)
Works.
External Monitor
Works via thunderbolt --> DVI out of the box.
Although Apple Displays won't hotplug. Probably will need features coming in kernel 3.15 (or backported)
Note there is a regression in supported resolutions in the kernel that ships with 14.04. On at least some displays, the maximum resolution available is lower on 14.04 than it was on 13.04. (For example, tested on a Samsung display with 2560x1440 resolution on 13.04, but only 1920x1200 on 14.04.)
The regression appears to have been introduced with 13.10 and still exists in 14.10.
One suggested workaround is to load a kernel that came with 13.04 (which exactly?). More information here: http://ubuntuforums.org/showthread.php?t=2218618 and here: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1391984
Bluetooth
Works.
I encountered some initial problems with searching for devices. Simply no devices could be found with using "Set up new device". After some reboots and a kernel update to "3.13.0-30-generic" adding and accessing bluetooth devices is not an issue any longer.
Function Keys
Works. See also AppleKeyboard#Corrections page for fine tuning.
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 TLP 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
!!! Two problems with this part of solution: 1. the tlp file contains
RESTORE_DEVICE_STATE_ON_STARTUP=0
which can be edited in txt. BUT 2. permission is denied when
cp attachment .tlp
and i cannot chmod the tlp file because of permissions even with superuser privilege Please advise, because i think this is the main cause of black screen after suspend/lid close e.g. http://m.helpsforcoder.com/ubuntu/499293-macbook-air-2013-wont-wake-after-opening-lid-14-04.html !!!
- 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)
Backlight
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, follow these steps.
1. Install Build-Essentials and headers
sudo apt-get install build-essential linux-headers-generic
2. Download mba6xbl-dkms_0.0.3_all.deb and install it with
sudo dpkg -i mba6xbl-dkms_0.0.3_all.deb
Note: Repeat this installation step each time you kernel gets updated.
3. Load the module:
sudo modprobe mba6x_bl
4. Log out and log back in. It should load automatically on next boot.
Earlier versions of these instructions suggested editing /etc/X11/xorg.conf as well as adding the module to /etc/modules, but these steps are not necessary as of version 0.0.3 of the driver.
Display
Display colors are not true by default. To have right color profile, you should consider import ICC color profile from your OSX installation, located on your OSX partition at /Library/ColorSync/Profiles/Displays.
You can import this profile from Gnome settings into the Color settings pannel.
|
|