Android Ramblings, Craigslist Adventures, Technical Nonsense

or, thoughts from a random graduate student

  • Posts
  • MicDroid
  • Lame4Android
  • Tyrian
  • Resume
  • GitHub
  • Google Profile
  • Facebook
  • Twitter
    • Edit
    • Delete
    • Tags
    • Autopost

    Ubuntu on the MacBook Air 4,1

    Finally found the need to have a real laptop available, so I went out and picked up a MacBook Air over the Thanksgiving break. Since I’ve gotten so used to XMonad for day to day use, it would have to be running Ubuntu. Turns out that there is an Ubuntu community wiki page available detailing what is necessary to get things going.

    A script available on almostsure creates a bootable USB drive to install off of, and the almostsure post-install script takes care of installing most of the drivers and configuration you’d want. For reference, the important things (as of Nov 30, 2011) are the following:

    1. i915 module fix, without which kernel modesetting doesn’t work.
    2. bcm5974 module fix for the trackpad.
    3. btusb module for bluetooth, which for some reason doesn’t seem to be working with 11.10 out of the box.
    4. hid-apple module for keyboard, for what I assume is backlighting and function keys.
    5. xf86-input-mtrack Xorg input module, without which trackpad gestures (two finger scroll, etc) don’t seem to work correctly.
    6. dispad package for touchpad pausing, although I haven’t noticed it coming into use.
    7. macfanctld package for the fan control daemon, since the default 11.10 package doesn’t seem to do much out of the box.
    8. custom xmodmap to remap the Apple key to Alt, Alt/Option to Mod4, since my fingers expect that sort of layout.
    9. i915 power saving mode on boot, appending i915.i915_enable_rc6=1 to GRUB_CMDLINE_LINUX_DEFAULT.
    10. Avoid the long bootloader timeout by executing: sudo bless —device /dev/disk0s4 —setBoot —legacy from the OS X recovery USB drive.

    The one thing NOT covered by the Ubuntu community wiki is the wireless driver. The MacBook Air 4,1 has a Broadcom BCM43224 chip, which is actually covered by several different drivers, b43 (if you hack around a bit), brcmsmac, and the wl Broadcom STA driver (closed source). Poking around seems to suggest that the best option is the brcmsmac module, as it is based off the open-sourced driver that Broadcom released late 2010, however owing to it’s immaturity, it still lives in the staging drivers section of the Linux kernel. It also seems to lack some features supported by the Broadcom STA drivers, namely power management, which is the main reason why I chose to use the closed source (the horror) Broadcom STA drivers available from the Ubuntu “restricted” repository under the brcmwl-kernel-source package.

    The one item to note with this module is that the brcmwl-kernel-source package actually doesn’t have an updated blacklist file in /etc/modprobe.d, and will fail to blacklist the brcmsmac module available by default, potentially leading to problems. I had to add brcmsmac and bcma to the blacklist with the following:

    sudo sh -c "echo 'blacklist brcmsmac' >> /etc/modprobe.d/blacklist-b43.conf"
    sudo sh -c "echo 'blacklist bcma' >> /etc/modprobe.d/blacklist-b43.conf"

    This prevents the kernel from loading both drivers. Most of this information was found on the ArchLinux Broadcom wireless wiki page. And that concludes all the laptop configuration I had to do. All that remains is reconfiguring my XMonad settings for laptop use!

    Tags » BCM43224 Broadcom Linux MacBook Air 4-2 Macbook Ubuntu configuration wireless
    • 30 November 2011
    • Views
    • 0 Comments
    • Permalink
    • Tweet
  • Ethan Chen's Space




    • UCLA M.S. Computer Science

    • Android Developer

    • Freelance IT



    Archive

    2011 (10)
    November (1)
    October (2)
    September (2)
    May (3)
    March (1)
    January (1)
    2010 (31)
    December (3)
    November (2)
    October (4)
    September (3)
    August (6)
    July (10)
    June (3)
  • About Ethan Chen




    • UCLA M.S. Computer Science

    • Android Developer

    • Freelance IT



  • Subscribe via RSS
  • Sites I Like

    • Engadget
    • Hacker News
    • TechCrunch
    • Reddit
    • XDA-Developers
    • Cyanogen Android Tree

    Follow Me

      TwitterFacebook

Theme created for Posterous by Obox