# Installation of Ubuntu 13.10 on Macbook Air 6,2 (Mid2013)
## 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` from http://releases.ubuntu.com/13.10/.
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
Code:
open /Applications/Utility/Disk\ Utility.app
3. Select "Macintosh HD" > (Tab)Partition
Add (+) 3 more partitions
4. 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](http://www.ubuntu.com/download/deskt...ick-on-mac-osx)
Code:
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 13.10
1. Restart and press "Alt"-Key on startup.
2. Make sure that the USB-Ethernet Adapter is NOT inserted. (With a network connection the bcmwl-kernel-source module gets downloaded during the installation process which prevents grub to get installed; DKMS module insertion stops installation process).
Select first USB-device labled "EFI-Boot" and press "Enter"
No splash screen shall be displayed but the Ubuntu installation menu.
Check [Identifying if the computer boots the Ubuntu DVD in EFI mode](https://help.ubuntu.com/community/UEFI)
Select "Install Ubuntu"
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](http://www.rodsbooks.com/refind/getting.html)
Open a Terminal
Code:
cd Downloads
unzip refind-bin-0.7.4.zip
cd refind-bin-0.7.4
bash install.sh
6. Restart again. Now a Ubuntu labled '/efi/grubx64.efi' should be shown.
Select this an start it, now the grub-menu should be displayed.
Select "Ubuntu".
Now Ubuntu should boot.
## Update Ubuntu and install Wifi driver
1. Log into ubuntu 13.10 and open a terminal (Ctrl+Alt+t).
Enter the following commands
Code:
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"
## What works and what does not work
Feature |
Support status |
Notes |
------------------------ |
---------------- |
------- |
LCD Panel |
Partly |
After Suspend only off or on possible |
Suspend, Hibernate |
OK |
Suspend works, hibernate not tried out yet |
Shut-down and Reboot |
OK |
|
Keyboard functions (Brightness,volume,...) |
OK |
|
Keyboard backlight |
OK |
|
Touchpad |
OK |
|
Wireless |
OK |
|
Bluetooth |
OK |
|
iSight |
NO |
camera is not an usb device |
Sound |
OK |
|
Microphone |
OK |
sound recoder is broken but recording with audacity works |
External Monitor |
NO |
External Monitor cannot be found (see note below) |
Thunderbolt |
? |
To be verified |
SD card slot |
OK |
|
HFS+ (OS X disc partition) |
OK |
mount read-only ok |
Fan Control |
OK |
according to `tlp stat` |
Sensors (temps & fans) |
OK |
according to `tlp stat` |
**Issues left:**
* Backlight on/off after resume:
Before suspend + resume the behaviour of the backlight pressing F1 or F2 key is linear.
Checking the register `sys/class/backlight/intel_backlight/brightness` the range from 0 to 2770 can be operated in 21 steps.
After resume still the full range is triggered with the F1 to F2 keys but here the backlight is turned off for all values less than 2330.
* iSight HD webcam does not work:
The camera is not recognized as USB device. The current iSight-Firmware cutter does not help here.
* External Monitors are not detected properly.
Sometimes they get detected by accident and "Undetected display" is shown.
Then only VGA resolutions can be selected but not the external monitor native ones.
### Workarround for Backlight issue after resume
If led-backlight is set to low after resume the screen is to dark to enter the password.
The following script solves the problem of having to enter the password after resume in darkness.
But this does not solve the issue of readjusting the brightness
Paste the below code and copy it into a file nemed `99displayfix`. This copy into the folder `/etc/pm/sleep.d/`
Code:
#!/bin/sh
# installation instructions
# sudo cp 99displayfix /etc/pm/sleep.d/
# sudo chmod +x /etc/pm/sleep.d/99displayfix
case "$1" in
thaw|resume)
# set max brightness
echo 2550 > /sys/class/backlight/intel_backlight/brightness
;;
*)
;;
esac
exit $?
**NOTE:**
* Alt+F2+Fn (Run Application) not working
Enabling via (Menu)System Settings > (Item)Keyboard > (Tab)Shortcuts > (Item)Launchers > Key to Show the HUD == Disabled
Code:
sudo apt-get install compizconfig-settings-manager
# after install start in terminal with
ccsm
# (Chaper)General > (Item)Gnome Compatibility > (Item)Run Dialog > Grab Key-Combination "<Alt>F2"
### fn-Key change behaviour
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
Code:
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 [here](https://help.ubuntu.com/community/AppleKeyboard).
## Finetuning Powersave
1. Install powertop
Code:
sudo su
apt-get install powertop
powertop
Toggle through with "TAB" to Tunables
Lots of "Bad" values should be displayed.
2. Install TLP
For detailed Instructions refer to [](http://thinkwiki.de/TLP_-_Linux_Stromsparen).
Code:
sudo su
add-apt-repository ppa:linrunner/tlp
apt-get update
apt-get install tlp tlp-rdw
3. Edit tlp config `/etc/default/tlp` (only changes are shown)
Code:
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. Dim the backlights for screen and keyboard. On startup the values are set to max-level.
Edit `/etc/rc.local`
Code:
echo 400 > /sys/class/backlight/intel_backlight/brightness
echo 16 > /sys/class/leds/smc\:\:kbd_backlight/brightness
sleep 0.2s
Without the sleep command broken Wifi is the result.
5. Run `sudo tlp stat`
Still
Code:
/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`
Code:
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:
Code:
/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)
**Issues left:**
* Bluetooth drains quite some battery and cannot be disabled at start.
`sudo sed -i '$i /usr/sbin/rfkill block bluetooth' /etc/rc.local` does not allow to start bt from "System Settings" later on.
Still looking for a possibility to disable this from command-line at startup.
* It would be nice to have the ambient sensor used to trigger the backlights.
Trying 'lightum' `http://github.com/poliva/lightum` results in a crash.
Bookmarks