LinuxConsulting

- Nicu Pavel personal page

PaNiC Random Rant (or how we used to call it: .plan)


Ubuntu (8.04) Linux on MacBook Air (updated)


Ubuntu 9.04 looks like it's working out of the box on MacBook Air. The new intel video card driver in 9.04 it's pretty bad and it's suggested to use the old driver till a fix is issued. (June 18, 2009)

As I received a MacBook Air for development "on-the-road", I installed Ubuntu on it.
Installation is pretty easy:
1. Use MacOS BootCamp to create a "Windows" partition.
2. Get a external USB cdrom or use isotostick script to install from a USB stick.
3. Press C to start booting from CDROM and install Ubuntu (don't forget to make the "Windows" partition active after the installation or it won't show up in BootCamp).

What works:

1. Video Card
Works ok without tweaks even with 3D support/Compiz/XV. I noticed some vertical flickering might be from dot clock but till now ModeLine settings didn't help.
Update:
Flickering is caused by backlight settings a flicker free backlight setting for me is

xrandr --output LVDS --set BACKLIGHT 8000

2. TouchPad/Multitouch
Basic TouchPad/1 button click works ok but if you want multitouch for mouse gestures/scroll/right-click you need to get touchd from http://touchd.sf.net and add a
small modification to multitouch.c by changing the USB IDs looked up by openusb_find_dev_* to: 0x05ac, 0x0223.
The only issue is that touchd has problems comming up from suspend/resume, which can be solved by adding a new script in /etc/acpi/resume.d/ to restart touchd process.

3. Wireless
Need to install ndiswrapper and use the winxp broadcom drivers supplied on DVD or look-up Apple BootCamp drivers on torrents. Other drivers don't work ok either freeze on suspend/resume or have limited capabilities.
Broadcom drivers seems to work ok and also power_profile can be set (iwpriv wlan0 power_profile 0) along with other powersaving settings.

4. Sound
Works by adding: options snd_hda_intel model=mbp3 to /etc/modprobe.d/options. Microphone might need a little alsa patching but haven't tested yet.

5. iSight Camera
Works ok after install the module is uvcvideo

6. CPU Freq Scaling
Works ok after install. Can be tweaked further from /etc/laptop-mode or powerd

7. BlueTooth
Works ok after install.

8. LCD Brightness levels.
This should be handled by pommed/applesmc kernel module but didn't work for me (even tried a 2.6.25 applesmc module with mactel patches) looks like macbook air isn't yet supported by applesmc.
Instead xbacklight (apt-get install xbacklight) works fine which can be binded to F1/F2 keys (I use xmodmap to define keys with scancode 101 and 212 and xbindkeys to bind them to actions like xbacklight +2 or xbacklight -2)

9. Keyboard Leds
Works with a small patch to applesmc.c (in drivers/hwmon/applesmc.c). You can set the keyboard leds levels by echoing values here:
/sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
This can be done with a small script and xbindkeys to assing the script to F5/F6 keys.

See below for patch download and a sample script.

10. Multimedia keys
Sound keys/Eject keys are working by default the rest can be detected/added to keyboard shorcuts by detecting them with xev

For power saving I recommed using powertop (apt-get install powertop), iwconfig/iwpriv to set wireless power mode, xbacklight and power management tweaks to blank screen faster with DPMS. At this moment battery times in Mac OS X and Ubuntu Hardy are similar (touchd wakes up CPU pretty often but it's not a big drain).

/applesmc-macbookair-2.6.24-17-patch.txt

/keybacklight.sh

Labels: , ,

6 Comments:

At May 12, 2008 at 6:49 PM , Blogger stellars said...

hey, could you please put somewhere link to your 2.6.25 kernel config for macbook? i'm still dealing with SATA disk problem with 2.6.25 kernel, while 2.6.24 works well. thanks, much appreciated :-)

stell

 
At May 12, 2008 at 6:57 PM , Blogger PaNiC said...

I didn't recompile the whole 2.6.25, just took applesmc.c patched it with mactel patches, then add it to ubuntu shipped 2.6.24-17 kernel source tree.

 
At May 12, 2008 at 7:19 PM , Blogger stellars said...

hm, ok, did you try the 2.6.25 then? hm, i guess not...

noone's screaming about this 2.6.25 regression, however it exists for the whole new macbook line (4,1). tried it on couple of these, and always got the same result:

SATA link down (SControl 0, S... 0)

thanks anyway

 
At June 4, 2008 at 6:30 PM , Blogger Unknown said...

hey, could you tell how to make the "Windows" partition active after the installation?
Did you use rEFIt? I don't want to install it, but the windows partition just won't show up in the boot option wenn i hold Alt/Option key.
Any suggests?

Thanks in advance.

 
At June 4, 2008 at 7:42 PM , Blogger PaNiC said...

Just boot with ubuntu and use fdisk to make partition active.
Something like: fdisk /dev/sda
press p to list partitions
then press: a
then choose your partition number.
The bootloader(grub) was installed in partition not in MBR.

 
At June 5, 2008 at 12:27 AM , Blogger Unknown said...

hi, thank for your hints but i've tried it before, but didn't work.
Because fdisk doesn't recognize GUID Partition Table.
I've tried Gparted and it detects
/dev/sda1 fat32 has a boot flag because it's boot partition of apple.
/dev/sda2 is my Leopard partition
/dev/sda3 is ext3 where i installed Ubuntu.

Ubuntu doesn't show up on Boot Camp screen when i press Alt and i don't want to install rEFIt.

How did you do to make it works?? Can you explain it a bit more further ;) ??

Thanks in advance.

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home

Search

Loading

Previous Posts