MacBookPro
Ubuntu Gutsy on MacBook Pro
Preface
For the Gutsy 7.10 release, Everything here also applys to MacBook Pro generation 1(CoreDuo) & 2(Core2Duo), and MacBook.
If you have a MacBook Pro generation 3(SantaRosa) also check the wiki page https://wiki.ubuntu.com/MacBookPro/SantaRosa
For more information :
http://www.mactel-linux.org/wiki/Main_Page http://modular.math.washington.edu/macbook/ BR Thanks to Ubuntu forum members for their feedback and the people providing drivers for Linux on Macbook especially Nicolas Boichat, Ronald S. Bultje, Jan Bernhardt, Ludovic Rousseau ... BR
Mac OS X Installation
- Install Mac OS X pro with a minimum of features. It may be useful for firmware update or hardware check ..
- Boot on Mac OS X DVD holding Alt key
- Follow installation instruction.
Boot Menu installation
- 1.Boot on Mac OS X
2.Install/Run BootCamp 3.Install rEFIt (http://refit.sf.net)
Note: the following manual steps are not necessary with the latest version of rEFIt. Simply running the rEFIt.mpkg will take care of the details automatically.
- install mac image
copy efi to root directory (drag efi folder to MacOs disk)
- open a mac os terminal (in utilities)
- cd /efi/refit
- ./enable-always.sh
Partitioning
Note: I've also managed to do this automatically by using DiskUtil from Mac OS X DVD, but if you do this, leave the partitions partitioned but unformated except for Mac OS X partition, because Bootcamp installation requires single Mac partition!; and you also going to have to reboot after installation on to Ubuntu Live CD again and update grub mannualy.
- In a Mac os X terminal, partition the disc :
sudo diskutil resizeVolume disk0s2 49G
That sets 49G for MacOsX and the rest for Linux
- For triple boot:
sudo diskutil resizeVolume disk0s2 49G Linux Linux 35G "MS-DOS FAT32" Windows 63G
Install Windows Vista
- Boot, in refit, choose the Windows DVD. Launch Install, format Bootcamp partition with NTFS file system and procede with the installer, at reboot choose the Windows Hard Disk. Install drivers from Apple Mac OS X 10.5 DVD
Install Linux Ubuntu
- Boot on Ubuntu Live CD
- Click install on disk in Ubuntu
- Choose a manual partition : Select Linux Partition and check out the format box option (as ext3 filesystem)
- Do not erase or format anything else!!!
- Define mount :
- If possible, do not mount /mount/EFI (select white item in list)
- Mount Linux partition as: /
- Click on Advanced Options on the Install screen and modify Grub to install on (hd0,2)
Video
Install ATI's Catalyst official drivers 8.42.3 with AIGLX working!! ( thanks to the poster of this forum =) : http://ubuntuforums.org/showthread.php?t=591066 ) Note: If you follow everything exactly you will succeed!, I didnt and only got it working on the 5th attempt :P
Here's my xorg.conf (it works with all settings, single, clone, and big desktop to extended monitor!!!) :
Note: use ATI Catalyst Control Center > Applications > Accessories > to change any of this mods(clone,single,big desktop) or to change screen resolution or to disable/enable monitors.
Code:
# xorg.conf (xorg 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 "ServerLayout" # Uncomment if you have a wacom tablet # InputDevice "stylus" "SendCoreEvents" # InputDevice "cursor" "SendCoreEvents" # InputDevice "eraser" "SendCoreEvents" Identifier "Default Layout" Screen 0 "aticonfig-Screen[0]" 0 0 InputDevice "Generic Keyboard" InputDevice "Configured Mouse" InputDevice "Synaptics Touchpad" EndSection Section "Files" FontPath "/usr/share/fonts/X11/misc" FontPath "/usr/share/fonts/X11/cyrillic" FontPath "/usr/share/fonts/X11/100dpi/:unscaled" FontPath "/usr/share/fonts/X11/75dpi/:unscaled" FontPath "/usr/share/fonts/X11/Type1" FontPath "/usr/share/fonts/X11/100dpi" FontPath "/usr/share/fonts/X11/75dpi" FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" EndSection Section "Module" Load "bitmap" Load "dbe" Load "ddc" Load "dri" Load "extmod" Load "freetype" Load "glx" Load "int10" Load "type1" Load "vbe" Load "v4l" EndSection Section "InputDevice" Identifier "Generic Keyboard" Driver "kbd" Option "CoreKeyboard" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "pt" Option "XkbVariant" "mac" EndSection Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ImPS/2" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "true" EndSection Section "InputDevice" Identifier "Synaptics Touchpad" Driver "synaptics" Option "SendCoreEvents" "true" Option "Device" "/dev/psaux" Option "Protocol" "auto-dev" Option "LeftEdge" "150" Option "RightEdge" "1070" Option "TopEdge" "100" Option "BottomEdge" "310" Option "FingerLow" "25" Option "FingerHigh" "30" Option "MaxTapTime" "180" Option "MaxTapMove" "220" Option "MaxDoubleTapTime" "180" Option "HorizEdgeScroll" "0" Option "VertEdgeScroll" "0" Option "TapButton1" "0" Option "TapButton2" "0" Option "TapButton3" "0" Option "LockedDrags" "off" Option "VertScrollDelta" "20" Option "HorizScrollDelta" "50" Option "VertTwoFingerScroll" "1" Option "HorizTwoFingerScroll" "1" Option "MinSpeed" "1.10" Option "MaxSpeed" "1.30" Option "AccelFactor" "0.08" Option "Emulate3Buttons" "true" Option "SHMConfig" "on" # corner buttons Option "RTCornerButton" "0" Option "RBCornerButton" "2" Option "LTCornerButton" "0" Option "LBCornerButton" "3" EndSection Section "InputDevice" Identifier "stylus" Driver "wacom" Option "Device" "/dev/input/wacom" Option "Type" "stylus" Option "ForceDevice" "ISDV4" # Tablet PC ONLY EndSection Section "InputDevice" Identifier "eraser" Driver "wacom" Option "Device" "/dev/input/wacom" Option "Type" "eraser" Option "ForceDevice" "ISDV4" # Tablet PC ONLY EndSection Section "InputDevice" Identifier "cursor" Driver "wacom" Option "Device" "/dev/input/wacom" Option "Type" "cursor" Option "ForceDevice" "ISDV4" # Tablet PC ONLY EndSection Section "Monitor" Identifier "aticonfig-Monitor[0]" Option "VendorName" "ATI Proprietary Driver" Option "ModelName" "Generic Autodetecting Monitor" Option "DPMS" "true" EndSection Section "Device" Identifier "aticonfig-Device[0]" BusID "PCI:1:0:0" Driver "fglrx" Option "VideoOverlay" "on" Option "OpenGLOverlay" "off" Option "AIGLX" "true" Option "DRI" "true" Option "XAANoOffscreenPixmaps" "true" Option "LinearAlloc" "6144" Option "CacheLines" "1080" Option "TexturedVideo" "on" EndSection Section "Screen" Identifier "aticonfig-Screen[0]" Device "aticonfig-Device[0]" Monitor "aticonfig-Monitor[0]" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 Modes "" EndSubSection EndSection Section "DRI" Mode 0666 EndSection Section "Extensions" Option "Composite" "true" EndSection
Audio
1. Add the following line to /etc/modprobe.d/alsa-base:
install snd-hda-intel position_fix=1 /sbin/modprobe --ignore-install snd-hda-intel $CMDLINE_OPTS && /lib/alsa/modprobe-post-install snd-hda-intel
2. Increase the volume (both using the key combination and the system tray applet) to its maximum possible value.
3. Right-click on the volume applet and choose Preferences. Select "PCM" as the device to control.
4. Open the Sound preferences (System-Preferences-Sound in GNOME). Select "PCM" as the device to control. BR
Wireless
To install:
sudo aptitude install build-essential wget http://snapshots.madwifi.org/madwifi-trunk-current.tar.gz tar -zxvf madwifi<tab> cd madwifi<tab> make sudo make install
If you want you can alternatively get the sources by SVN
svn checkout http://svn.madwifi.org/madwifi/trunk madwifi)
At this point the driver should work and wifi will be enabled after reboot.
Alternatively you can use these commands to insert the driver into the running kernel:
sudo modprobe ath_pci sudo modprobe wlan_scan_sta
Suspend
Suspend is broken in Ubuntu 7.10 on many first-generation MacBooks as well as some later-generation MacBooks and MacBook Pros [WWW] #151016. In particular, these machines will go into suspend, but will not come out of suspend. This is because the kernel supplied with 7.10 has some issues which prevent this from working. To fix this you will have to download an older version of the Linux kernel that is known to work. The latest known version to work is 2.6.22-12, which you can download by installing the packages at the locations pointed to below. Be sure to install them in the order as they appear here.
[WWW] https://launchpad.net/ubuntu/gutsy/i386/linux-image-2.6.22-12-generic/2.6.22-12.39 [WWW] https://launchpad.net/ubuntu/gutsy/i386/linux-headers-2.6.22-12/2.6.22-12.39 [WWW] https://launchpad.net/ubuntu/gutsy/i386/linux-headers-2.6.22-12-generic/2.6.22-12.39 [WWW] https://launchpad.net/ubuntu/gutsy/i386/linux-ubuntu-modules-2.6.22-12-generic/2.6.22-12.32 [WWW] https://launchpad.net/ubuntu/gutsy/i386/linux-restricted-modules-2.6.22-12-generic/2.6.22.4-12.3
After installing, edit /boot/grub/menu.lst and change the default=0 line to default=2 (if the newly-installed kernel is the third listed in the menu.lst file, which it should be when installed on a stock Gutsy install).
Restart your MacBook for the update to take effect. You will have to reinstall any wireless drivers you may have installed in the past. BR
Temperatures & Fan Speed
Hard Disk Temperature
sudo apt-get install hddtemp sudo hddtemp /dev/sda
That prints the temperature of your harddisk
CPUs Temperature
sudo modprobe applesmc sensors
That prints temperatures of both CPUs
Fan Speed Control
sudo modprobe applesmc echo applesmc | sudo tee -a /etc/modules
and
then add the following line to /etc/rc.local :
echo 1 > /sys/devices/platform/applesmc.768/fan1_manual echo 3000 > /sys/devices/platform/applesmc.768/fan1_output echo 1 > /sys/devices/platform/applesmc.768/fan2_manual echo 3000 > /sys/devices/platform/applesmc.768/fan2_output
CPU Settings
I've only tested this on MacBook Pro generation 2(Core2Duo), so contribute here please! =)
I've noticed that if cpu frequency governator settings are set to "ondemand" both CPUs are running 20ÂșC cooler
so add this to /etc/rc.local :
modprobe acpi_cpufreq modprobe cpufreq_ondemand modprobe applesmc modprobe i2c-i801 modprobe eeprom modprobe coretemp sensors -s cpufreq-set -c 0 -g ondemand cpufreq-set -c 1 -g ondemand
iSight
It only works with ekiga: BR * Install prerequisites and launch Ekiga (Ekiga may also be launched through the menus) BR
sudo apt-get install ekiga libpt-plugins-v4l2 ekiga
Configuration. You may have to select the iSight device. Edit > Preferences > Devices > Video Devices >
Video plugin: V4L2
- Input device: Built-in iSight
If you want to use it in 640x480 mode, then:
gconftool-2 --type integer --set /apps/ekiga/devices/video/size 1
WARNING
WARNING
!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!! BR WARNING! - the informationg below this point is out of date!!!! I'm still updating this wiki BR !!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!! BR BR
Access MacOsX partition
You can still access (in read only mode) your MacOsX partition as this : BR {{{ sudo mkdir /mnt/mac mount -t hfsplus /dev/sda2 /mnt/mac cd /mnt/mac }}}
Troubleshooting
Heat ... under Linux MBP is even hotter than on MacOSx ..
BR Especially the harddrive ..
Note: To raise the fan speed ( if you keep the fan at 100% your macbook pro will not even get hot while rendering, my macbook pro is my coolest laptop I have since I started doing this )
In MacOSx Install smc fan Controll http://81.169.182.62/~eidac/software/page5/page5.html and set the minimum fan speed higher, then reboot, simply shutting down and starting back up again will not work, the minimum fan speed will stay set until you either suspend or shut down the machine, AFIK the only way set the minimum fan speed back is to boot into macOSx again and run smc fan control and reboot, hopefully this will be ported to Linux so booting into macOSx will no longer be neccisary. ~Jordan_U
BR BR "kernel panic - not syncing: IO-APIC + timer doesn't work!" BR occurs often when the usb mouse is plugged at boot. So either BR apply patches or boot with mouse unplugged ... BR (I also had rarely this error with unplugged mouse ..) BR BR Note: Adding append="noapic" to the lilo.conf will fix this problem.
If installing "Feisty Fawn" Herd 3 you will need to edit /etc/X11/xorg.conf after installation in order to set a usable screen resolution. By default the resolution is 1680x1050 and is unreadable.
There is most likely a easier way but I did this:
* Boot from "Feisty Fawn" Herd 3 alternate cd. Choose repair mode. * Get a shell on the installed system. * Run these commands:
cd /etc/X11 cat xorg.conf | sed s/1680x1050/1024x768/ > xorg.conf.new mv xorg.conf.new xorg.conf
* Then reboot, install the fglrx drivers and after running aticonfig --install you'll have a pretty solid system.
Mouse get's blocked while any keyboard input
This isn't a bug. This behavior is tiggered by mouseemu and a special feature of it. It can be disabled within the configuration file of mouseemu (/etc/default/mouseemu) by adding the following line
- TYPING_BLOCK="-typing-block 0"
Finaly restart mouseemu
- sudo /etc/init.d/mouseemu restart
Desktop
BR Finally .. find a suitable desktop for such a great OS on a great Machine ! BR BR I built mine on the theme : " Tux the pingouin crunched the apple " http://ubuntuforums.org/images/smilies/icon_wink.gif BR BR It is based on [http://www.gnome-look.org/content/show.php?content=40670 HumanBlue], [http://www.gnome-look.org/content/show.php?content=37099 HumanAzul], [http://www.gnome-look.org/content/show.php?content=15994 Tux-Mania] GDM and a [http://www.gnome-look.org/content/show.php?content=26229 Tux screenshot] coming from BRhttp://www.gnome-look.org BR BR To get rid of brown background while starting, change background color in /etc/gdm.conf BR ( BackgroundColor=#5B5B5B instead of BackgroundColor=#2b0600 )