Archive

Posts Tagged ‘macbook’

Enable Apple iSight Camera : Ubuntu 8.10

November 3rd, 2008 26 comments

Have you been to a geek conference lately and noticed the overwhelming number of MacBooks and MacBook Pros in the audience?  When I presented at OSCON this last summer it was by far the most popular piece of hardware to be seen.  Now I don’t want to get into a conversation about Apple or OS X, but I do want to help all you MacBook owners running Ubuntu get your hardware working properly.  This post outlines how to retrieve and extract the required firmware in order to enable your Apple iSight camera on Ubuntu 8.10 “Intrepid Ibex”.

Get the firmware

There are a few ways to get the required firmware.  The first requires that you have an existing OS X installation.  If you’re doing a dual-boot installation you can find the firmware at the following path within your OS X partition:

/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport

You might also be able to find the firmware file at this link.. but for possible legal reasons (?) I wouldn’t know anything about that.

Extract the firmware

Once you have the required firmware you’ll need to extract it to your system.  If you’re running Ubuntu 8.10 “Intrepid Ibex” there is a package available that’ll do the extraction for you.  Use the following command to extract and install the firmware:

sudo aptitude install isight-firmware-tools
sudo cp ~/Desktop/AppleUSBSupportVideo /lib/firmware/
sudo ift-extract -a /lib/firmware/AppleUSBVideoSupport

This should create a file called “isight.fw".  Once you have this file you can safely remove the package and the AppleUSBVideoSupport file.  Keep the isight.fw file for future installations.  This will let you avoid the firmware extraction in the future.

note: if you are using Ubuntu 8.04 “Hardy Heron” you can use the isight-firmware-tools package from the intrepid repositories.

amd64 package

i386 package

Activate the camera

In order for the firmware to activate properly you will need to shut down your MacBook.  Rebooting will not suffice!  Enjoy.

Extended Display on the MacBook (with xorg.conf) : Ubuntu 8.04

April 28th, 2008 2 comments

I’ve blogged in the past about setting up extended display on the MacBook (second gen), but I thought I’d update the post for Ubuntu 8.04.  I notice there are some small differences, which are likely caused by the updates to Xorg.  I’ll post my steps and my xorg.conf file below.

Extended Display on the MacBook

First, I tried to use the new Screen Resolution tool but it did not detect either monitor properly.  It does detect the MacBook display when it is the only display, but when my external monitor is plugged in everything gets screwed up.

I had to do things by hand using xrandr, and I had to add three lines to my xorg.conf file.  There isn’t much to it, but not as straight-forward as it could be with the graphical tools.

  1. The first step is to figure out the sum of both resolutions.  ie; 1280×800 + 1440×900 = 2720 x 1700.  Take the resolutions from your MacBook (which should be 1280×800) and add it to the resolution of your external monitor.  Make note of the result.
  2. Update your xorg.conf file to include the new, combined, resolution (example below)
  3. Restart X (logout & login or ctrl-alt-bkspace)
  4. xrandr –output VGA –auto
  5. xrandr –output VGA –above LVDS

Here is a copy of my xorg.conf file.  It is default except for the three additional lines:


# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section “InputDevice”
Identifier    “Generic Keyboard”
Driver        “kbd”
Option        “XkbRules”    “xorg”
Option        “XkbModel”    “pc105″
Option        “XkbLayout”    “us”
Option        “XkbOptions”    “lv3:ralt_switch”
EndSection

Section “InputDevice”
Identifier    “Configured Mouse”
Driver        “mouse”
Option        “CorePointer”
EndSection

Section “InputDevice”
Identifier    “Synaptics Touchpad”
Driver        “synaptics”
Option        “SendCoreEvents”    “true”
Option        “Device”        “/dev/psaux”
Option        “Protocol”        “auto-dev”
Option        “HorizEdgeScroll”    “0″
EndSection

Section “Device”
Identifier    “Configured Video Device”
EndSection

Section “Monitor”
Identifier    “Configured Monitor”
EndSection

Section “Screen”
Identifier    “Default Screen”
Monitor        “Configured Monitor”
Device        “Configured Video Device”

# added SubSection “Display” until EndSubSection
SubSection “Display”
Virtual 2720 1700
EndSubSection

EndSection

Section “ServerLayout”
Identifier    “Default Layout”
Screen        “Default Screen”
InputDevice    “Synaptics Touchpad”
EndSection

Categories: macbook Tags: , , ,

Microphone Support on the MacBook (Skype 2 Supported)

December 30th, 2007 2 comments

So I posted recently on how to get the camera working in Skype 2 Beta on the MacBook. One of the most common questions after that post was “But how do I get the microphone to work!?” So, I started toggling switches and trying stuff out until I could reproduce working microphone input. I did have this working in the past and I guess I must have lost the settings so I had to find them again…

Microphone on the Macbook

To get started right-click on the volume applet up near the clock and select the “Open Volume Control” option. This should open the volume control mixer application. What you’ll want to do within this application is select “Edit > Preferences”, which will present you with a long checklist of potential hardware items. The only items I have checked here are:

  • PCM
  • Input Source
  • Mux

PCM should be your main volume for audio output for best control. You can set that from the “Preferences” menu of the volume applet.

Input Source allows you to select the source of the microphone. Mic, Front Mic or Line.

Mux is the device/option I’m using for the Microphone input.

I have the “Playback” tab, on PCM, set to full and use the hardware keys to control volume. “Recording” tab, on Mux, is set to 1/3 volume. I find that I get too much static and noise set too far above that. “Options” is then set to Mic as the input.

Calls in Skype now sound great incoming and outgoing and the video works really well. I hope these similar settings work for everyone else. If you need to use alternate settings please leave a comment.

UPDATE: these instructions have been added to the Ubuntu community wiki as well. Ubuntu on the Macbook.

Categories: macbook Tags: , ,

Enabling the Motion Sensor on the Macbook for Physical Neverball!

October 31st, 2007 13 comments

How many of you have played Neverball raise your hands? If you actually raised your hand you get a cookie. If you haven’t played Neverball and you have a Macbook you’re going to start playing because this tutorial makes it *so* much more fun! We can make use of the motion sensors built into the Macbook hardware to allow us to play physical neverball.

Activating the driver

We’ll need to load the proper module into the kernel for this to work. We can do that using this command:

sudo modprobe applesmc

If you want this module to automagically load at boot time you can also use this command:

echo applesmc | sudo tee -a /etc/modules

Launching Neverball

You’ll now want to pick up a copy of the game Neverball which is available in the repositories.

sudo aptitude install neverball

Now launch the game (you’ll find it in your Games menu, or via the command neverball). Select “Play”, select your difficulty level and start the game. Now, here’s the best part, pick up your Macbook to play. Trust me, pick up the macbook and tilt the actual laptop to control tilting the floor within the game. Now that’s playing games with your laptop!

For the rest of you that want to play but don’t have the motion sensors you can just use your boring old mouse to play. Enjoy!

Categories: macbook Tags: ,

Make Ubuntu The Default Boot on a MacBook (rEFIt) Dual-Boot System

Today has been a personal bug-squashing day for little things related to my MacBook. I am teaching a class this week that calls for quite a bit of lab time from the students so I took the time to look into some of the bugs. The first on the list was activating the keyboard lighting on the macbook, which was simple enough. The second, and basis for this quick tutorial, is setting Ubuntu to be the primary boot within the rEFIt boot loader.

To update your boot loader so that Ubuntu will boot first you’ll need to boot into OS X to edit a config file. (note: I did not try any method of mounting the OS X partition to make the changes, is that possible?).

UPDATE: after typing the above I actually took the time to *try* and it’s already default mounted on my machine. Nothing special there. …what you find when you actually take the time to look huh :) .  It is mounted read-only however.

Once booted into OS X you’ll want to edit the file “/efi/refit/refit.conf” and update a line near the bottom of the file from:

#legacyfirst

to

legacyfirst

(yes, just uncommenting that line)

At this point the rEFIt boot loader will boot Ubuntu as your primary and OS X as your secondary. I notice the rEFIt config file is oddly similar to a grub.conf. I also update the timeout from 20 to 5. Who wants to wait 20 seconds for it to make a choice? Enjoy.

Categories: macbook Tags: ,