Liberating Macbook Pro

December 29th, 2007 | Ubuntu, Linux, Apple by th

I’ve always wanted to install Ubuntu on my Mac. So I decided to give myself little christmas present and finally get it done. Here’s my experiences with running Linux on Intel Mac.

ubuntumbp.jpg

Ubuntu 7.10 64bit running on Core 2 duo Macbook Pro

Target machine is 2.16ghz Core2Duo Macbook Pro with Radeon X1600 and 1 GB of RAM. Anyone ever used ATI products with Linux may guess ATI’s crappy drivers were again worst headache. Other than small inconveniences with Compiz/OpenGl games and sleep mode not working, everything works like a charm. According to Ubuntu wiki sleep should work with custom kernel but I decided to skip it. Ubuntu boots pretty fast so it’s not that big deal especially with machine that’s most of the time just a portable workstation. Installation with all configuration trial & errors took about three hours.

Why, oh why?
Just because I can. Believe me, I heard question “Why on earth you want to run Linux on mbp?! Why don’t you just use OS X? It’s purrfect!” more than once. Yes, OS X is nice and I do like it, it’s hands down better than Microsoft’s operating systems and has some extremely nice unique features. I just happen to like Linux more for the tasks I do (No doubt Photoshop junkies disagree with me). OpenOffice runs way faster on Linux than NeoOffice runs on OS X. SSH/Sftp mounts are must for me (though MacFuse works decently nowadays!), Apache/PHP /MySQL and friends just work better, Java works better (try running Apache FOP with OS X, not only when running from terminal, it bounces Java icon in Dock, and doesn’t work at all when executed from PHP scripts. Maybe there’s some workaround. Maybe not). And GNOME with Compiz Fusion is just faster environment to work in (Finder sucks. It really does).

Preparing rEFIt
First step is preparing the bootloader: rEFIt. Installing rEFIt is easy.

Choosing distribution
My choice of Linux is Ubuntu. It’s by far the easiest and most stress-free Linux I’ve used. Predictable releases, guaranteed predictable support roadmap, commercial support available, apt-get, new software, what there’s not to like? Of course every distribution and operating system has its quirks and problems, so does Ubuntu. However, Ubuntu has also the best documentation available (Just my opinion) for workarounds and how-tos which makes it way more tolerable than others.

32bit or 64bit?
Core2Duo is 64bit dual-core processor so I decided to go for 64bit release of Ubuntu 7.10 (Gutsy Gibbon). First of all I’d like to clear some usual rumors about 64bit Linux in desktop usage. True, some software may not work with 64bit installation but most of it does. One common claim is that Flash does not work. This is false. And you don’t even need to install 32bit version of Firefox (you heard me right). There’s easy installation script for nspluginwrapper available too.

Installation and notes
Ubuntu wiki has an awesome guide for installing Ubuntu on Macbook Pro. If you’re going to install Ubuntu on Mac, that should be your bible. Installation itself is pretty straightforward but there’s couple important things to note while installing.

  • Create only one partition, no swap partition!
  • Remember to install grub on hd(0,2) instead of default hd(0) (Or 3 if you have Windows installed too). (Advanced- button on the last installation screen).

There’s multiple ways to get space for your Linux installation. I resized my OS X partition with live cd’s GParted tool (System > Administration > Partition Editor). Other than that, there’s nothing special about the installation.

Configuration
There’s a few things to fix after installation. Out of the box many things won’t work - the good news is that everything is pretty easy to fix. Ubuntu wiki guide has easy copy-paste solutions for wireless, touchpad and webcam so I won’t repeat them here. However I noticed one small problem with sound, I didn’t get any sound from internal speakers even I followed instructions from the wiki. To get the sound from internal speakers double click volume icon in top panel (open volume preferences), select switches tab and check the ‘Line In as Output’ checkbox.

3D acceleration and resolution work out of the box after enabling propietary ATI driver from the restricted drivers manager. There’s a few things to note though. I for one love Compiz and can’t anymore imagine using Linux without it. It’s not just for eyecandy, it’s for usability. Compiz doesn’t work with Gutsy’s default ATI drivers because lack of AIXGL support, but the easy workaround is to apt-get install xserver-xgl, Compiz works perfectly with XGL installed (brave ones can try to install newer ATI drivers. I ended up banging my head to the wall because 1440×900 resolution didn’t work anymore with new drivers. release notes mentioned 1680×1050 not to work but apparently there’s some other mystic resolutions too that won’t work).

There’s little annoying feature with XGL though - OpenArena and other OpenGL games won’t work. Or, they will but all textures are corrupted. As a workaround I created Enable/Disable XGL killswitch. Not really an elegant solution, but works for me (download: xgl-bubblegumtar.gz extract and make shortcut to command ‘gksu /path/to/xgl-switch’).

Touchpad can be pretty annoying by default. Ubuntu’s Macbook Pro wiki has fixed xorg.conf entry - however remember to modify Option “HorizTwoFingerScroll” “0″ because horizontal scrolling is really over-sensitive and annoying. Vertical scrolling works fine.

Software
Here’s quick list of software I mostly use and their OS X counterparts:

Firefox (Safari), Evolution (Mail), Nautilus (Finder), GEdit (Textmate), Gnome-terminal (Terminal), Gimp (Photoshop Elements), OpenOffice (NeoOffice), F-Spot (iPhoto), VLC Media Player (QuickTime), Pidgin (AdiumX), Rhythmbox (iTunes), gnome-calc (Calculator).

Yes, I also have iPod Nano (2nd gen). And yes, it works with Rhythmbox out of box. Also my digital camera worked out of box and F-Spot + Gimp are more than enough for me.

Also don’t forget to install ubuntu-restricted-extras package to get Java and codecs. Installing powertop package helps also optimizing the battery usage.

Compiz and search for the perfect desktop
I’m sure everyone loves eyecandy. Gnome with Compiz is very elegant. I run mostly default Compiz-setup with couple additions:

  • Expo-plugin (Virtual desktop switcher like Spaces) with hotcorner in left-top
  • Scale-plugin (Explose-clone) with hotcorner in right-bottom
  • Shift-plugin (alt-tab replacement, works with apple-tab) in ‘Cover’ mode

I use Slickness gtk+metacity themes and default Human icons from Ubuntu. Others may say it’s plain ugly, others may say it looks like Vista (I still haven’t seen Vista in real life even it’s been out for over a year. A successful year, huh?) but I like it. Here’s the screenshot galore (Fullscreen shot):

small1.jpg

My Gnome desktop

small2.jpg

Scale the expose-clone for Compiz in action

small3.jpg

Firefox the web-browser

small4.jpg

Expo, Spaces-alike virtual desktop switcher

cover.jpg

Shift-switcher in Cover mode (alt-tab replacement)

Conclusion
Ubuntu works nicely on Macbook Pro and it’s easily the best-looking laptop to run Linux out there. It needs some configuring and work to get running, but I’d say it’s worth it.


It’s not that hard to install Ubuntu on your notebook computer, whether it’s a Mac or a PC. While it may be easier to install it on desktop computers than on refurbished notebooks that may be more fickle, installing Linux on your computer is a great idea.

17 Responses to “Liberating Macbook Pro”

  1. manny |

    wow, not only does it look awesome, it’s great how you compare both mac and linux experience.

    mac OS is not so perfect as many would think, even if you do pay for it.

    as a photoshop substitute i use both gimp and “krita” (a kde program in the repos, thats even easier to use for photoshop migrators and has a few extra features gimps doesn’t)

    “sudo apt-get install krita”

    i was a windows junkie up to 6 months ago and now am using Ubuntu 100% (even deleted windows, which i thought would never happen…woohoo)

    i agree with you that a MBP looks really good and that theme is excellent (i use the included, but not default, tangerine icons thou)

    thanks for a great guide, my friend who also has a mbp will love this.

    next i’ll be installing ubuntu on a ps3 to use a second pc :D

  2. CJ |

    I must have that wallpaper!

  3. Juan Carlos |

    Hello I’ve been trying to install Ubuntu on my MB but I tried to make a partition with Bootcamp over OSX Tiger but Bootcamp right now does not work for this OSX version it looks like it stop working when Leopard arrive, is there other way to make a partition?, thanks for your attention, and for share your Linux expirience.

  4. th |

    CJ: You can get the wallpaper here: http://wasteland-bg.com/pics/WorldArt/fcfull15001fe.jpg

    Carlos:
    I don’t have bootcamp either (for the same reason - I have Tiger). I installer rEFIt first and used Ubuntu’s LiveCD and partitioning tool (System > Administration > Partition Editor) to resize OS X partition. I guess you can do that also with OS X’s DVD (See Ubuntu Wiki about Disk Utility).

  5. Liberating Macbook Pro « Detop’s Weblog |

    […] Liberating Macbook Pro Target machine is 2.16ghz Core2Duo Macbook Pro with Radeon X1600 and 1 GB of RAM. Anyone ever used ATI products with Linux may guess ATI’s crappy drivers were again worst headache. Other than small inconveniences with Compiz/OpenGl games and sleep mode not working, everything works like a charm. According to Ubuntu wiki sleep should work with custom kernel but I decided to skip it. http://kahvipapu.com/blog/2007/12/29/liberating-macbook-pro/ […]

  6. Juan Carlos |

    Thanks TH, I will try as you did, happy 2008.

  7. Mike |

    Everything looks great but why would you spend so much money for the Mac Hardware when you can get a PC laptop for 1/2 the cost? I love my Mac but wouldn’t run Linux on it. I use my Dell Laptops for that. :)

  8. th |

    Can you really?

    Could you point me to 1/2 priced Core2Duo laptop from Dell which is equally featured and as thin, quiet and good-looking as Macbook Pro, with backlighted keyboard, n-class wlan, builtin bluetooth, good gfx card and such? So far I haven’t managed to find such laptop.

    I know you can buy some market-Acers for 500$ but I wouldn’t accept that crap even for free.

    Sometimes you just get what you pay for (though Thinkpads are nice).

  9. Francesco |

    Ubuntu documentation and wiki are very good, but you can also find great documentation in the Gentoo wiki: http://gentoo-wiki.com/
    Its HowTo’s and its guides can be used for other distributions too, though they usually require a deeper knowledge of your GNU/Linux box

  10. kahvipapu | Is Apple Killing Linux on the Desktop? |

    […] is running an interesting article Is Apple Killing Linux on the Desktop? Well, sometimes Linux kills OS X Don’t forget to read the entertaining flamewar comments. Happy New […]

  11. kahvipapu | Apple updates Mac Pro (and Xserves) |

    […] Displays. Geforce 8800GT and Quadro FX 5600 are also available. Impressive specs indeed. Wonder how Linux would run on this… Is Apple Killing Linux on the […]

  12. Karthik |

    Hey TH

    I now have Leopard on my MBP (2.16 GHz model, the one before the santa rosa chipset). I have been trying to install Ubuntu on my MBP but till now, I have not managed even to partition the HDD. I choose a partition and after hitting Apply, Boot camp asks me to reboot etc. But I don’t see the partition once I boot up, although my HDD is 20GB less than 111.47 GB. I remember using the Beta version of Boot camp when using Tiger and I was able to partition and rEFIT used to show 2 harddrives with the respective partitions.

    Now, I used a command on the Ubuntu Wiki to partition via terminal and now though my HDD is 111GB total, I now see a Free space of 147GB!!! I rebooted twice and I still see the same.

    Can you please give me some details on how to partition using boot camp and / or what to choose while partitioning using the live Ubuntu CD?

    Thanks

  13. Alric |

    Hi

    How long did the resize via the partition editor take?

    Thanks

  14. th |

    @Alric: maybe 15 minutes or so? Not long anyway.

    @Karthik:

    I have no idea about bootcamp, never seen it, never used it. And can’t get it anyway since it’s Leopard-only.

    I simply used partitioning tool from livecd, System > Administration > Partition editor and resized the hfs+ partition smaller. For empty space I created a single ext3 partition. Nothing more.

  15. Karthik |

    Hi TH

    Thanks!

    I tried working on it again last night till 1 am :) and managed to install Ubuntu 7.10 on my MBP.

    Now getting the wireless and ATI drivers is getting touch. The Ubuntu Wiki did not fully help me solve the problem. Any tips or anything specific to keep in mind?

    Thanks!

  16. th |

    Ati drivers work fine after you enable them from System > Administration > Restricted drivers manager.

    Only thing to keep in mind Compiz does not work without xserver-xgl with these drivers and enabling XGL will cause opengl games to break.

    This will, however, be fixed with Hardy as it includes newer ati drivers.

    For wireless I followed Ubuntu’s Wiki. Works perfectly without encryption, sometimes problematic with encryption but usually works if you hit /etc/init.d/networking restart a few times.

  17. wordpress at oblios-cap » More on the UbuntuBook Pro |

    […] been relying on kahvipapu.com and help.ubuntu.com to get the job done. Some things are as easy as advertised. Others I […]

Leave a Reply

For spam detection purposes, please copy the number 1262 to the field below: