r8 - 15 May 2009 - 03:56:05 - PorchLightYou are here: TWiki >  Main Web > MacBookAndUbuntu

MacBookAndUbuntu

MacBook for Ubuntu

I tend to destroy laptops in under 2 years. Not from abuse, just from pure use. They live with me 24/7 and all the use tends to wear them out. Mostly the power plug and screen hinge. Having tried every other brand, I figured it was time to give Apple a shot. You can get a refurbished MacBook from Apple for over 30% off. The only thing different is the shipping box, and a few finger prints. Because I was tried of carrying around a 17" WS Dell, I opted for the 13" MacBook.

Specs

  • Intel Core 2 Dual
  • 2GB Memory (only said it would come with 1GB, but when the package arrived, I had 2GB)
  • 120GB HDD
  • Superdrive
  • Atheros Communications, Inc. AR5418 802.11a/b/g/n Wireless PCI Express Adapter
  • Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller
  • FireWire (IEEE 1394): Agere Systems FW323
  • Optical audio out
  • BLACK

Now I don't really care about the Apple OSX. It's a nice OS, but for a power user, I want Ubuntu.

Hardware pros

  • Magnetic power plug This is the primary factor in buying a MacBook? . I love this thing
  • Screen quality
  • Screen hinge. It looks better then all the other brands. Time will tell
  • Battery life
  • Mag lock screen lid
  • Good keyboard feel
  • Charge indicator on battery
  • Construction
  • Charge indicator lite on the power plug.
  • Long power cord. It has the option to plug the brick directly into the wall, or attach a 6 foot power cord. Very nice.
  • Large touch pad.
  • Built in Bluetooth and a/b/g/n wireless.

Hardware cons

  • No right click. Come on Jobs, give us a right click button.
  • No Insert key. For a programmer, this can be a pain.
  • Page up/ Page down are on the arrow keys and so require the use of the function key.
  • Sharp edges. The edges around the keyboard and screen are not grounded. I know this is done to make the gap look smaller when closed, but it's sharp.
  • Built in Superdrive is noisy when inserting or removing a disk. Lots of motor noises, clicks and pops. Forget changing a CD in a quiet room and nobody knowing about it.
  • Only 3 LEDs. Numlock, Capslock, and a white status one on the front that shows turns on when the lid is closed or it's in suspend mode. In a day where some laptops come with LCD panels showing everything, a HDD activity light would be nice.
  • White power cord. Why when I order a black MacBook? , why do I get a white power cord?
  • Keyboard and touchpad is USB 1.1 internally connected.

64bit Ubuntu 7.10 on a MacBook

Ok, so I was asking for extra pain here. My MacBook has a max of 2GB of memory, and by most benchmarks, a 64bit Linux does not have a great speed advantage over a 32bit unless you are pushing 4GB of ram or more. And you add all kinds of compatibility issues. But I went for it anyway. So far, it's not been half bad. Most of the problems encountered can be fixed. A great guide is located here. https://help.ubuntu.com/community/MacBook

64bit Ubuntu 9.04 on a MacBook

So far I have upgraded from Ubuntu 7.10 to 8.04 to 9.04 using the updater tool with very little problems. Most of the stuff below has been fixed under Ubuntu 9.04 or the tricks still work.

Installing 32bit libraries

Install ia32-libs using the package manager. This will allow most 32bit programs to run.

Opera 64bit

A 64bit version does exist. It's located here and I have attached it to this wiki page. Not that you have no hope in getting 32bit Flash to work in this. * opera_9.50-20071024.2-shared-qt_amd64.deb: Opera 9.50 Beta native 64 bit for Ubuntu 7.10

Flash and Firefox on 64bit

(Adobe has released a 64bit flash now, so this is deprecated.) 64bit and 32bit applications don't like to talk to each other. Flash is only released in 32bit form will not talk to 64bit Firefox. The solution is to run a 32bit version of Firefox. (steps here)
  1. Go to http://www.mozilla.com and get the latest i686 build in a tar.gz form.
  2. Extract under /home/user/firefox32 and create a icon on the desktop to start it. Test to make sure it works. Both the existing installed 64bit version and 32bit version will use the same profile. The only way to tell the difference is look under Help -> About for i686.
  3. Grab the latest version of Flash. Look for the tar.gz.
  4. Don't bother installing it, just extract out the libflashplayer.so file and copy it to the Firefox plugins directory.
  5. That's it. Flash should be working in the 32bit Firefox.

Java and Firefox

This page covers installing 32bit Java for 32bit Firefox. https://help.ubuntu.com/community/AMD64/FirefoxAndPlugins?action=show&redirect=FirefoxAMD64FlashJava

Audio distortion only in left channel

I found the fix here. http://ubuntuforums.org/showthread.php?t=611345

Ubuntu 9.04.

I found this fix to be much better. From here. https://help.ubuntu.com/community/MacBook2-1/Hardy#Sound

If you have static, distortion or noise only on the left output (speakers and headphones), reloading the snd-hda-intel module on startup should fix it. This has to be done in a really early stage of boot - before any other audio-related daemons/tasks are started. A possible solution is to add a startscript to init.d:

echo -e '#!/bin/bash\nrmmod snd-hda-intel\nmodprobe snd-hda-intel' | sudo tee  /etc/init.d/soundrestart
sudo chmod +x /etc/init.d/soundrestart
sudo update-rc.d soundrestart start 10 2 3 4 5 .

Disable tap to click on the touchpad.

I am always taping on the touchpad by mistake and causing lots problems with typing. I perfer the tactical feedback of a click button anyway.
  • Add Option "MaxTapTime" "0" to the xorg.conf under the touchpad settings. This will disable the touchpad tap full time.
  • Add /usr/bin/syndaemon -t -d to the System -> Preferences -> Sessions -> Startup programs. This will disable the tap to click for 2 seconds after typing. Note that you have to have Option "SHMConfig" "on" in your xorg.conf file for it to work. The syndaemon also uses a bit of CPU time, so it's not a good choice if you are working to get long runtime on the battery.

Power Savings

The built in power management under Ubuntu are weak at best. I made a script that saves more power then the normal setup. It puts the processors into lower power saving mode, adds a larger cache to the HDD, does some file system tweaks, and sets it to go into sleep mode. It also disables Bluetooth. Tweak to fit your needs. This script will give me a good 20minutes longer run time then the normal Ubuntu install. All changes will be lost on reboot, so I only run it by hand when I need it. Needs to run as root. laptopmode.sh: laptopmode.sh

BlueTooth not working after suspend

The Bluetooth will not work after a suspend. The below file fixes it. Put the above script into /etc/acpi/resume.d and chmod it 755. http://ubuntuforums.org/showthread.php?t=544321

Adding a BlueTooth mouse

41WEFHWJTZL._SS75_.jpg (This works out of box with Ubuntu 9.04. Just use the Bluetooth pref) I came across a Kensington 72414 PilotMouse at Frys. It's just a simple small size mouse, but it takes two normal AA batteries. It's a bit heavy with the two AA batteries, but handles well. Getting it working under Ubuntu 7.10 was not hard. See https://help.ubuntu.com/community/BluetoothMouse

  1. Edit the file /etc/default/bluetooth: sudo sensible-editor /etc/default/bluetooth
  2. Set the variable HIDD_ENABLED=1.
  3. Restart the bluetooth service with the command: sudo /etc/init.d/bluetooth restart
  4. Push the little connect button on the bottom of the mouse. (You turned it on first right?)
  5. Right click on the bluetooth icon in the task bar and select Browse Devices
  6. After a bit, the mouse should show. Click Connect.
  7. At this point I get an obex error, but the mouse starts working, so I ignore it.
  8. Go into bluetooth preferences and add trust to the new mouse. Now it will connect at start up.

Overall it works well for me. The mouse works on every surface I have tried it on and has good range. The rubber grips feel nice. I would rather have a full size mouse, but this works fine.

Remap an insert key

If I didn't like Midnight Commander so much, an insert key would not be a big issue. However, mc is my fileman of choice, so I need an insert key. Adding xmodmap -e "keycode 116 = Insert" to the .xinitrc file in the home directory remaps the right Apple key into an Insert key. http://sluglug.ucsc.edu/pipermail/sluglug/2001-March/016706.html

External Display

The xrandr seems like the preferred tool for adjusting the VGA/DVI/Video outputs. To date, I have only tested this with the VGA as that is the only cable I have. http://www.thinkwiki.org/wiki/Xorg_RandR_1.2

Mirror the notebook display on an extra VGA display. Picking the highest resolution the external display can support.

  • xrandr --output LVDS --auto --output VGA --auto --same-as LVDS --verbose
Same as above but 1024x768 on the external display.
  • xrandr --output LVDS --auto --output VGA --mode 1024x768 --same-as LVDS --verbose
Turn VGA off
  • xrandr --output VGA --off

If you get an xrandr: cannot find crtc for output VGA, then try turning off the external DVI display with the command xrandr --output TMDS-1 --off. I found that is sometimes gets turned on by something. Only one external device can be on at a time.

Extra Packages needed to compile MPlayer on amd64 Ubuntu 7.10

  • libXxf86vm-dev
  • libxv-dev

-- PorchLight - 13 Dec 2007

Topic attachments
I Attachment Action Size Date Who Comment
jpgjpg 41WEFHWJTZL._SS75_.jpg manage 2.2 K 11 Jan 2008 - 09:22 PorchLight  
shsh 99-rescue-bluetooth.sh manage 0.1 K 18 Dec 2007 - 23:20 PorchLight Fix bluetooth after suspend
shsh laptopmode.sh manage 1.6 K 13 Dec 2007 - 22:45 PorchLight  
elsedeb opera_9.50-20071024.2-shared-qt_amd64.deb manage 6304.7 K 13 Dec 2007 - 21:50 PorchLight Opera 9.50 Beta native 64 bit for Ubuntu 7.10
Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r8 < r7 < r6 < r5 < r4 | More topic actions

tip TWiki Tip of the Day
Keyword search
Interactive search is a keyword search by default. For example, to search for all topics that contain ... Read on Read more

 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback