Karmic Koala on a MacBook

Yesterday I installed a beta of Ubuntu 9.10 (Karmic Koala), which is scheduled for release in 9 days, on my MacBook (2,1). I know, it’s only 9 days, but I couldn’t wait — the feature list was too delicious. Actually, I only intended this to be a small “OMG it’s so great!”-post, but it turned out a howto on running Ubuntu 9.10 (Karmic Koala) on a MacBook 2,1.

Please note that any or all of these minor problems—maybe with the exception of the everlasting iSight issue—may be fixed in the final version.

First Impressions

First of all, someone has been working wonders on the Intel 945GM video driver, and I’m not talking small, lame wonders like the pyramids or something, I’m talking OMFGWTFBBQ!?!11-sized wonders!

Using wildly unscientific and unreliable readings from glxgears:

– 8.10 (Intrepid Ibex): ~1100 fps
– 9.04 (Jaunty Jackalope): ~900 fps (and I’m being generous here)
– 9.10 (Karmic Koala): ~3200 fps!

Yes, you heard (or read) me right — I’ve got 3x more frames per second than I did in 8.10. I bet your puny pyramids are looking pretty silly now, huh? It could of course be because someone just introduced a bug in the glxgears code and I’m only actually getting 4 frames per year, but graphics feel smoother and I think I could almost run a 3D accelerated game on it.

Apart from the hotness that is the new Intel video driver, there are loads of other improvements over previous releases. Boot time has improved significantly, and the same goes for login time, which is really nice. GDM (the login window) has been completely rewritten, which results in a smoother and nicer login experience. (Yeah, I know it sounds lame to be talking about “login experience”, but go ahead, try it! If you’ve ever tried login in to a Gnome desktop before, you’ll see what I mean.) This rewrite also means that I can now suspend my laptop while being logged out, which is really, really nice — and about time.

The classic brown/orange Ubuntu look has gotten even browner (i.e. darker) and it actually looks so good that I’m sticking to the default theme with one of the bundled backgrounds for now. The default icon set has been given an overhaul for the better and behind the scenes we’ve got Ext4 as the default file system, Grub 2 as the new boot-loader, DeviceKit replacing HAL and other nice things.

Setting Up

Almost everything worked out of the box with some minor exceptions though. So far I haven’t run into any problems relating to wifi, suspend/resume/hibernate, graphics/video, bluetooth or any of the things that usually makes installing any OS on a Mac a living hell.

What needs tampering with is mainly the keyboard layout and maybe the sound. If you want to use the built-in iSight, you probably got a little work ahead of you, but otherwise fixing these minor issues will take you maybe 5–10 minutes.

Touchpad Behaviour

This “problem” is so ridiculously tiny, that I’m not even sure why I’m including it, but since I’m installing on a MacBook, I want the touchpad to behave like it does in OS X, and it pretty much does. I only had to open the mouse preferences (System > Preferences > Mouse) and tell it to enable two-finger scrolling and that was that. Right click is—if you’ve disabled tapping the touchpad for clicking—two fingers + click and middle click is 3 fingers + click. If you’re using tapping for clicking, I’m guessing 2 finger tap is right click and 3 finger tap is middle click, but I don’t know, I haven’t tried it.

Keyboard Setup

The keyboard, however, is quite another story, because this koala doesn’t use xmodmap, which us Mac-users previously used to assign Alt Gr-functionality to the key of our choice. After selecting the appropriate keyboard layout (Apple / MacBook/MacBookPro (intl.)) I wasn’t able to write @, $, {, [, ], }, ~ or |, or any other key that required me to press Alt Gr. Fortunately I could for unknown reasons write those characters in my Gnome Terminal (but not anywhere else) and copy/paste from there, but that is no fun in the long run and it certainly proves problematic when you try to log in with a password containing any of those characters.

However, after a little googling I quickly found that commenting out the following 2 lines in /usr/share/X11/xkb/symbols/pc along with a minor adjustment in System > Preferences > Keyboard did the job.

Make sure these two lines in /usr/share/X11/xkb/symbols/pc looks like this (i.e. add “//” at the beginning of the lines):

//    modifier_map Mod4   { <LWIN> };
...
//    modifier_map Mod4   { <RWIN> };

If you don’t know how to edit that particular file, hit Alt-F2 (or Alt-Fn-F2 if you haven’t switched Fn-mode) to bring up the “Run Application” dialog and type:

gksudo gedit /usr/share/X11/xkb/symbols/pc

When you’re done editing the file and your changes are saved, go to System > Preferences > Keyboard, select the Layouts tab and click Layout Options. Expand “Key to choose 3rd level” and put a check mark next to the key you want to be your Alt Gr. Personally I’m using “Right Win” (i.e. the Cmd/Apple key to the right of the space bar), but another option is to use that retarded Enter key between aforementioned Apple key and left arrow (check “Enter on keypad” for that).

Function Keys

The Mute/Volume keys (on F3, F4 and F5) and the eject key works out of the box, but the brightness keys (on F1 and F2) needs a little attention — nothing big, just install the package pommed and that’s it.

If you—like me—don’t like the default Fn-key behaviour, where you have to hold Fn to actually press F1-F12 — i.e. Alt-Fn-F2 to bring up the “Run Application” dialog, then there’s an easy fix on the Ubuntu Wiki: AppleKeyboard.

No Sound in Your Headphones?

I had a weird issue with sound working fine with the internal speakers, but once I connected my headphones or stereo to the output jack, I got nothing. At first I thought I was going to have to recompile a bunch of kernel modules, find a virgin to sacrifice and perhaps give away my first-born, but it turned out to be simpler than that. I installed the package gnome-alsamixer and unmuted all channels and everything was fine. Maybe the devs could make sure that all channels are unmuted on install?

Webcam/iSight

The built-in iSight takes a lot of work to get running, and I never ever use the damn thing, so I don’t really care. Of course, it’d be nice if it did work, but Apple is mostly at fault here, because they’re so bitchy about releasing specs and firmware. Back in the olden days you’d have to extract the firmware from your OS X install, which could be done with the package isight-firmware-tools — I imagine that’s still the case. If you try, test it with the package cheese, which is basically a PhotoBooth clone, and let me know how it turns out.

Th-th-th-that’s all, folks! Really! Apart from the iSight (which I couldn’t care less about), everything’s working better than ever and the koala is fast becoming my favorite pet in the zoo that is Ubuntu Linux.

About Anders K. Madsen

Creator and administrator of Lillesvin Networks. Bachelor of Linguistics and Cognitive Semiotics at the University of Aarhus, web developer, Ruby programmer, author of phpCF and amateur musician. Catch me on mail: madsen@lillesvin.net, Twitter: @lillesvin, or Google Talk: lillesvin@gmail.com, if you want to get in touch.
This entry was posted in Computers, Linux, Software. Bookmark the permalink.

13 Responses to Karmic Koala on a MacBook

  1. Rasmus Bjerngaard says:

    Here’s some hints on iSight: http://ubuntuforums.org/showthread.php?t=1281550

    Thanks for the howto!

  2. No problem! And thanks a lot for the iSight hints – works like a charm now. (I had to try it out even though I have absolutely no use of it.)

  3. Steffen says:

    Nice guide. Thanks, Madsen!

  4. No problemo, homie! Btw, did you get the package I sent you? :)

  5. Pingback: Tech Life of Recht » Blog Archive » Karmic Koala

  6. bbc says:

    thank you for this post, save my time on two issues.

  7. melon says:

    OMG, you are Genius – how do you do that? I’ve been trying to fix keyboard layout for few hours!
    Thank to you I have made my keyboard layout work again! THANK YOU!

  8. melon says:

    Two more things:

    Gnome alsa mixer: deselecting ‘mute’ checkbox under ‘speaker’ fixes not only headphones (muted by default) but also unmute central speaker. Sound from Mac’s speakers is louder and “rich”.

    Pommed works indeed! :)

  9. No problem, melon. :) I actually found the fix somewhere on the Ubuntu forums, but I couldn’t easilly find it again, otherwise I would of course have referenced it, but that’s where the credit should really go. :)

    And yeah, I noticed the better sound from the internal speakers too. Probably a combination of weird hardware layout and PulseAudio creating this odd default configuration.

  10. Anil says:

    I’ve had a problem installing ubuntu 9.10 x86 or AMD64 on my macbook 2.1.

    Every time I press a key the touchpad (not an external mouse) stops. Did this happen you?

    Regards

  11. Anil says:

    Just solved, there’s an option on the touchpad tab at the mouse section which disables the touchpad when writing!

  12. Felipe says:

    Hey Anders

    I stumble with your post, and I have the next question. Have you notice a big difference between using xpdf or acrobat and Preview?

    I know in Karmic graphics have improved, but still xpdf looks very pixelated. I don’t know if you know how to fix that… ?

    cheers
    Felipe

  13. I’ve never really used Xpdf, but Evince (the default Gnome PDF viewer) seems to do the job without pixelating everything. Acrobat is also available for Linux somewhere on Adobe’s website. If you’ve got any particular reason for sticking to Xpdf, then I don’t think there’s much you can do. Sorry.

    A Preview.app for Linux would of course be nice, but I think Evince comes closest, while still lacking certain features (like annotation).

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>