MacBookPro

Differences between revisions 1 and 94 (spanning 93 versions)
Revision 1 as of 2006-11-06 21:51:46
Size: 25535
Editor: 58
Comment:
Revision 94 as of 2007-12-02 04:45:15
Size: 30623
Editor: ppp59-167-36-203
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Ubuntu on MacBookPro =
[[BR]]
= Ubuntu Gutsy on MacBook Pro - UPDATED! =
Line 4: Line 3:
[[BR]]Many of Ubuntu forum members have been contributing to a thread I started some time ago in the forum.
[[BR]]http://ubuntuforums.org/showthread.php?t=198453
[[BR]]It would be great to put all those Ubuntu on MacBookPro contributions here together !
[[BR]]
[[BR]] There are some installation notes about Ubuntu on MacBookPro ..
[[BR]] rather a compilation of what I found on the internet
[[BR]] + configuration of french / belgian-fr keyboard
[[BR]] + a nice desktop theme ;-)
[[BR]]
[[BR]] Thanks to Ubuntu forum members for their
[[BR]] feedback and contribution and all the people providing
[[BR]] drivers and/or useful information about Linux on Macbook
[[BR]] especially Nicolas Boichat and Ronald S. Bultje
[[BR]]
== For more information : ==
[[BR]]
[[BR]]http://www.mactel-linux.org/wiki/Main_Page
[[BR]]http://modular.math.washington.edu/macbook/
[[BR]]http://modular.math.washington.edu/macbook/triboot/
[[BR]]http://bin-false.org/?p=17
[[BR]]http://desrt.mcmaster.ca/macbook.xhtml
[[BR]][http://wiki.onmac.net/index.php/Triple_Boot_via_BootCamp http://wiki.onmac.net/index.php/Trip...t_via_BootCamp]
[[BR]]http://www.jasonparekh.com/?page_id=9
[[BR]]http://www.ethicalhack.org/howto/triple_boot_howto.html
[[BR]][http://wiki.cchtml.com/index.php/Ubuntu_Dapper_Installation_Guide http://wiki.cchtml.com/index.php/Ubu...allation_Guide]
[[BR]]http://wiki.cchtml.com/index.php/Xgl-Compiz-Dapper
[[BR]]http://blogs.gnome.org/portal/rbultje
[[BR]]http://www.boichat.ch/nicolas/macbook-tools/
[[BR]][http://blogs.vislab.usyd.edu.au/index.php/JohnStavrakakis/2006/07/28/triple_boot_on_macbook_pro_15 http://blogs.vislab.usyd.edu.au/inde...macbook_pro_15]
[[BR]]http://www.ubuntuforums.org/showthread.php?t=225621
== Note ==
[[BR]]'''For triple boot Mac OS X - Linux - Windows, follow specific instructions.'''
[[BR]] (WARNING ! In the forum thread they are in blue but I did not find a way to put some color here ?
[[BR]] so I put [Begin Triple Boot] [End Triple boot] tags instead)
== MacOsX Installation ==
  1. Install MacOsX pro with a minimum of features. It may be useful for firmware update or hardware check ..
  1. Boot on MacOsX CD holding Alt key
  1. Follow installation instruction.

This page describes installing Ubuntu 7.10 (Gutsy Gibbon) on MacBook Pro generation 1(CoreDuo) & 2(Core2Duo), and MacBook.

For the MacBook Pro generation 3(SantaRosa) you will need to read the wiki page https://wiki.ubuntu.com/MacBookPro/SantaRosa first for additional information and instructions.
 
== For more information : ==

https://help.ubuntu.com/community/MacBook

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 ... and me :)

Contact: Ubuntu community nickname Fuz2y / Fuz2yPt ; email/msn - fuz2y@netcabo.pt

Following is a list of other wiki's which provide details on running Linux on Macbook:

 * The [http://gentoo-wiki.com/HARDWARE_Apple_MacBook Gentoo Macbook wiki] - Partitioning, access to ext2/3 and UID sync'ing are covered quite well there (and somewhat sparse in this document)

 * The [http://wiki.onmac.net/index.php/Triple_Boot_via_BootCamp OnMac wiki] has triple-boot instructions, and also some details on restoring things to their initial state (removing bootcamp, linux, etc.).


== Mac OS X Installation ==

1. It may be useful to check for firmware update or run the hardware check...

2. Boot from the Mac OS X DVD by holding the Alt key on the gray screen.

3. Follow installation instruction.
Line 43: Line 33:
[[BR]]
[[BR]] 1.Boot on MacOsX
[[BR]] 2.Install bootcamp
[[BR]]
[[BR]] [Begin Triple Boot] For triple boot: Burn MacBook Windows CD driver[End Triple boot]
[[BR]]
[[BR]] 3.Install rEFIt (http://refit.sf.net)
  * 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
== Partionning ==
[[BR]]
[[BR]] In a MacosX terminal, partition the disc :
[[BR]]
{{{
sudo diskutil resizeVolume disk0s2 10G
}}}
That sets 10G for MacOsX and the rest for Linux
[[BR]]
[[BR]]
[[BR]]
[[BR]] For triple boot:
[[BR]]
[Begin Triple Boot]
{{{
sudo diskutil resizeVolume disk0s2 10G Linux Linux 52G "MS-DOS FAT32" Windows 30G
}}}
[End Triple Boot]
== Install Windows XP SP2 ==
[Begin Triple Boot]
[[BR]] Boot, in refit, choose the Windows CDRom.
[[BR]] Launch install, at reboot choose the Windows HardDisk.
[[BR]] Install drivers from BootCamp CD drivers.
[[BR]] Follow my howto to customize Mac keyboard on Windows :
[[BR]][http://discussions.apple.com/thread.jspa?threadID=608584&tstart=0 http://discussions.apple.com/thread....08584&tstart=0]
[[BR]]
[End Triple Boot]
[[BR]]

1. Boot from 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.

1. Install mac image

2. Copy EFI to root directory (drag EFI folder to MacOS disk)

3. Open a mac OS terminal (in utilities)

4. cd /efi/refit

5. ./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 ==

1. Boot, in refit, choose the Windows DVD.

2. Launch Install, format Bootcamp partition with NTFS file system and procede with the installer, at reboot choose the Windows Hard Disk.

3. Install drivers from Apple Mac OS X 10.5 DVD
Line 84: Line 78:
[[BR]]
  * Boot on Ubuntu drapper live cd
[[BR]]
[[BR]]
[Begin Triple Boot]
[[BR]] For triple boot, make a swap file because of partion number limit explained
[[BR]] on [http://wiki.onmac.net/index.php/Triple_Boot_via_BootCamp http://wiki.onmac.net/index.php/Trip...t_via_BootCamp]
[[BR]] Open a terminal. (Application>Accessories>Terminal)
[[BR]]
{{{ sudo su
[[BR]] mkdir /mnt/linux
[[BR]] mount -t ext3 /dev/sda3 /mnt/linux
[[BR]] sudo dd if=/dev/zero of=/mnt/linux/swap bs=1024 count=2097152
[[BR]] mkswap /mnt/linux/swap
[[BR]] swapon /mnt/linux/swap
}}}
 [End Triple Boot]
[[BR]]
  * Click install on disk in Ubuntu
  * Choose a manual partition : (2Gb of swap and the rest for filesystem)
[[BR]] do not erase efi 200M partition
[[BR]]
  * define mount :
    * if possible, do not mount /mount/EFI (select white item in list)
    * /dev/sda3 => swap
    * /dev/sda4 => /
[[BR]]
[Begin Triple Boot]
[[BR]] For triple boot
  * define mount :
    * /dev/sda3 => /Triple boot uses a swap file
[End Triple Boot]
[[BR]]
[[BR]]
  * Grub installation fails at the end, just ignore it (you are going
[[BR]] to install lilo anyway).
[[BR]]
  * Open a terminal : Terminal 1 (Application>Accessories>Terminal)
[[BR]] (the following comes from http://bin-false.org/?p=17 )
[[BR]]
{{{ sudo su
mkdir /mnt/ubuntu
mount /dev/sda4 /mnt/ubuntu/
mount -t proc none /mnt/ubuntu/proc
mount -o bind /dev /mnt/ubuntu/dev
chroot /mnt/ubuntu /bin/bash
apt-get install lilo lilo-doc
}}}
  (Remark :Some users report problem to find lilo because no network is not
[[BR]] available in the chroot terminal. It is strange it works for most for us.
[[BR]]
[[BR]] If you have that problem, the solution is to reactivate the network in the chroot terminal.
[[BR]] Either manually (ifup eth0), with dhclient
[[BR]] or using the graphical config (gksu network-admin).)
[[BR]]
[[BR]]
  * create /etc/lilo.conf
[[BR]] Add this content:
[[BR]] (with "vi" or Application>Accessories>Text Editor)
[[BR]]
{{{
  boot=/dev/sda4
  default=Linux
  map=/boot/map
  delay=20
  image=/vmlinuz initrd=/initrd.img
  root=/dev/sda4
  label=Linux
  read-only
  
}}}
[Begin Triple Boot]
[[BR]] For triple boot use /dev/sda3 instead
[[BR]]
{{{
  boot=/dev/sda3
  default=Linux
  map=/boot/map
  delay=20
  image=/vmlinuz initrd=/initrd.img
  root=/dev/sda3
  label=Linux
  read-only
  
}}}
[End Triple Boot]
[[BR]]
  * Open a second terminal : Terminal 2
[[BR]]
{{{
  sudo parted
  print
  set 4 boot on
  quit
  
}}}
[Begin Triple Boot]
[[BR]] For triple boot use /dev/sda3 instead
[[BR]]
{{{
  sudo parted
  print
  set 3 boot on
  quit
  
}}}
[End Triple Boot]
[[BR]]
  * Go back to Terminal 1
[[BR]]
{{{
lilo -b /dev/sda
exit
umount /mnt/ubuntu/proc
umount /mnt/ubuntu/dev
[[BR]] umount /mnt/ubuntu }}}
  
[[BR]]
[Begin Triple Boot]
[[BR]] For triple boot
[[BR]]
{{{
lilo -P ignore -b /dev/sda3
exit
umount /mnt/ubuntu/proc
umount /mnt/ubuntu/dev
umount /mnt/ubuntu }}}
[End Triple Boot]
[[BR]]
  * Reboot
  * '''Go in the rEFIt partition editor and synchronize MBR'''
  * Choose linux in rEFIt menu
== Ubuntu configuration ==
[[BR]]
=== Update ===
[[BR]]
[[BR]] Update your system and install restritected drivers
[[BR]]
{{{
sudo apt-get install linux-restricted-modules-2.6.15-26-686 linux-kernel-headers
sudo apt-get dist-upgrade
}}}
Relaunch lilo if kernel has changed
[[BR]]
[[BR]] For triple boot
[[BR]]
{{{ lilo -P ignore -b /dev/sda3 }}}
[[BR]] For dual boot
[[BR]]
{{{
sudo lilo -b /dev/sda
}}}
Reboot
[[BR]]
=== Video ===
[[BR]]
[[BR]]__Install ATI drivers :__
[[BR]] The following was suggested by Gendo and comes from :
[[BR]][http://wiki.cchtml.com/index.php/Ubuntu_Dapper_Installation_Guide http://wiki.cchtml.com/index.php/Ubu...allation_Guide]
[[BR]] disable fglrx module : sudo vi /etc/default/linux-restricted-modules-common
[[BR]]
{{{ DISABLED_MODULES="fglrx" }}}
Uncomment the universe and multiverse repositories in /etc/apt/sources.list
[[BR]]
[[BR]] download drivers from ATI web site and follow this install :
[[BR]]
{{{
wget https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/ati-driver-installer-8.27.10-x86.run
sudo apt-get update
sudo apt-get install module-assistant build-essential
sudo apt-get install fakeroot dh-make debconf libstdc++5 gcc-3.3-base
chmod +x ati-driver-installer-8.27.10-x86.run
./ati-driver-installer-8.27.10-x86.run --buildpkg Ubuntu/dapper
sudo dpkg -i xorg-driver-fglrx_8.27.10-1_i386.deb
sudo dpkg -i fglrx-kernel-source_8.27.10-1_i386.deb
sudo dpkg -i fglrx-control_8.27.10-1_i386.deb
sudo rm /usr/src/fglrx-kernel*.deb
sudo module-assistant prepare,update
sudo module-assistant build,install fglrx
sudo depmod -a
sudo aticonfig --initial
sudo aticonfig --overlay-type=Xv
}}}
reboot and check with :
[[BR]]
{{{
fglrxinfo
}}}
you should have :
[[BR]]
{{{
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon X1600 Generic
OpenGL version string: 2.0.5879 (8.26.18)
}}}
[[BR]]__XGL/compiz installation__
[[BR]]
[[BR]] If you want to go further and install compiz and XGL
[[BR]] go to that other link :
[[BR]]http://wiki.cchtml.com/index.php/Xgl-Compiz-Dapper
[[BR]] (thanks to Gendo for that suggestion)
[[BR]]
[[BR]] After XGL compiz installation :
[[BR]]
[[BR]] - add the startcompiz script to the session start program (System>Preferences>Sessions | Startup Programs)
[[BR]]
[[BR]] - install gset-compiz, gcomizthemer ant themes and discover compiz ...
[[BR]]
{{{ sudo apt-get install gset-compiz gcompizthemer gcompizthemer-themes
[[BR]] gset-compiz }}}
Configure effects, key shortcuts with gset-compiz
[[BR]] and customize your theme with gcompizthemer
[[BR]]
[[BR]] - I also had to add this line to the startcompiz script
[[BR]]
{{{
killall gnome-panel
}}}
=== DVI Output ===
[[BR]]
[[BR]] - Install ATI drivers as above
[[BR]] - Install fglrx package with synaptic
[[BR]] - run ATI config (either from ATI menu or sudo aticonfig)
[[BR]] - configure a clone or large desktop
[[BR]] for example :
[[BR]]
{{{ sudo aticonfig -f --initial=dual-head --screen-layout=right }}}
- restart X (ctrl-alt-backspace)
[[BR]]
=== Audio ===
[[BR]] Install latest Ubuntu kernel 2.6.15-26
[[BR]] relaunch lilo and reboot
[[BR]]
{{{
sudo lilo -b /dev/sda
}}}
You should hear Ubuntu login sound
[[BR]] (It seems to work only on MBP17" not on MBP15"...
[[BR]] for MBP15" follow the trick given by Gendo here :
[[BR]][http://www.ubuntuforums.org/showpost.php?p=1269085&postcount=39 http://www.ubuntuforums.org/showpost...5&postcount=39]
[[BR]] )
[[BR]]
[[BR]] Microphone does not work with "sound recorder" application but
[[BR]] It works with skype 1.3 beta for Linux (but not with skype 1.2)
[[BR]]
[[BR]] (I also installed latest alsa drivers (1.0.12rc1) following their
[[BR]] INSTALL file)
[[BR]]
[[BR]] With old drivers and kernel when headset is plugged in jack, you might
[[BR]] hear the sound in both headset AND speakers ?!
[[BR]]
[[BR]] With new alsa drivers (1.0.12rc1) and kernel ( 2.6.15-26-686 ),
[[BR]] I do not have this problem any more.
[[BR]]
[[BR]] Finally ... sound is working perfectly on MBP17"
[[BR]]
[[BR]] If you have some issues left, you can have a look to this link,
[[BR]] it contains many useful informations that are not here :
[[BR]]http://www.jasonparekh.com/?page_id=9
[[BR]]
=== Wireless ===
[[BR]] (the following comes from http://bin-false.org/?p=17 )
  * sudo modprobe new_wlan_scan_sta
  * sudo apt-get install network-manager network-manager-gnome
It works out of the box on my MacBook with my hotspot. Some people seems to have problems with some wifi routers however.
[[BR]]
=== Screen brightness ===
[[BR]]
[[BR]] Nicolas Boichat wrote drivers for screen and keyboard backlight.
[[BR]]http://www.boichat.ch/nicolas/macbook-tools/
[[BR]]
[[BR]] Here is how to install :
[[BR]]
[[BR]]
{{{
sudo apt-get install pciutils-dev
wget http://www.boichat.ch/nicolas/macbook-tools/macbook-tools-0.1.1.tar.bz2
tar xvfj macbook-tools-0.1.1.tar.bz2
cd macbook-tools-0.1.1
sudo rm /usr/local/bin/backlight
sudo make install
}}}
Use :
[[BR]] backlight +10
[[BR]] backlight -10
[[BR]]
[[BR]] To control backlight with key pressed, you can use a program
[[BR]] developed by alexinfurs available here :
[[BR]]http://ubuntuforums.org/showthread.php?t=215801
[[BR]]
[[BR]]
{{{
sudo apt-get install libvte-dev
sudo ln -s /usr/local/bin/backlight /usr/bin/macbook-backlight
tar xvfz macbook-backlight-control-0.2.tar.gz (get it from the link above)
cd macbook-backlight-control/src
make
./macbook-backlight-control
}}}
Try :
[[BR]] Ctrl+F1
[[BR]] Ctrl+F2
[[BR]]
[[BR]] Add macbook-bakclight-control to your session start scripts
[[BR]] System>Preference>Session
[[BR]]
[[BR]] To get automatic backlight adjustement from sensors, apply
[[BR]] kernel patch developped by Nicolas Boichat
[[BR]]
[[BR]] Thank you to msprunck for his feedback
[[BR]]
=== Keyboard Backlight ===
[[BR]]
[[BR]] Nicolas Boichat wrote drivers for screen and keyboard backlight.
[[BR]] See :
[[BR]]http://www.boichat.ch/nicolas/macbook-tools/
[[BR]]
[[BR]] Follow "Screen brightness" installation
[[BR]]
[[BR]] ./applesmc 255
[[BR]] to turn light on
[[BR]] sudo ./applesmc 0
[[BR]] to turn light off
[[BR]] ./applesmc
[[BR]] to see sensors values
[[BR]]
[[BR]] works on MBP 17
[[BR]]
=== Keyboard ===
[[BR]]
==== __Method 1 : using Xmodmap__: ====
[[BR]] With this method you need to start xmodmap script when the session start
[[BR]] but it is easier to modify special keys.
[[BR]]
[[BR]] copy the xmodmap to a custom one :
[[BR]]
{{{ sudo cp /usr/share/xmodmap/xmodmap.be /usr/share/xmodmap/xmodmap.mbp.be }}}
edit that file and change special keys definition
[[BR]] Especially to have an "AltGr" key and a "Delete" key ..
[[BR]] I redefined many other keys to have a full feature keyboard.
[[BR]]
[[BR]] You can change it yourself :
[[BR]] - to find a keycode : launch xev and hit the key
[[BR]] - to get the command keyword : look at this website : http://wiki.linuxquestions.org/wiki/List_of_keysyms
[[BR]] (After a keycode, you can put 4 keyword : "normal key keyword" "shift key keyword" "altgr key keyword" "shift algr key keyword"
[[BR]] for example : a A à @)
[[BR]]
[[BR]] Then start xmodmap by :
[[BR]]
{{{
 xmodmap /usr/share/xmodmap/xmodmap.mbp.be
}}}
Put it somewhere so that it is loaded automatically
[[BR]]
[[BR]] Here is my french - belgian/fr xmodmap file :
[[BR]]
[[BR]]
{{{
clear Mod1
clear Mod2
!
keycode 8 =
keycode 9 = Escape
keycode 10 = ampersand 1 bar brokenbar
keycode 11 = eacute 2 twosuperior onehalf
keycode 12 = quotedbl 3 threesuperior threequarters
keycode 13 = apostrophe 4 braceleft onequarter
keycode 14 = parenleft 5 braceleft
keycode 15 = section 6 asciicircum
keycode 16 = egrave 7
keycode 17 = exclam 8
keycode 18 = ccedilla 9 braceleft
keycode 19 = agrave 0 braceright
keycode 20 = parenright degree braceright
keycode 21 = minus underscore
keycode 22 = BackSpace Delete Delete
keycode 23 = Tab
keycode 24 = a
keycode 25 = z
keycode 26 = e E EuroSign
keycode 27 = r R registered
keycode 28 = t
keycode 29 = y
keycode 30 = u
keycode 31 = i
keycode 32 = o O at
keycode 33 = p
keycode 34 = dead_circumflex dead_diaeresis bracketleft
keycode 35 = dollar asterisk bracketright EuroSign
keycode 36 = Return
keycode 37 = Control_L
keycode 38 = q
keycode 39 = s
keycode 40 = d
keycode 41 = f
keycode 42 = g
keycode 43 = h
keycode 44 = j
keycode 45 = k
keycode 46 = l
keycode 47 = m
keycode 48 = ugrave percent dead_acute
keycode 49 = less greater backslash
!twosuperior threesuperior
keycode 50 = Shift_L
keycode 51 = backslash sterling dead_grave mu
keycode 52 = w
keycode 53 = x
keycode 54 = c C copyright
keycode 55 = v
keycode 56 = b
keycode 57 = n N asciitilde
keycode 58 = comma question dead_cedilla
keycode 59 = semicolon period
keycode 60 = colon slash Multi_key
keycode 61 = equal plus plusminus
keycode 62 = Shift_R
keycode 63 = KP_Multiply
keycode 64 = Alt_L
keycode 65 = space
keycode 66 = Caps_Lock
keycode 67 = F1 F11
keycode 68 = F2 F12
keycode 69 = F3 F13
keycode 70 = F4 F14
keycode 71 = F5 F15
keycode 72 = F6 F16
keycode 73 = F7 F17
keycode 74 = F8 F18
keycode 75 = F9 F19
keycode 76 = F10 F20
keycode 77 = Num_Lock
keycode 78 = Scroll_Lock
keycode 79 = KP_7
keycode 80 = KP_8
keycode 81 = KP_9
keycode 82 = KP_Subtract
keycode 83 = KP_4
keycode 84 = KP_5
keycode 85 = KP_6
keycode 86 = KP_Add
keycode 87 = KP_1
keycode 88 = KP_2
keycode 89 = KP_3
keycode 90 = KP_0
keycode 91 = KP_Decimal
keycode 92 = 0x1007ff00
keycode 93 =
keycode 94 = at numbersign
! less greater backslash
keycode 95 = F11
keycode 96 = F12
keycode 97 = Home
keycode 98 = Up Up Prior
keycode 99 = Prior
keycode 100 = Left Left Home
keycode 101 = Begin
keycode 102 = Right Right End
keycode 103 = End
keycode 104 = Down Down Next
keycode 105 = Next
keycode 106 = Insert
keycode 107 = Delete
keycode 108 = Delete
keycode 109 = Control_R
keycode 110 = Pause
keycode 111 = Print
keycode 112 = KP_Divide
keycode 113 = Mode_switch
keycode 114 = Break
keycode 115 = Mode_switch
keycode 116 = Mode_switch
keycode 117 = Multi_key
add Mod1 = Alt_L
add Mod2 = Mode_switch
}}}
==== Method 2 : changing symbol map : ====
[[BR]]
[[BR]]
[[BR]] This is for International keyboard (french - belgian/fr ) but
[[BR]] you could adapt it easily to your keyboard
[[BR]]
[[BR]] Define your keyboard in xorg.conf
[[BR]] and configure right apple key to alt-gr
[[BR]]
[[BR]]
{{{

1. Boot on Ubuntu Live CD (Question: Which one? 32bit or 64bit? Core2* are 64 bit CPUs)

2. Click install on disk in Ubuntu

3. Choose a manual partition : Select Linux Partition and check out the format box option (as ext3 filesystem)

  - Do not erase or format anything else!!!

4. Define mount :

  - If possible, do not mount /mount/EFI (select white item in list)
   
  - Mount Linux partition as: /

  - Mount Windows partition as: /media/Windows

5. Click on Advanced Options before proceding with the installaton and modify Grub to install on (hd0,2)

== Swap File ==

This is useful if you already have too many partitions on your macbook and want to put the swap file directly on the main / partition.

Code:
{{{
sudo /bin/bash

dd if=/dev/zero of=/swapfile bs=1024 count=2048000
mkswap /swapfile
swapon /swapfile
}}}

Edit /etc/fstab:
{{{
/swapfile swap swap defaults 0 0
}}}

Note: You can use suspend on disk with a swapfile. To do that we have to add an option passed to the kernel. Add the resume=/dev/<partition> resume_offset=<offset to the swapfile in blocks> :

{{{
sudo filefrag -v /swapfile
#output : First block: 102300
#...
}}}

Copy the first block number of the swapfile (ex:102300) and edit the defoptions line of /boot/grub/menu.lst :

{{{
defoptions=quiet splash resume=/dev/sda3 resume_offset=102300
}}}

On this example, the swapfile is on partition /dev/sda3. You are now able to use suspend on disk (hibernate).

== Video ==

Install ATI's Catalyst official drivers 8.42.3 with AIGLX working!! thanks to the poster of this forum topic :
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.. so take special attention to step 11 . Also if you got the error of "LibGL.so.1" do this:

{{{
sudo ln -f /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1
}}}

*Note: If you get a white screen, then the driver are not correctly installed by some reason, edit /etc/X11/xorg.conf and disable composite extension, reinstall the ati driver, and reenable composite.

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
Line 573: Line 209:
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbLayout" "be"
Option "XkbModel" "pc104"
Option "XkbOptions" "lv3:rwin_switch"
EndSection
}}}
I had to reconfigure some keys that were not properly defined even with macintosh layout (@#,<>..).
[[BR]]
[[BR]] I also made some custom changes to access development keys easily :
  * Alt-Gr < gives {
  * Shift AltGr > gives }
  * AltGr ( gives [
  * Shift AltGr ) gives ]
  * mu key gives \
[[BR]] Here is the hacked part of my /etc/X11/xkb/symbols/be :
[[BR]]
{{{
partial default alphanumeric_keys
xkb_symbols "basic" {
include "latin"
name[Group1]="Belgium";
key <AE01> { [ ampersand, 1, bar, exclamdown ] };
key <AE02> { [ eacute, 2, at, oneeighth ] };
key <AE03> { [ quotedbl, 3, numbersign, sterling ] };
key <AE04> { [apostrophe, 4, onequarter, onehalf ] };
key <AE05> { [ parenleft, 5, bracketleft, threeeighths ] };
key <AE06> { [ section, 6, asciicircum, fiveeighths ] };
key <AE07> { [ egrave, 7, braceleft, seveneighths ] };
key <AE08> { [ exclam, 8, bracketleft, trademark ] };
key <AE09> { [ ccedilla, 9, braceleft, plusminus ] };
key <AE10> { [ agrave, 0, braceright, degree ] };
key <AE11> { [parenright, degree, bracketright, questiondown ] };
key <AE12> { [ minus, underscore, dead_cedilla, dead_ogonek ] };
key <AD01> { [ a, A, at, Greek_OMEGA ] };
key <AD02> { [ z, Z, lstroke, Lstroke ] };
key <AD03> { [ e, E, EuroSign, cent ] };
key <AD11> { [dead_circumflex, dead_diaeresis, bracketleft, dead_abovering ] };
key <AD12> { [ dollar, asterisk, EuroSign, dead_macron ] };
key <AC01> { [ q, Q, ae, AE ] };
key <AC10> { [ m, M, dead_acute, dead_doubleacute ] };
key <AC11> { [ ugrave, percent, dead_acute, dead_caron ] };
key <LSGT> { [ at, numbersign, twosuperior, threesuperior ] };
key <BKSL> { [ backslash, sterling, dead_grave, dead_breve ] };
key <AB01> { [ w, W, guillemotleft, less ] };
key <AB07> { [ comma, question, dead_cedilla, masculine ] };
key <AB08> { [ semicolon, period, horizconnector, multiply ] };
key <AB09> { [ colon, slash, periodcentered, division ] };
key <AB10> { [ equal, plus, dead_tilde, dead_abovedot] };
key <TLDE> { [ less, greater, braceleft, braceright ] };
}}}
==== Configure special keys ====
[[BR]]
[[BR]] Todo : fn keys are not catchable event ...
[[BR]]
  * Install keylaunch with synaptic and put in in xinitrc script
  * go to your home directory and create a file .keylaunchrc
  * add this to the file :
[[BR]]
{{{
key=.*.F2:backlight +10
key=.*.F1:backlight -10
}}}
Atlernatively, for backlight control, you can use a programm
[[BR]] developped by alexinfurs availabel here :
[[BR]]http://ubuntuforums.org/showthread.php?t=215801
[[BR]]
=== Temperatures ===
[[BR]]
[[BR]] Hard Disk Temperature:
[[BR]]
{{{
sudo apt-get install hddtemp
hddtemp /dev/sda
}}}
That prints the temperature of your harddisk
[[BR]]
[[BR]] CPUs Temperature :
[[BR]] (This code was written by Jan Bernhardt and Ludovi Roussearu under GPL)
[[BR]]
{{{
sudo apt-get install subversion
svn co https://svn.sourceforge.net/svnroot/mactel-linux mactel-linux
cd mactel-linux/trunk/tools/temperature/
make
sudo modprobe msr
sudo ./coretemp
}}}
That prints temperatures of both CPUs
[[BR]]
[[BR]]
[[BR]]
[[BR]]
=== Bluetooth ===
[[BR]]
[[BR]] I was able to send/receive files via bluetooth with a SE P910 phone.
[[BR]]
[[BR]] Install bluetooth packages : gnome or kde depending of what you like
[[BR]] (gnome-bluetooth, kdebluetooth, bluesutil..) they are both working.
[[BR]] Also obex libraries (qobex, libopenobex)
[[BR]]
[[BR]]''__For gnome users :__''
[[BR]] Launch System>Preference>Bluetooth manager
[[BR]] Meneu Device>Scan ... you should see your phone
[[BR]]
[[BR]] On the phone search devices, you should see you computer
[[BR]]
[[BR]] Launch Applicarions>Accessoires>Bluetooth File Sharing
[[BR]]
[[BR]] Phone to computer :
[[BR]] Send a file from the phone to the computer. A confirmation popup
[[BR]] is launched and the file is in your home directory !
[[BR]]
[[BR]] Computer to phone:
[[BR]] Right click a file, send to, select your device.. that works
[[BR]]
=== Touchpad ===
[[BR]]
[[BR]] I could configure touchpad right click with mouseemu but after each right click it freezes ..
[[BR]] If anybody find out how to get it working please give us feedback.
[[BR]]
[[BR]] Install mouseemu (with synaptic or apt-get --install mouseemu)
[[BR]] Edit config file:
[[BR]]
{{{ sudo vi /etc/default/mouseemu }}}
Add that content :
[[BR]]
[[BR]]
{{{ MID_CLICK="-middle 56 272" # Alt + mouse click = middle click
[[BR]] RIGHT_CLICK="-right 464 272" # Fn + mouse click = right click
[[BR]] SCROLL="-scroll 87" # F11 + mouse movement
[[BR]] TYPING_BLOCK="-typing-block 300" # block mouse for 300ms after a keypress }}}
Restart mouseemu :
[[BR]]
[[BR]]
{{{ sudo /etc/init.d/mouseemu restart }}}
Requested by JDR. Any idea ?
[[BR]]
=== External Mouse ===
[[BR]]
[[BR]] A little bit out of scope but I manage to get my Logitech MX510
[[BR]] side button working with this in the xorg.conf :
[[BR]]
{{{
 Identifier "Generic Keyboard"
 Driver "kbd"
 Option "CoreKeyboard"
 Option "XkbRules" "xorg"
 Option "XkbModel" "pc105"
 Option "XkbLayout" "pt"
 Option "XkbVariant" "mac"
EndSection
Line 720: Line 219:
  Identifier "Configured Mouse"
  Driver "mouse"
  Option "CorePointer"
  Option "Device" "/dev/input/mice"
  Option "Protocol" "ExplorerPS/2"
  Option "Emulate3Buttons" "false"
  Option "Buttons" "5"
  Option "ZAxisMapping" "4 5"
  Option "ButtonMapping" "1 2 3 6 7"
  Option "Resolution" "800"
EndSection
}}}
(source http://www.ubuntuforums.org/showthread.php?t=150116 )\
[[BR]]
[[BR]]
[[BR]]
=== WebCam ===
[[BR]]
[[BR]]
[[BR]] Ronald S. Bultje is writing a driver look at his blog :
[[BR]]http://blogs.gnome.org/portal/rbultje
[[BR]]
[[BR]] Rapido get it working. His notes are here :
[[BR]]http://www.ubuntuforums.org/showthread.php?t=225621
[[BR]]
[[BR]]
{{{
sudo apt-get install libusb-0.1-4 libusb-dev
wget http://people.freedesktop.org/~rbultje/linux-uvc-0.1.0-b.tar.gz
tar xvfz linux-uvc-0.1.0-b.tar.gz
cd linux-uvc-0.1.0-b/
 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


}}}

== Screen Colors ==

I've noticed that many MacBooks really need this tweak in order to visualize correctly screen colors.
To calibrate the screen colors (in order to match OS X), you need to install xcalib. This isn't available in the Ubuntu repositories, so you'll have to download it.

Go to http://www.etg.e-technik.uni-erlangen.de/web/doe/xcalib/ and (if you are running i386) download the newest Linux binary; save it to the Desktop. (If you are running amd64, you'll need to compile it from source; make sure to install libxxf86vm-dev and libxext-dev first, and then simply make xcalib in the extracted source directory. Take the resulting xcalib binary and continue with these instructions.)

To install and configure it, you will need to do a few things in the terminal and mount a Mac OS X partition (to copy your color profile) as follows (substitute your Mac OS partition's partition number for x in /dev/sdax, 2 being the first standard partition):

{{{
sudo mv ~/Desktop/xcalib /usr/local/bin/xcalib
sudo chmod 755 /usr/local/bin/xcalib
sudo mount -t hfsplus /dev/sdax /mnt
sudo cp /mnt/Library/ColorSync/Profiles/Displays/* /usr/local/etc
}}}

Then, do an "ls /usr/local/etc" and note the name of the profile (for the next step).

Finally, add the following line to the end of either /etc/gdm/Init/Default (for standard Ubuntu/Gnome) or /etc/kde3/kdm/Xsetup (for Kubuntu/KDE), before the final "exit" statement:

{{{
/usr/local/bin/xcalib "/usr/local/etc/<insert name of profile here>"
}}}

Restart X (Ctrl-Alt-Backspace) and your Mac OS X color profile will load as X starts.


== Suspend / Resume ==
The proprietary driver from ATI (including the latest, 8.433 AKA 7.11) does not work with the default Gutsy kernel due to the use of the SLUB allocator.

=== Kernel ===
In order to get suspend working correctly you will need to compile your own version of the Gutsy kernel and choose the SLAB allocator. I'm sure there are 'Debian' ways to do this, maybe someone else can modify this section.
{{{
  sudo apt-get install linux-source libncurses5-dev build-essential
  cd /usr/src/
  sudo tar -xvjpf linux-source-2.6.22.tar.bz2
  sudo ln -sf linux-source-2.6.22 linux
  cd linux
  sudo cp /boot/config-2.6.22-14-generic .config
  sudo make menuconfig
}}}

In the menu, browse to 'General setup', then select 'Choose SLAB allocator' at the last entry. Change this from SLUB to SLAB (you could also change the CPU from 586 to Prescott/Core2 if you like). Exit and save your changes.

Now, build the kernel:
{{{
  sudo make -j2
  sudo make modules -j2
  sudo make modules_install
  sudo make install
}}}
You should now have a new vmlinuz entry under /boot/ and kernel modules under /lib/modules/ (version at time of writing is 2.6.22.9).

=== Initramfs ===
Build your initramfs for this kernel
{{{
  sudo ln -sf /lib/firmware/2.6.22-14-generic /lib/firmware/2.6.22.9
  sudo update-initramfs -c -k 2.6.22.9
}}}

=== Boot loader ===
Simply copy the current entry for the Gutsy kernel and change the initramfs and kernel from '2.6.22-14-generic' to '2.6.22.9'. You might also like to give it a different title, like 'Ubuntu, custom kernel 2.6.22.9'. Everything else can stay the same! If you want to boot this by default, also modify the 'default' entry in menu.lst.

=== External modules ===
You will need to build new drivers for ATI and alsa, but first boot to your new kernel.

Once you are running your new kernel you can build these drivers. First get the required packages.
{{{
  sudo apt-get install module-assistant fakeroot dh-make debhelper debconf libstdc++5 linux-headers-generic
  sudo m-a prepare
}}}

Alsa:
{{{
  sudo apt-get install alsa-source
  sudo m-a build,install alsa
}}}

FGLRX:
Follow the instructions that worked for you, either above, or from the unofficial ATI wiki at http://wiki.cchtml.com/index.php/Ubuntu_Gutsy_Installation_Guide#Method_2:_Install_the_Catalyst_7.11_Driver_Manually

Update modules db:
{{{
  sudo depmod -a
}}}

Now, you should have the FGLRX and alsa drivers under your new /lib/modules/2.6.22.9/ location.

=== ACPI configuration ===
You will need to make a slight change to the acpi-support config files to get resume to work correctly.

Open ''/etc/default/acpi-support'' your favourite text editor and change to POST_VIDEO variable to false, i.e.
{{{POST_VIDEO=false
}}}

You should now be able to successfully suspend and resume!

== 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.

== 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>
Line 753: Line 460:
sudo mkdir /mnt/mac
sudo mount -t hfsplus /dev/sda2 /mnt/mac/
sudo ./extract /mnt/mac/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport
sudo modprobe uvcvideo
}}}
Then try a soft like Ekiga with V4L2 support. It works !
[[BR]] See rapido post for more details. http://www.ubuntuforums.org/showthread.php?t=225621
[[BR]]
=== Access MacOsX partition ===
[[BR]]
[[BR]] You can still access (in read only mode) your MacOsX partition as this :
[[BR]]
[[BR]]
{{{ sudo mkdir /mnt/mac
[[BR]] mount -t hfsplus /dev/sda2 /mnt/mac
[[BR]] cd /mnt/mac }}}
=== Troubleshooting ===
[[BR]]
[[BR]] Heat ... under Linux MBP is even hotter than on MacOSx ..
[[BR]] Especially the harddrive ..
[[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]]
=== 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] comming from
[[BR]]http://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 )
[[BR]]
[[BR]]
}}}

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
}}}

== CPU Settings ==

I've only tested this on MacBook Pro generation 2(Core2Duo), so contribute here please! =)

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
}}}

and then in terminal type:

{{{
sudo apt-get install cpufrequtils
}}}

after that restart the PC.

== Temperatures & Fan Speed ==
=== Hard Disk Temperature ===

{{{
sudo apt-get install hddtemp
sudo hddtemp /dev/sda
}}}
That prints the temperature of your harddisk

=== CPUs Temperature ===

In terminal console type :

{{{
sudo apt-get install lm-sensors

sensors
}}}
That prints temperatures of both CPUs and Fan Speed

=== Fan Speed Control ===

This is the only way it seems to work correctly, I've tried other guides and it didnt adjust the fans speed, so here it goes:

{{{
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

}}}

To set it mannualy without restarting, do this: sudo /etc/rc.local

Note: 3000 = 3000RPM , type "sensors" on a terminal to see the resulting temperatures, you can also set it between 2000 (almost noise-less) and a max of 6000 (very noisy), I recommend setting fans to 4000RPM when playing 3D games or so.

== Reducing power consumption ==

Install the powertop package :

{{{
sudo apt-get install powertop
}}}

and run with "sudo powertop" in a terminal. Follow the instructions given as to reducing power consumption.

=== WebCam (iSight) & aMSN ===

Install v4l2 plugin:

{{{
sudo apt-get install libpt-plugins-v4l2
}}}

See Below in Desktop Tab how to install aMSN with tk/tcl-8.5 from sources, then go to aMSN > Preferences > Other > Edit audio and video settings.

=== Access Mac OS X & Windows Partition ===

To do so edit /etc/fstab , here's mine :

{{{
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0

## Linux #################################################################

/dev/sda3 / ext3 defaults,errors=remount-ro 0 1

## Swap ##################################################################

/swapfile swap swap defaults 0 0

## EFI ###################################################################

#/dev/sda1 /media/EFI vfat defaults,utf8,umask=007,gid=46 0 1

## DVD-ROM ###############################################################

/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0

## Macintosh #############################################################

/dev/sda2 /media/Macintosh hfsplus defaults 0 0

## Windows ###############################################################

/dev/sda4 /media/Windows ntfs defaults 0 0

## Network ###############################################################

# Server

//Server/public /media/Server smbfs username=USER,password=PASSWORD 0 0

# Lacie 2TB

//Lacie2TB/public /media/Lacie2TB smbfs username=USER,password=PASSWORD 0 0


}}}

Then do the following in terminal:

{{{
sudo /bin/bash

mkdir /media/Macintosh
mkdir /media/Windows
chmod 777 /media/Macintosh
chmod 777 /media/Windows
umount -a
mount -a
}}}

== Apple Remote Control ==

Apple's Remote Control is working by default in Ubuntu 7.10, but only allows you to control the Volume. So here's the tweaks to get it working on with other applications:

{{{
sudo apt-get install inputlirc lirc lirc-x
}}}

And edit /etc/rc.local and add:

{{{
/etc/init.d/inputlirc start
/etc/init.d/inputlirc restart
}}}

Then go to > System > Preferences > Sessions , and add the following to the Startup list by this order:

{{{
sudo irexec & /home/YOURACCOUNT/.lircrc
sudo irxevent & /home/YOURACCOUNT/.lircrc
sudo /etc/rc.local
}}}

And copy the following to /home/YOURACCOUNT/.lircrc file :
Note : YOURACCOUNT = your user name

{{{
##################################################
# LIRC Config for the following Applications:
##################################################

#############
#### VLC ####
#############

begin
prog = vlc
button = KEY_PLAYPAUSE
config = key-play-pause
repeat = 0
end

begin
prog = vlc
button = KEY_MENU
config = key-aspect-ratio
repeat = 0
end

begin
prog = vlc
button = KEY_PREVIOUSSONG
config = key-jump-medium
repeat = 1
end

begin
prog = vlc
button = KEY_NEXTSONG
config = key-jump+medium
repeat = 1
end
begin
prog = vlc
button = KEY_VOLUMEUP
config =
repeat = 1
end

begin
prog = vlc
button = KEY_VOLUMEDOWN
config =
repeat = 1
end

#################
#### MPlayer ####
#################

#begin mplayer
begin
prog = mplayer
button = KEY_PLAYPAUSE
config = pause
repeat = 15
end

begin
prog = mplayer
button = KEY_MENU
config = stop
repeat = 15
end

begin
prog = mplayer
button = KEY_PREVIOUSSONG
config = seek -10
repeat = 10
end

begin
prog = mplayer
button = KEY_NEXTSONG
config = seek +10
repeat = 10
end
begin
prog = mplayer
button = KEY_VOLUMEUP
config = volume 1
repeat = 1
end

begin
prog = mplayer
button = KEY_VOLUMEDOWN
config = volume -1
repeat = 1
end
#end mplayer


##################
#### Kaffeine ####
##################

#begin kaffeine
begin
prog = irexec
button =
config = dcop kaffeine MainApplication-Interface
end

begin
prog = irexec
button = KEY_PLAYPAUSE
config = if `dcop kaffeine KaffeineIface isPlaying`; then dcop kaffeine KaffeineIface pause; dcop kaffeine kaffeine_mainview hide; else dcop kaffeine KaffeineIface play; dcop kaffeine kaffeine_mainview hide; fi
end

begin
prog = irexec
button = KEY_MENU
repeat = 1
config = dcop kaffeine KaffeineIface stop
end

begin
prog = irexec
button = KEY_NEXTSONG
repeat = 1
config = dcop kaffeine KaffeineIface posPlus
end

begin
prog = irexec
button = KEY_PREVIOUSSONG
repeat = 1
config = dcop kaffeine KaffeineIface posMinus
end

begin
prog = irexec
button = KEY_VOLUMEUP
repeat = 1
config = dcop kaffeine KaffeineIface volUp
end

begin
prog = irexec
button = KEY_VOLUMEDOWN
repeat = 1
config = dcop kaffeine KaffeineIface volDown
end

#end kaffeine


################
#### Amarok ####
################

#begin amarok
begin
prog = irexec
button = KEY_PLAYPAUSE
config = dcop amarok player playPause
end

begin
prog = irexec
button = KEY_MENU
config = dcop amarok player stop
end

begin
prog = irexec
button = KEY_NEXTSONG
config = dcop amarok player next
end

begin
prog = irexec
button = KEY_PREVIOUSSONG
config = dcop amarok player prev
end

begin
prog = irexec
button = KEY_VOLUMEUP
repeat = 1
config = dcop amarok player volumeUp
end

begin
prog = irexec
button = KEY_VOLUMEDOWN
repeat = 1
config = dcop amarok player volumeDown
end
#end amarok


###############
#### Totem ####
###############

begin
prog = irxevent
button = KEY_PLAYPAUSE
config = Key p Totem
repeat = 0
end

begin
prog = irexec
button = KEY_MENU
config = stop
repeat = 0
end

begin
prog = Totem
button = KEY_NEXTSONG
config = seek_forward
repeat = 0
end

begin
prog = Totem
button = KEY_PREVIOUSSONG
config = seek_backward
repeat = 0
end

begin
prog = irexec
button = KEY_VOLUMEUP
repeat = 10
config =
end

begin
prog = irexec
button = KEY_VOLUMEDOWN
repeat = 10
config =
end



###################
#### Audacious ####
###################

begin
prog = audacious
button = KEY_PLAYPAUSE
config = PAUSE
repeat = 16
end

begin
prog = audacious
button = KEY_MENU
config = STOP
repeat = 0
end

begin
prog = audacious
button = KEY_NEXTSONG
config = NEXT
repeat = 16
end

begin
prog = audacious
button = KEY_PREVIOUSSONG
config = PREV
repeat = 16
end


##############
#### XMMS ####
##############

begin
prog = xmms
button = KEY_PLAYPAUSE
config = pause
end

begin
prog = xmms
button = KEY_MENU
config = stop
end

begin
prog = xmms
button = KEY_NEXTSONG
config = next
repeat = 16
end

begin
prog = xmms
button = KEY_PREVIOUSSONG
config = prev
repeat = 16
end

begin
prog = xmms
button = KEY_VOLUMEUP
config = fwd 5
repeat = 10
end

begin
prog = xmms
button = KEY_VOLUMEDOWN
config = bwd 5
repeat = 10
end


###############
##### XdTV ####
###############

begin
prog = irexec
button = KEY_PLAYPAUSE
config = record
repeat = 0
end

begin
prog = irexec
button = KEY_PREVIOUSSONG
config = setstation prev
repeat = 0
end

begin
prog = irexec
button = KEY_PNEXTSONG
config = setstation next
repeat = 0
end

################
#### TVtime ####
################

#begin tvtime

begin
prog = irexec
button = KEY_PLAYPAUSE
config = tvtime-command ENTER
end

begin
prog = irexec
button = KEY_MENU
config = tvtime-command TOGGLE_FULLSCREEN
end

begin
prog = irexec
button = KEY_NEXTSONG
config = tvtime-command UP
repeat = 1
end
begin
prog = irexec
button = KEY_PREVIOUSSONG
config = tvtime-command DOWN
repeat = 1
end
begin
prog = irexec
button = KEY_VOLUMEUP
config = tvtime-command RIGHT
repeat = 2
end
begin
prog = irexec
button = KEY_VOLUMEDOWN
config = tvtime-command LEFT
repeat = 2
end

#begin
# prog = irexec
# button = middle
# config = tvtime-command CHANNEL_JUMP
# repeat = 1
#end

#end tvtime


##############################################
#### Evince y OpenOffice (Presentations) ####
##############################################

begin
prog = irxevent
button = KEY_PLAYPAUSE
config = Key F11 CurrentWindow
config = Key F5 CurrentWindow
repeat = 0
end

begin
prog = irxevent
button = KEY_MENU
config = Key Escape CurrentWindow
repeat = 0
end

begin
prog = irxevent
button = KEY_PREVIOUSSONG
config = Key Prior CurrentWindow
repeat = 1
end

begin
prog = irxevent
button = KEY_NEXTSONG
config = Key Next CurrentWindow
repeat = 1
end

begin
prog = irxevent
button = KEY_VOLUMEUP
config = Key ctrl-plus CurrentWindow
repeat = 0
end

begin
prog = irxevent
button = KEY_VOLUMEDOWN
config = Key ctrl-minus CurrentWindow
repeat = 0
end

}}}

Note: If it doesnt work at the first time, execute the commands mannualy using Alt+F2:

{{{
gksu irexec & /home/fuz2y/.lircrc
gksu irxevent & /home/fuz2y/.lircrc
gksu /etc/rc.local
}}}

Also if you use VLC, go to Settings > Preferences > Interface > Control interfaces > Enable Infrared remote control interface; and Video > Output modules > click Advanced options > Select OpenGL video output. Restart VLC.

== Desktop ==

=== Fonts like Mac OS X ===

By default, Ubuntu uses a style of font rendering different than that used on Mac OS X. You may prefer fonts similar to those on Mac OS X, and you can have these on Ubuntu by doing the following:

1. Open the Appearance preference panel (System-Preferences-Appearance) 1. Click Fonts, and select the "Subpixel smoothing" option. 1. Click Details, and select "Slight" hinting. 1. Enjoy!

=== Compiz Fusion 0.6.0 from Sources with Emerald ===

First remove anything that is compiz related from Synaptic Package Manager or it wont work correctly!

Here's how to install latest compiz fusion from sources:

http://phorolinux.com/how-to-install-compiz-fusion-060-from-sources-on-ubuntu-710-gutsy-gibbon.html

To enable Compiz Fusion Icon do this:

{{{
sudo apt-get install git git-core compiz-dev
git-clone git://anongit.opencompositing.org/users/crdlb/fusion-icon
cd fusion-icon
make
sudo make install
}}}

=== Avant Window Navigator ===

To install AWN with nice Skins and Curves Effect follow this guide: http://ubuntuforums.org/showthread.php?t=572019

=== aMSN SVN with Tcl & TK 8.5 ===

Follow this guide, it's not my native language but i think anyone understands it: http://sevencapitalsins.wordpress.com/2007/08/28/amsn-svn/

if you get this error when amsn is opening "can't find package msgcat 1.4", do this:

{{{
wget http://ufpr.dl.sourceforge.net/sourceforge/tcl/tcl8.5b2-src.tar.gz
tar -vxf tcl8.5b2-src.tar.gz
sudo cp tcl8.5b2/library/msgcat/msgcat.tcl /usr/lib/tcl8.5
sudo cp tcl8.5b2/library/msgcat/pkgIndex.tcl /usr/lib/tcl8.5
}}}

== VMwarer Server & Bootcamp partitions ==
 
Installing VMWare Server on Ubuntu 7.10

1. Download VMware Server source from the VMware website: http://vmware.com/download/server/

2. Download this installer patch: http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update113.tar.gz ( source reference: http://igordevlog.blogspot.com/2007/07/vmware-in-ubuntu-gutsy-kernel-2622.html )

3. Extract all the archives to some location on your system (tar -zxvf VMware-server* ; tar -zxvf vmware*)

4. Ensure that you have build-essential installed in order to compile these sources (sudo aptitude install build-essential)

5. Install the xinetd server (sudo aptitude install xinetd)

6. Run sudo ./vmware-install.pl located within the vmware-server-* unpacked archive.

7. Select all the default options *EXCEPT* do not compile the modules at this point. (Do you want this program to try to build the vmmon module for your system? NO)

8. Run sudo ./runme.pl located within the vmware-any* archive. This will launch step 8.

9. Select the default options and this time answer YES to compile the proper modules.

10. Run vmware-server using the command vmware or via your Applications Menu.

Note: if you update your kernel you will need to re-run the scripts to regenerate and recompile VMware Server for your updated kernel.

== Troubleshooting ==

1. Compiz as some issues with ATI 8.42.3 driver, when compiz is enabled, i've notice that there's really huge bugs (black screen flickering) when watching movies or playing games, so disable compiz for any of those.

2. Also allready in the past i've been noticing that movie playback in linux (any distro that i've tested, using ati and nvidia cards) have some issues relative to vertical sync, like lack of smoothing in the passage of frames, like a little thin horizontal black lines that you notice if you'r really close to the monitor.

Please report here if you find any bugs or if you find something new that's usefull adding to the wiki ! :)

Ubuntu Gutsy on MacBook Pro - UPDATED!

Preface

This page describes installing Ubuntu 7.10 (Gutsy Gibbon) on MacBook Pro generation 1(CoreDuo) & 2(Core2Duo), and MacBook.

For the MacBook Pro generation 3(SantaRosa) you will need to read the wiki page https://wiki.ubuntu.com/MacBookPro/SantaRosa first for additional information and instructions.

For more information :

https://help.ubuntu.com/community/MacBook

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 ... and me Smile :)

Contact: Ubuntu community nickname Fuz2y / Fuz2yPt ; email/msn - fuz2y@netcabo.pt

Following is a list of other wiki's which provide details on running Linux on Macbook:

Mac OS X Installation

1. It may be useful to check for firmware update or run the hardware check...

2. Boot from the Mac OS X DVD by holding the Alt key on the gray screen.

3. Follow installation instruction.

Boot Menu installation

1. Boot from 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.

1. Install mac image

2. Copy EFI to root directory (drag EFI folder to MacOS disk)

3. Open a mac OS terminal (in utilities)

4. cd /efi/refit

5. ./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

1. Boot, in refit, choose the Windows DVD.

2. Launch Install, format Bootcamp partition with NTFS file system and procede with the installer, at reboot choose the Windows Hard Disk.

3. Install drivers from Apple Mac OS X 10.5 DVD

Install Linux Ubuntu

1. Boot on Ubuntu Live CD (Question: Which one? 32bit or 64bit? Core2* are 64 bit CPUs)

2. Click install on disk in Ubuntu

3. Choose a manual partition : Select Linux Partition and check out the format box option (as ext3 filesystem)

  • - Do not erase or format anything else!!!

4. Define mount :

  • - If possible, do not mount /mount/EFI (select white item in list) - Mount Linux partition as: / - Mount Windows partition as: /media/Windows

5. Click on Advanced Options before proceding with the installaton and modify Grub to install on (hd0,2)

Swap File

This is useful if you already have too many partitions on your macbook and want to put the swap file directly on the main / partition.

Code:

sudo /bin/bash

dd if=/dev/zero of=/swapfile bs=1024 count=2048000
mkswap /swapfile
swapon /swapfile

Edit /etc/fstab:

/swapfile               swap                    swap    defaults        0 0

Note: You can use suspend on disk with a swapfile. To do that we have to add an option passed to the kernel. Add the resume=/dev/<partition> resume_offset=<offset to the swapfile in blocks> :

sudo filefrag -v /swapfile
#output : First block: 102300
#...

Copy the first block number of the swapfile (ex:102300) and edit the defoptions line of /boot/grub/menu.lst :

defoptions=quiet splash resume=/dev/sda3 resume_offset=102300

On this example, the swapfile is on partition /dev/sda3. You are now able to use suspend on disk (hibernate).

Video

Install ATI's Catalyst official drivers 8.42.3 with AIGLX working!! thanks to the poster of this forum topic : 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.. so take special attention to step 11 . Also if you got the error of "LibGL.so.1" do this:

sudo ln -f /usr/lib/libGL.so.1.2 /usr/lib/libGL.so.1

*Note: If you get a white screen, then the driver are not correctly installed by some reason, edit /etc/X11/xorg.conf and disable composite extension, reinstall the ati driver, and reenable composite.

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 

Screen Colors

I've noticed that many MacBooks really need this tweak in order to visualize correctly screen colors. To calibrate the screen colors (in order to match OS X), you need to install xcalib. This isn't available in the Ubuntu repositories, so you'll have to download it.

Go to http://www.etg.e-technik.uni-erlangen.de/web/doe/xcalib/ and (if you are running i386) download the newest Linux binary; save it to the Desktop. (If you are running amd64, you'll need to compile it from source; make sure to install libxxf86vm-dev and libxext-dev first, and then simply make xcalib in the extracted source directory. Take the resulting xcalib binary and continue with these instructions.)

To install and configure it, you will need to do a few things in the terminal and mount a Mac OS X partition (to copy your color profile) as follows (substitute your Mac OS partition's partition number for x in /dev/sdax, 2 being the first standard partition):

sudo mv ~/Desktop/xcalib /usr/local/bin/xcalib
sudo chmod 755 /usr/local/bin/xcalib
sudo mount -t hfsplus /dev/sdax /mnt
sudo cp /mnt/Library/ColorSync/Profiles/Displays/* /usr/local/etc

Then, do an "ls /usr/local/etc" and note the name of the profile (for the next step).

Finally, add the following line to the end of either /etc/gdm/Init/Default (for standard Ubuntu/Gnome) or /etc/kde3/kdm/Xsetup (for Kubuntu/KDE), before the final "exit" statement:

/usr/local/bin/xcalib "/usr/local/etc/<insert name of profile here>"

Restart X (Ctrl-Alt-Backspace) and your Mac OS X color profile will load as X starts.

Suspend / Resume

The proprietary driver from ATI (including the latest, 8.433 AKA 7.11) does not work with the default Gutsy kernel due to the use of the SLUB allocator.

Kernel

In order to get suspend working correctly you will need to compile your own version of the Gutsy kernel and choose the SLAB allocator. I'm sure there are 'Debian' ways to do this, maybe someone else can modify this section.

  sudo apt-get install linux-source libncurses5-dev build-essential
  cd /usr/src/
  sudo tar -xvjpf linux-source-2.6.22.tar.bz2
  sudo ln -sf linux-source-2.6.22 linux
  cd linux
  sudo cp /boot/config-2.6.22-14-generic .config
  sudo make menuconfig

In the menu, browse to 'General setup', then select 'Choose SLAB allocator' at the last entry. Change this from SLUB to SLAB (you could also change the CPU from 586 to Prescott/Core2 if you like). Exit and save your changes.

Now, build the kernel:

  sudo make -j2
  sudo make modules -j2
  sudo make modules_install
  sudo make install

You should now have a new vmlinuz entry under /boot/ and kernel modules under /lib/modules/ (version at time of writing is 2.6.22.9).

Initramfs

Build your initramfs for this kernel

  sudo ln -sf /lib/firmware/2.6.22-14-generic /lib/firmware/2.6.22.9
  sudo update-initramfs -c -k 2.6.22.9

Boot loader

Simply copy the current entry for the Gutsy kernel and change the initramfs and kernel from '2.6.22-14-generic' to '2.6.22.9'. You might also like to give it a different title, like 'Ubuntu, custom kernel 2.6.22.9'. Everything else can stay the same! If you want to boot this by default, also modify the 'default' entry in menu.lst.

External modules

You will need to build new drivers for ATI and alsa, but first boot to your new kernel.

Once you are running your new kernel you can build these drivers. First get the required packages.

  sudo apt-get install module-assistant fakeroot dh-make debhelper debconf libstdc++5 linux-headers-generic
  sudo m-a prepare

Alsa:

  sudo apt-get install alsa-source
  sudo m-a build,install alsa

FGLRX: Follow the instructions that worked for you, either above, or from the unofficial ATI wiki at http://wiki.cchtml.com/index.php/Ubuntu_Gutsy_Installation_Guide#Method_2:_Install_the_Catalyst_7.11_Driver_Manually

Update modules db:

  sudo depmod -a

Now, you should have the FGLRX and alsa drivers under your new /lib/modules/2.6.22.9/ location.

ACPI configuration

You will need to make a slight change to the acpi-support config files to get resume to work correctly.

Open /etc/default/acpi-support your favourite text editor and change to POST_VIDEO variable to false, i.e. {{{POST_VIDEO=false }}}

You should now be able to successfully suspend and resume!

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.

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

CPU Settings

I've only tested this on MacBook Pro generation 2(Core2Duo), so contribute here please! =)

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

and then in terminal type:

sudo apt-get install cpufrequtils

after that restart the PC.

Temperatures & Fan Speed

Hard Disk Temperature

sudo apt-get install hddtemp
sudo hddtemp  /dev/sda

That prints the temperature of your harddisk

CPUs Temperature

In terminal console type :

sudo apt-get install lm-sensors

sensors

That prints temperatures of both CPUs and Fan Speed

Fan Speed Control

This is the only way it seems to work correctly, I've tried other guides and it didnt adjust the fans speed, so here it goes:

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

To set it mannualy without restarting, do this: sudo /etc/rc.local

Note: 3000 = 3000RPM , type "sensors" on a terminal to see the resulting temperatures, you can also set it between 2000 (almost noise-less) and a max of 6000 (very noisy), I recommend setting fans to 4000RPM when playing 3D games or so.

Reducing power consumption

Install the powertop package :

sudo apt-get install powertop

and run with "sudo powertop" in a terminal. Follow the instructions given as to reducing power consumption.

WebCam (iSight) & aMSN

Install v4l2 plugin:

sudo apt-get install libpt-plugins-v4l2

See Below in Desktop Tab how to install aMSN with tk/tcl-8.5 from sources, then go to aMSN > Preferences > Other > Edit audio and video settings.

Access Mac OS X & Windows Partition

To do so edit /etc/fstab , here's mine :

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

proc            /proc           proc    defaults        0       0

## Linux #################################################################

/dev/sda3       /    ext3   defaults,errors=remount-ro  0       1

## Swap ##################################################################

/swapfile       swap            swap    defaults        0       0

## EFI ###################################################################

#/dev/sda1      /media/EFI     vfat  defaults,utf8,umask=007,gid=46  0 1

## DVD-ROM ###############################################################

/dev/scd0       /media/cdrom0    udf,iso9660  user,noauto,exec 0       0

## Macintosh #############################################################

/dev/sda2       /media/Macintosh     hfsplus      defaults  0  0

## Windows ###############################################################

/dev/sda4       /media/Windows       ntfs         defaults  0  0

## Network ###############################################################

# Server

//Server/public /media/Server smbfs username=USER,password=PASSWORD 0 0

# Lacie 2TB

//Lacie2TB/public /media/Lacie2TB smbfs username=USER,password=PASSWORD 0 0

Then do the following in terminal:

sudo /bin/bash

mkdir /media/Macintosh
mkdir /media/Windows
chmod 777 /media/Macintosh
chmod 777 /media/Windows
umount -a
mount -a

Apple Remote Control

Apple's Remote Control is working by default in Ubuntu 7.10, but only allows you to control the Volume. So here's the tweaks to get it working on with other applications:

sudo apt-get install inputlirc lirc lirc-x

And edit /etc/rc.local and add:

/etc/init.d/inputlirc start
/etc/init.d/inputlirc restart

Then go to > System > Preferences > Sessions , and add the following to the Startup list by this order:

sudo irexec & /home/YOURACCOUNT/.lircrc   
sudo irxevent & /home/YOURACCOUNT/.lircrc
sudo /etc/rc.local

And copy the following to /home/YOURACCOUNT/.lircrc file : Note : YOURACCOUNT = your user name

##################################################
# LIRC Config for the following Applications:
##################################################

#############
#### VLC ####
#############

begin
prog = vlc
button = KEY_PLAYPAUSE
config = key-play-pause
repeat = 0
end

begin
prog = vlc
button = KEY_MENU
config = key-aspect-ratio
repeat = 0
end

begin
prog = vlc
button = KEY_PREVIOUSSONG
config = key-jump-medium
repeat = 1
end

begin
prog = vlc
button = KEY_NEXTSONG
config = key-jump+medium
repeat = 1
end
begin
prog = vlc
button = KEY_VOLUMEUP
config = 
repeat = 1
end

begin
prog = vlc
button = KEY_VOLUMEDOWN
config = 
repeat = 1
end

#################
#### MPlayer ####
#################

#begin mplayer
begin
prog = mplayer
button = KEY_PLAYPAUSE
config = pause
repeat = 15
end

begin
prog = mplayer
button = KEY_MENU
config = stop
repeat = 15
end

begin
prog = mplayer
button = KEY_PREVIOUSSONG
config = seek -10
repeat = 10
end

begin
prog = mplayer
button = KEY_NEXTSONG
config = seek +10
repeat = 10
end
begin
prog = mplayer
button = KEY_VOLUMEUP
config = volume 1
repeat = 1
end

begin
prog = mplayer
button = KEY_VOLUMEDOWN
config = volume -1
repeat = 1
end
#end mplayer


##################
#### Kaffeine ####
##################

#begin kaffeine
begin
prog = irexec
button =
config = dcop kaffeine MainApplication-Interface
end

begin
prog = irexec
button = KEY_PLAYPAUSE
config = if `dcop kaffeine KaffeineIface isPlaying`; then dcop kaffeine KaffeineIface pause; dcop kaffeine kaffeine_mainview hide; else dcop kaffeine KaffeineIface play; dcop kaffeine kaffeine_mainview hide; fi
end

begin
prog = irexec
button = KEY_MENU
repeat = 1
config = dcop kaffeine KaffeineIface stop
end

begin
prog = irexec
button = KEY_NEXTSONG
repeat = 1
config = dcop kaffeine KaffeineIface posPlus
end

begin
prog = irexec
button = KEY_PREVIOUSSONG
repeat = 1
config = dcop kaffeine KaffeineIface posMinus
end

begin
prog = irexec
button = KEY_VOLUMEUP
repeat = 1
config = dcop kaffeine KaffeineIface volUp
end

begin
prog = irexec
button = KEY_VOLUMEDOWN
repeat = 1
config = dcop kaffeine KaffeineIface volDown
end

#end kaffeine


################
#### Amarok ####
################

#begin amarok
begin
prog = irexec
button = KEY_PLAYPAUSE
config = dcop amarok player playPause
end

begin
prog = irexec
button = KEY_MENU
config = dcop amarok player stop
end

begin
prog = irexec
button = KEY_NEXTSONG
config = dcop amarok player next
end

begin
prog = irexec
button = KEY_PREVIOUSSONG
config = dcop amarok player prev
end

begin
prog = irexec
button = KEY_VOLUMEUP
repeat = 1
config = dcop amarok player volumeUp
end

begin
prog = irexec
button = KEY_VOLUMEDOWN
repeat = 1
config = dcop amarok player volumeDown
end
#end amarok


###############
#### Totem ####
###############

begin
prog = irxevent
button = KEY_PLAYPAUSE
config = Key p Totem
repeat = 0
end

begin
prog = irexec
button = KEY_MENU
config = stop
repeat = 0
end

begin
prog = Totem
button = KEY_NEXTSONG
config = seek_forward
repeat = 0
end

begin
prog = Totem
button = KEY_PREVIOUSSONG
config = seek_backward
repeat = 0
end

begin
prog = irexec
button = KEY_VOLUMEUP
repeat = 10
config =
end

begin
prog = irexec
button = KEY_VOLUMEDOWN
repeat = 10
config =
end



###################
#### Audacious ####
###################

begin
prog = audacious
button = KEY_PLAYPAUSE
config = PAUSE
repeat = 16
end

begin
prog = audacious
button = KEY_MENU
config = STOP
repeat = 0
end

begin
prog = audacious
button = KEY_NEXTSONG
config = NEXT
repeat = 16
end

begin
prog = audacious
button = KEY_PREVIOUSSONG
config = PREV
repeat = 16
end


##############
#### XMMS ####
##############

begin
prog = xmms
button = KEY_PLAYPAUSE
config = pause
end

begin
prog = xmms
button = KEY_MENU
config = stop
end

begin
prog = xmms
button = KEY_NEXTSONG
config = next
repeat = 16
end

begin
prog = xmms
button = KEY_PREVIOUSSONG
config = prev
repeat = 16
end

begin
prog = xmms
button = KEY_VOLUMEUP
config = fwd 5
repeat = 10
end

begin
prog = xmms
button = KEY_VOLUMEDOWN
config = bwd 5
repeat = 10
end


###############
##### XdTV ####
###############

begin
prog = irexec
button = KEY_PLAYPAUSE
config = record
repeat = 0
end

begin
prog = irexec
button = KEY_PREVIOUSSONG
config = setstation prev
repeat = 0
end

begin
prog = irexec
button = KEY_PNEXTSONG
config = setstation next
repeat = 0
end

################
#### TVtime ####
################

#begin tvtime

begin
prog = irexec
button = KEY_PLAYPAUSE
config = tvtime-command ENTER
end

begin
prog = irexec
button = KEY_MENU
config = tvtime-command TOGGLE_FULLSCREEN
end

begin
prog = irexec
button = KEY_NEXTSONG
config = tvtime-command UP
repeat = 1
end
begin
prog = irexec
button = KEY_PREVIOUSSONG
config = tvtime-command DOWN
repeat = 1
end
begin
prog = irexec
button = KEY_VOLUMEUP
config = tvtime-command RIGHT
repeat = 2
end
begin
prog = irexec
button = KEY_VOLUMEDOWN
config = tvtime-command LEFT
repeat = 2
end

#begin
# prog = irexec
# button = middle
# config = tvtime-command CHANNEL_JUMP
# repeat = 1
#end

#end tvtime


##############################################
#### Evince y OpenOffice (Presentations) ####
##############################################

begin
prog = irxevent
button = KEY_PLAYPAUSE
config = Key F11 CurrentWindow
config = Key F5 CurrentWindow
repeat = 0
end

begin
prog = irxevent
button = KEY_MENU
config = Key Escape CurrentWindow
repeat = 0
end

begin
prog = irxevent
button = KEY_PREVIOUSSONG
config = Key Prior CurrentWindow
repeat = 1
end

begin
prog = irxevent
button = KEY_NEXTSONG
config = Key Next CurrentWindow
repeat = 1
end

begin
prog = irxevent
button = KEY_VOLUMEUP
config = Key ctrl-plus CurrentWindow
repeat = 0
end

begin
prog = irxevent
button = KEY_VOLUMEDOWN
config = Key ctrl-minus CurrentWindow
repeat = 0
end

Note: If it doesnt work at the first time, execute the commands mannualy using Alt+F2:

gksu irexec & /home/fuz2y/.lircrc
gksu irxevent & /home/fuz2y/.lircrc
gksu /etc/rc.local

Also if you use VLC, go to Settings > Preferences > Interface > Control interfaces > Enable Infrared remote control interface; and Video > Output modules > click Advanced options > Select OpenGL video output. Restart VLC.

Desktop

Fonts like Mac OS X

By default, Ubuntu uses a style of font rendering different than that used on Mac OS X. You may prefer fonts similar to those on Mac OS X, and you can have these on Ubuntu by doing the following:

1. Open the Appearance preference panel (System-Preferences-Appearance) 1. Click Fonts, and select the "Subpixel smoothing" option. 1. Click Details, and select "Slight" hinting. 1. Enjoy!

Compiz Fusion 0.6.0 from Sources with Emerald

First remove anything that is compiz related from Synaptic Package Manager or it wont work correctly!

Here's how to install latest compiz fusion from sources:

http://phorolinux.com/how-to-install-compiz-fusion-060-from-sources-on-ubuntu-710-gutsy-gibbon.html

To enable Compiz Fusion Icon do this:

sudo apt-get install git git-core compiz-dev
git-clone git://anongit.opencompositing.org/users/crdlb/fusion-icon
cd fusion-icon
make
sudo make install 

Avant Window Navigator

To install AWN with nice Skins and Curves Effect follow this guide: http://ubuntuforums.org/showthread.php?t=572019

aMSN SVN with Tcl & TK 8.5

Follow this guide, it's not my native language but i think anyone understands it: http://sevencapitalsins.wordpress.com/2007/08/28/amsn-svn/

if you get this error when amsn is opening "can't find package msgcat 1.4", do this:

wget http://ufpr.dl.sourceforge.net/sourceforge/tcl/tcl8.5b2-src.tar.gz
tar -vxf tcl8.5b2-src.tar.gz
sudo cp tcl8.5b2/library/msgcat/msgcat.tcl /usr/lib/tcl8.5
sudo cp tcl8.5b2/library/msgcat/pkgIndex.tcl /usr/lib/tcl8.5

VMwarer Server & Bootcamp partitions

Installing VMWare Server on Ubuntu 7.10

1. Download VMware Server source from the VMware website: http://vmware.com/download/server/

2. Download this installer patch: http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update113.tar.gz ( source reference: http://igordevlog.blogspot.com/2007/07/vmware-in-ubuntu-gutsy-kernel-2622.html )

3. Extract all the archives to some location on your system (tar -zxvf VMware-server* ; tar -zxvf vmware*)

4. Ensure that you have build-essential installed in order to compile these sources (sudo aptitude install build-essential)

5. Install the xinetd server (sudo aptitude install xinetd)

6. Run sudo ./vmware-install.pl located within the vmware-server-* unpacked archive.

7. Select all the default options *EXCEPT* do not compile the modules at this point. (Do you want this program to try to build the vmmon module for your system? NO)

8. Run sudo ./runme.pl located within the vmware-any* archive. This will launch step 8.

9. Select the default options and this time answer YES to compile the proper modules.

10. Run vmware-server using the command vmware or via your Applications Menu.

Note: if you update your kernel you will need to re-run the scripts to regenerate and recompile VMware Server for your updated kernel.

Troubleshooting

1. Compiz as some issues with ATI 8.42.3 driver, when compiz is enabled, i've notice that there's really huge bugs (black screen flickering) when watching movies or playing games, so disable compiz for any of those.

2. Also allready in the past i've been noticing that movie playback in linux (any distro that i've tested, using ati and nvidia cards) have some issues relative to vertical sync, like lack of smoothing in the passage of frames, like a little thin horizontal black lines that you notice if you'r really close to the monitor.

Please report here if you find any bugs or if you find something new that's usefull adding to the wiki ! Smile :)

MacBookPro (last edited 2008-08-06 17:00:24 by localhost)