Macbook

De doc.ubuntu-es
(Diferencias entre revisiones)
Saltar a: navegación, buscar
(Instrucciones básicas: wikifico)
(un poco de estilo)
 
Línea 2: Línea 2:
  
 
[[Imagen:SPEngUs2.png]] Página traduciendose de la documentación original https://help.ubuntu.com/community/MacBook?highlight=(macbook)
 
[[Imagen:SPEngUs2.png]] Página traduciendose de la documentación original https://help.ubuntu.com/community/MacBook?highlight=(macbook)
 
 
----
 
----
  
 
+
Esta guía le ayudará con los pasos necesarios para la '''instalación de Ubuntu en un MacBook'''. Esta guía ha sido realizada para Ubuntu 7.10 (Gutsy Gibbon), pero está siendo adaptada para Ubuntu 8.04 (Hardy Heron).
= Como instalar Ubuntu en un Macbook =
+
 
+
Esta guía le ayudará con los pasos necesarios para la instalación de Ubuntu en un MacBook. Esta guía ha sido realizada para Ubuntu 7.10 (Gutsy Gibbon), pero está siendo adaptada para Ubuntu 8.04 (Hardy heron).
+
  
 
Si tienes un MacBook Pro te recomendamos que veas esta otra guía: https://wiki.ubuntu.com/MacBookPro, tenga en cuenta que es casi todo igual , aunque esta página es tambien relevante.
 
Si tienes un MacBook Pro te recomendamos que veas esta otra guía: https://wiki.ubuntu.com/MacBookPro, tenga en cuenta que es casi todo igual , aunque esta página es tambien relevante.
Línea 22: Línea 18:
  
 
== Instrucciones básicas ==
 
== Instrucciones básicas ==
 +
 
# Actualizar el software de tu sistema Mac Os X [http://www.apple.com/support/downloads/ firmware] a la versión más reciente.<br> Tambien puede hacerlo de la manera estandard pulsando en la manzana y luego "Actualización de software"<br>(Accesible desde el escritorio de su sistema Mac OS X)<br>
 
# Actualizar el software de tu sistema Mac Os X [http://www.apple.com/support/downloads/ firmware] a la versión más reciente.<br> Tambien puede hacerlo de la manera estandard pulsando en la manzana y luego "Actualización de software"<br>(Accesible desde el escritorio de su sistema Mac OS X)<br>
 
# Baja tu Ubuntu [http://www.ubuntu.com/getubuntu/download Live CD]. Para los primeros Macbooks tu debes seleccionar `i386`; Para los  Macbooks Core 2 Duo <br>(posterioes a 2006) puedes seleccionar `amd64` si tu estás interesado en arrancar a 64-bit OS,si no seleccionar ` i386`.
 
# Baja tu Ubuntu [http://www.ubuntu.com/getubuntu/download Live CD]. Para los primeros Macbooks tu debes seleccionar `i386`; Para los  Macbooks Core 2 Duo <br>(posterioes a 2006) puedes seleccionar `amd64` si tu estás interesado en arrancar a 64-bit OS,si no seleccionar ` i386`.
Línea 39: Línea 36:
 
# Siga las instrucciones que aparecen a continuación para configurar los distintos componentes de hardware que no funciona de forma estandard en Gutsy.
 
# Siga las instrucciones que aparecen a continuación para configurar los distintos componentes de hardware que no funciona de forma estandard en Gutsy.
  
== Sound ==
+
== Sonido ==
  
 
Sound on MacBooks is provided by an Intel HDA-based integrated chipset, and should work out-of-the-box. However, in Ubuntu 8.04 alsa drivers 1.0.15 will not work with some chipsets, like SigmaTel STAC9221. In such cases everything seems to work fine but no sound is present (even unmuting all controls). Alsa drivers 1.0.16 should work fine, to install them:
 
Sound on MacBooks is provided by an Intel HDA-based integrated chipset, and should work out-of-the-box. However, in Ubuntu 8.04 alsa drivers 1.0.15 will not work with some chipsets, like SigmaTel STAC9221. In such cases everything seems to work fine but no sound is present (even unmuting all controls). Alsa drivers 1.0.16 should work fine, to install them:
  
{{{
+
sudo apt-get install build-essential linux-headers-$(uname -r) module-assistant alsa-source
sudo apt-get install build-essential linux-headers-$(uname -r) module-assistant alsa-source
+
sudo dpkg-reconfigure alsa-source
sudo dpkg-reconfigure alsa-source
+
sudo module-assistant a-i  alsa-source
sudo module-assistant a-i  alsa-source
+
}}}
+
  
 
This may disable Madwifi drivers for the wireless card, hence you want to compile alsa first.
 
This may disable Madwifi drivers for the wireless card, hence you want to compile alsa first.
Línea 56: Línea 51:
  
 
1. Add the following line to /etc/modprobe.d/alsa-base:
 
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
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.
 
2. Increase the volume (both using the key combination and the system tray applet) to its maximum possible value.
Línea 67: Línea 60:
  
 
The above setting changes (step 3 and 4) can be done via the command line using these two gconftool-2 commands:
 
The above setting changes (step 3 and 4) can be done via the command line using these two gconftool-2 commands:
{{{
+
gconftool-2 --type list --list-type string --set /desktop/gnome/sound/default_mixer_tracks [PCM]
gconftool-2 --type list --list-type string --set /desktop/gnome/sound/default_mixer_tracks [PCM]
+
gconftool-2 --type string  --set /apps/panel/applets/mixer_screen0/prefs/active-track PCM
gconftool-2 --type string  --set /apps/panel/applets/mixer_screen0/prefs/active-track PCM
+
}}}
+
  
 
Step 1. may be necessary in Hardy even if you don't appreciate this issue.
 
Step 1. may be necessary in Hardy even if you don't appreciate this issue.
Línea 94: Línea 85:
 
The above settings, minus the 1/3 volume level setting, can be toggled using the below commands:
 
The above settings, minus the 1/3 volume level setting, can be toggled using the below commands:
  
{{{
+
gconftool-2 --set /apps/gnome-volume-control/HDAIntelAlsamixerMux --type bool 1
gconftool-2 --set /apps/gnome-volume-control/HDAIntelAlsamixerMux --type bool 1
+
gconftool-2 --set /apps/gnome-volume-control/HDAIntelAlsamixerPCM --type bool 1
gconftool-2 --set /apps/gnome-volume-control/HDAIntelAlsamixerPCM --type bool 1
+
gconftool-2 --set /apps/gnome-volume-control/HDAIntelAlsamixerInputSource --type bool 1
gconftool-2 --set /apps/gnome-volume-control/HDAIntelAlsamixerInputSource --type bool 1
+
}}}
+
  
 
== Wireless ==
 
== Wireless ==
Línea 109: Línea 98:
  
 
Using daily snapshots:
 
Using daily snapshots:
{{{
+
sudo apt-get install build-essential autoconf automake
sudo apt-get install build-essential autoconf automake
+
wget http://snapshots.madwifi.org/madwifi-trunk-current.tar.gz
wget http://snapshots.madwifi.org/madwifi-trunk-current.tar.gz
+
tar -zxvf madwifi-trunk-current.tar.gz
tar -zxvf madwifi-trunk-current.tar.gz
+
cd madwifi-trunk-r*
cd madwifi-trunk-r*
+
make
make
+
sudo make install-modules
sudo make install-modules
+
echo -e '#!/bin/sh\n/sbin/iwpriv ath0 bgscan 0' | sudo tee -a /etc/acpi/resume.d/99-madwifi-bgscan.sh
echo -e '#!/bin/sh\n/sbin/iwpriv ath0 bgscan 0' | sudo tee -a /etc/acpi/resume.d/99-madwifi-bgscan.sh
+
sudo chmod 755 /etc/acpi/resume.d/99-madwifi-bgscan.sh
sudo chmod 755 /etc/acpi/resume.d/99-madwifi-bgscan.sh
+
}}}
+
  
 
Alternatively, using Subversion (be patient with the checkout, it may take a while):
 
Alternatively, using Subversion (be patient with the checkout, it may take a while):
{{{
+
sudo apt-get install build-essential subversion autoconf automake
sudo apt-get install build-essential subversion autoconf automake
+
svn co http://svn.madwifi.org/madwifi/trunk madwifi
svn co http://svn.madwifi.org/madwifi/trunk madwifi
+
cd madwifi
cd madwifi
+
make
make
+
sudo make install-modules
sudo make install-modules
+
echo -e '#!/bin/sh\n/sbin/iwpriv ath0 bgscan 0' | sudo tee -a /etc/acpi/resume.d/99-madwifi-bgscan.sh
echo -e '#!/bin/sh\n/sbin/iwpriv ath0 bgscan 0' | sudo tee -a /etc/acpi/resume.d/99-madwifi-bgscan.sh
+
sudo chmod 755 /etc/acpi/resume.d/99-madwifi-bgscan.sh
sudo chmod 755 /etc/acpi/resume.d/99-madwifi-bgscan.sh
+
}}}
+
  
 
At this point the driver should be installed and will be enabled after a reboot. Alternatively, you can skip the reboot and use the following commands to insert the driver into the running kernel:  
 
At this point the driver should be installed and will be enabled after a reboot. Alternatively, you can skip the reboot and use the following commands to insert the driver into the running kernel:  
{{{
+
sudo modprobe ath_pci
sudo modprobe ath_pci
+
sudo iwpriv ath0 bgscan 0
sudo iwpriv ath0 bgscan 0
+
}}}
+
  
 
Additionally, the Mad``Wifi drivers are sometimes unstable under certain circumstances when using the standard NetworkManager tool for managing networks.  Because of these reasons, you may want to disable the drivers if you aren't using wireless.  To do this, edit the /etc/modprobe.d/blacklist file and add "blacklist ath_pci" at the bottom.  Additionally, you can deselect the Atheros HAL in the Restricted Manager (System-Administration-Restricted Drivers Manager).
 
Additionally, the Mad``Wifi drivers are sometimes unstable under certain circumstances when using the standard NetworkManager tool for managing networks.  Because of these reasons, you may want to disable the drivers if you aren't using wireless.  To do this, edit the /etc/modprobe.d/blacklist file and add "blacklist ath_pci" at the bottom.  Additionally, you can deselect the Atheros HAL in the Restricted Manager (System-Administration-Restricted Drivers Manager).
  
 
To disallow replacement of just installed modules by installing linux-restricted-modules package update you can edit /etc/default/linux-restricted-modules-common and insert ath_hal into DISABLED_MODULES list:
 
To disallow replacement of just installed modules by installing linux-restricted-modules package update you can edit /etc/default/linux-restricted-modules-common and insert ath_hal into DISABLED_MODULES list:
{{{
+
sudo sed -i~ -e 's/^\(DISABLED_MODULES="\)\(.*"\)/\1ath_hal \2/' -e 's/ "$/"/' /etc/default/linux-restricted-modules-common
sudo sed -i~ -e 's/^\(DISABLED_MODULES="\)\(.*"\)/\1ath_hal \2/' -e 's/ "$/"/' /etc/default/linux-restricted-modules-common
+
}}}
+
  
 
More information can be obtained at
 
More information can be obtained at
Línea 150: Línea 131:
  
 
=== Ndiswrapper ===
 
=== Ndiswrapper ===
 +
 
If you instead want to use ndiswrapper to use the Windows wireless drivers on Ubuntu (only for 32-bit) these are the instructions:  
 
If you instead want to use ndiswrapper to use the Windows wireless drivers on Ubuntu (only for 32-bit) these are the instructions:  
  
 
You have to have the XP drivers on your hard disk.  If you don't have a Windows XP installation on an alternate partition, you can get the drivers from the Boot Camp driver disk.  The drivers from the Boot Camp disk can be uncompressed using the non-free unrar in the multiverse repository:
 
You have to have the XP drivers on your hard disk.  If you don't have a Windows XP installation on an alternate partition, you can get the drivers from the Boot Camp driver disk.  The drivers from the Boot Camp disk can be uncompressed using the non-free unrar in the multiverse repository:
* Enable multiverse ( see https://help.ubuntu.com/community/Repositories/Ubuntu )  
+
* Enable multiverse (see https://help.ubuntu.com/community/Repositories/Ubuntu)  
* Install the packages {{{rar unrar}}} (actually only unrar is truly necessary)
+
* Install the packages {{{rar unrar}}} (actually only unrar is truly necessary)
* Uncompress the Windows XP Atheros driver installer:
+
* Uncompress the Windows XP Atheros driver installer:
  
{{{
+
mkdir ~/atheros
mkdir ~/atheros
+
unrar x atherosxpinstaller.exe ~/atheros/
unrar x atherosxpinstaller.exe ~/atheros/
+
}}}
+
  
* Install the atheros drivers using ndiswrapper:
+
Install the atheros drivers using ndiswrapper:
{{{
+
sudo apt-get install ndiswrapper-utils-1.8
sudo apt-get install ndiswrapper-utils-1.8
+
  
#install the driver into ndiswrapper:
+
Install the driver into ndiswrapper:
sudo ndiswrapper -i "~/atheros/net5416.inf"
+
sudo ndiswrapper -i "~/atheros/net5416.inf"
#--or--
+
Or:
sudo mount /dev/sda4 /mnt
+
sudo mount /dev/sda4 /mnt
sudo ndiswrapper -i "/mnt/Program Files/Macintosh Drivers for Windows XP 1.1.2/net5416/net5416.inf"
+
sudo ndiswrapper -i "/mnt/Program Files/Macintosh Drivers for Windows XP 1.1.2/net5416/net5416.inf"
  
sudo modprobe ndiswrapper
+
sudo modprobe ndiswrapper
sudo echo >> /etc/modules "ndiswrapper"
+
sudo echo >> /etc/modules "ndiswrapper"
sudo umount /mnt
+
sudo umount /mnt
}}}
+
  
Reference: http://paulglover.net/20061210/triple-booting-macbook-os-x-ubuntu-edgy-windows-xp/
+
Fuente: http://paulglover.net/20061210/triple-booting-macbook-os-x-ubuntu-edgy-windows-xp/
  
 
=== Wicd ===
 
=== Wicd ===
Línea 195: Línea 173:
 
Due to these issues, you may want to disable auto-dimming.  This can be done by opening the Gconf Editor (gconf-editor in a Terminal will open it), and unchecking the key "enable" in "apps/gnome-power-manager/backlight".  If at a later time you want to re-enable this feature (i.e. if the bug is fixed in a future update) simply return to this key and check it instead of unchecking it.
 
Due to these issues, you may want to disable auto-dimming.  This can be done by opening the Gconf Editor (gconf-editor in a Terminal will open it), and unchecking the key "enable" in "apps/gnome-power-manager/backlight".  If at a later time you want to re-enable this feature (i.e. if the bug is fixed in a future update) simply return to this key and check it instead of unchecking it.
  
** Easy fix for Macbook Pro Gutsy
+
'''Easy fix for Macbook Pro Gutsy'''
  
 
I simply went into System > Preferences > Power Management
 
I simply went into System > Preferences > Power Management
1) I unchecked "Dim Display when idle"
+
# I unchecked "Dim Display when idle"
2) In the "On Battery Power" tab, uncheck "Dim Display when idle"
+
# In the "On Battery Power" tab, uncheck "Dim Display when idle"
3) in the "General" tab, uncheck "use ambient light to adjust LCD brightness" <<-- This seems to be the main problem, but I kept the other two unchecked just to be sure ;-)
+
# in the "General" tab, uncheck "use ambient light to adjust LCD brightness" <<-- This seems to be the main problem, but I kept the other two unchecked just to be sure ;-)
  
 
== Suspend ==
 
== Suspend ==
Línea 206: Línea 184:
 
Suspend is broken in Ubuntu 7.10 on many first-generation MacBooks as well as some later-generation MacBooks and MacBook Pros [https://bugs.launchpad.net/bugs/151016 #151016].  In particular, these machines will go into suspend, but will not come out of suspend.  This is because the 32bit kernel supplied with 7.10 has some issues which prevent this from working (the x86_64 kernel works correctly out of the box). 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.
 
Suspend is broken in Ubuntu 7.10 on many first-generation MacBooks as well as some later-generation MacBooks and MacBook Pros [https://bugs.launchpad.net/bugs/151016 #151016].  In particular, these machines will go into suspend, but will not come out of suspend.  This is because the 32bit kernel supplied with 7.10 has some issues which prevent this from working (the x86_64 kernel works correctly out of the box). 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.
  
https://launchpad.net/ubuntu/gutsy/i386/linux-image-2.6.22-12-generic/2.6.22-12.39
+
https://launchpad.net/ubuntu/gutsy/i386/linux-image-2.6.22-12-generic/2.6.22-12.39
https://launchpad.net/ubuntu/gutsy/i386/linux-headers-2.6.22-12/2.6.22-12.39
+
https://launchpad.net/ubuntu/gutsy/i386/linux-headers-2.6.22-12/2.6.22-12.39
https://launchpad.net/ubuntu/gutsy/i386/linux-headers-2.6.22-12-generic/2.6.22-12.39
+
https://launchpad.net/ubuntu/gutsy/i386/linux-headers-2.6.22-12-generic/2.6.22-12.39
https://launchpad.net/ubuntu/gutsy/i386/linux-ubuntu-modules-2.6.22-12-generic/2.6.22-12.32
+
https://launchpad.net/ubuntu/gutsy/i386/linux-ubuntu-modules-2.6.22-12-generic/2.6.22-12.32
https://launchpad.net/ubuntu/gutsy/i386/linux-restricted-modules-2.6.22-12-generic/2.6.22.4-12.3
+
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).
 
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).
Línea 217: Línea 195:
  
 
Alternatively, users who prefer a newer kernel to an older one can install the 2.6.24 kernel packages from the upcoming Ubuntu 8.04 release by adding the hardy repositories to their software sources:
 
Alternatively, users who prefer a newer kernel to an older one can install the 2.6.24 kernel packages from the upcoming Ubuntu 8.04 release by adding the hardy repositories to their software sources:
{{{
+
deb http://archive.ubuntu.com/ubuntu/ hardy main restricted
deb http://archive.ubuntu.com/ubuntu/ hardy main restricted
+
deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted
+
deb http://security.ubuntu.com/ubuntu hardy-security main restricted
deb http://security.ubuntu.com/ubuntu hardy-security main restricted
+
 
}}}
+
{{nota|These should not replace the existing gutsy sources, but should be in addition to them. See the Repositories Howto for more information.}}
Note: These should not replace the existing gutsy sources, but should be in addition to them. See the Repositories Howto for more information.
+
  
 
Once the new repositories have been added, and the package list reloaded, installing the new linux-generic should get all the necessary kernel packages from hardy, including linux-image, linux-ubuntu-modules, and linux-restricted-modules.  Once the new packages are installed, disable (but don't remove) the hardy repositories, so that upgrades using apt or synaptic don't result in a complete upgrade to hardy.  The user can periodically re-enable these repositories in order to check for updated kernel packages.
 
Once the new repositories have been added, and the package list reloaded, installing the new linux-generic should get all the necessary kernel packages from hardy, including linux-image, linux-ubuntu-modules, and linux-restricted-modules.  Once the new packages are installed, disable (but don't remove) the hardy repositories, so that upgrades using apt or synaptic don't result in a complete upgrade to hardy.  The user can periodically re-enable these repositories in order to check for updated kernel packages.
Línea 230: Línea 207:
 
On my Macbook (2007), I need to edit /etc/default/acpi-support in the following way:
 
On my Macbook (2007), I need to edit /etc/default/acpi-support in the following way:
  
- change POST_VIDEO=true into POST_VIDEO=false
+
* change POST_VIDEO=true into POST_VIDEO=false
  
- Add sky2 in the modules to be removed before suspend and reloaded after: MODULES="sky2"
+
* Add sky2 in the modules to be removed before suspend and reloaded after: MODULES="sky2"
  
Note: on my MacBook (2nd gen: Nov 2006), using the hardy kernel as explained above, no change to /etc/default/acpi-support was required.
+
{{nota|On my MacBook (2nd gen: Nov 2006), using the hardy kernel as explained above, no change to /etc/default/acpi-support was required.}}
  
 
== Whining noise ==
 
== Whining noise ==
Línea 240: Línea 217:
 
In order to fix the whining noise that some MacBooks make, you need to install the iSight firmware. To install the iSight firmware, follow the steps listed below under "iSight".  After installing the firmware and restarting, your MacBook should be whine-free.
 
In order to fix the whining noise that some MacBooks make, you need to install the iSight firmware. To install the iSight firmware, follow the steps listed below under "iSight".  After installing the firmware and restarting, your MacBook should be whine-free.
  
Note: The above does not always work. In that case, add the following to /etc/init.d/acpid before exit 0.
+
{{nota|The above does not always work. In that case, add the following to /etc/init.d/acpid before exit 0.}}
{{{
+
echo 2 > /sys/module/processor/parameters/max_cstate
echo 2 > /sys/module/processor/parameters/max_cstate
+
}}}
+
  
 
== Fonts & Desktop Effects ==
 
== Fonts & Desktop Effects ==
Línea 250: Línea 225:
  
 
To fix this, in /etc/gdm/gdm.conf change:
 
To fix this, in /etc/gdm/gdm.conf change:
 +
[server-Standard]
 +
name=Standard server
 +
-command=/usr/bin/X -br -audit 0
  
{{{
+
To:
[server-Standard]
+
[server-Standard]
name=Standard server
+
name=Standard server
-command=/usr/bin/X -br -audit 0
+
-command=/usr/bin/X -br -audit 0 -dpi 96
}}}
+
 
+
to
+
 
+
{{{
+
[server-Standard]
+
name=Standard server
+
-command=/usr/bin/X -br -audit 0 -dpi 96
+
}}}
+
  
 
Restart X for this to take effect.
 
Restart X for this to take effect.
Línea 275: Línea 244:
 
To install the iSight firmware, perform the following steps, substituting your Mac OS X partition for sda2 and your kernel for 2.6.22-14-generic.  Please note that you need a Mac OS X partition to extract the firmware.
 
To install the iSight firmware, perform the following steps, substituting your Mac OS X partition for sda2 and your kernel for 2.6.22-14-generic.  Please note that you need a Mac OS X partition to extract the firmware.
  
{{{
+
sudo mount -t hfsplus /dev/sdax /mnt
sudo mount -t hfsplus /dev/sdax /mnt
+
sudo cp /mnt/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/* /lib/firmware/2.6.22-14-generic/
sudo cp /mnt/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/* /lib/firmware/2.6.22-14-generic/
+
}}}
+
  
 
Also, in /etc/default/acpi-support, edit the line that begins with MODULES such that it reads:
 
Also, in /etc/default/acpi-support, edit the line that begins with MODULES such that it reads:
  
{{{
+
MODULES="isight_usb"
MODULES="isight_usb"
+
}}}
+
  
 
Restart for this to take effect. Once the firmware is functional, the iSight may be used with the "ekiga" program.
 
Restart for this to take effect. Once the firmware is functional, the iSight may be used with the "ekiga" program.
Línea 290: Línea 255:
 
To install prerequisites and launch Ekiga (Ekiga may also be launched through the menus), do the following:
 
To install prerequisites and launch Ekiga (Ekiga may also be launched through the menus), do the following:
  
{{{
+
sudo apt-get install ekiga libpt-plugins-v4l2
sudo apt-get install ekiga libpt-plugins-v4l2
+
ekiga
ekiga
+
}}}
+
  
1. Configuration. You may have to select the iSight device. Edit > Preferences > Devices > Video Devices >
+
# Configuration. You may have to select the iSight device. Edit > Preferences > Devices > Video Devices >
1. Video plugin: V4L2
+
# Video plugin: V4L2
1. Input device: Built-in iSight
+
# Input device: Built-in iSight
  
 
If you want to use it in 640x480 mode, then:
 
If you want to use it in 640x480 mode, then:
  
{{{
 
 
gconftool-2 --type integer --set /apps/ekiga/devices/video/size 1
 
gconftool-2 --type integer --set /apps/ekiga/devices/video/size 1
}}}
 
  
 
== Minimum Fan Speed ==
 
== Minimum Fan Speed ==
Línea 310: Línea 271:
  
 
First you need to load the appropriate module:
 
First you need to load the appropriate module:
{{{
+
sudo modprobe applesmc
sudo modprobe applesmc
+
echo applesmc | sudo tee -a /etc/modules
echo applesmc | sudo tee -a /etc/modules
+
 
}}}
+
 
then add the following line to /etc/init.d/acpid just before the exit statement:
 
then add the following line to /etc/init.d/acpid just before the exit statement:
{{{
+
echo 3000 > /sys/devices/platform/applesmc.768/fan1_min
echo 3000 > /sys/devices/platform/applesmc.768/fan1_min
+
}}}
+
  
 
== Reducing Power Consumption ==
 
== Reducing Power Consumption ==
Línea 323: Línea 281:
 
PowerTOP is a program that monitors a Linux system and gives suggestions on reducing power consumption. To install PowerTOP, enter this command in a terminal:
 
PowerTOP is a program that monitors a Linux system and gives suggestions on reducing power consumption. To install PowerTOP, enter this command in a terminal:
  
{{{
+
sudo apt-get install build-essential libncurses5-dev libncursesw5-dev
sudo apt-get install build-essential libncurses5-dev libncursesw5-dev
+
wget -c http://www.lesswatts.org/projects/powertop/download/powertop-1.9.tar.gz
wget -c http://www.lesswatts.org/projects/powertop/download/powertop-1.9.tar.gz
+
tar -xvf powertop-1.9.tar.gz
tar -xvf powertop-1.9.tar.gz
+
cd powertop-1.9
cd powertop-1.9
+
sudo make
sudo make
+
sudo make install
sudo make install
+
}}}
+
  
 
You can also use “checkinstall” instead of “make install” to create a simple .deb for easier removal.
 
You can also use “checkinstall” instead of “make install” to create a simple .deb for easier removal.
  
 
PowerTOP must always be run as root, so use the following command to run it:
 
PowerTOP must always be run as root, so use the following command to run it:
 
+
sudo powertop
{{{
+
sudo powertop
+
}}}
+
  
 
== Reducing Drive Load/Unload Cycles ==
 
== Reducing Drive Load/Unload Cycles ==
Línea 344: Línea 297:
 
My Second Generation (C2D) MacBook is susceptible to a high load/unload cycle count on the hard drive.  This is a workaround to lower the drive cycles and extend the drive life.  Generate the following three files using the commands below:
 
My Second Generation (C2D) MacBook is susceptible to a high load/unload cycle count on the hard drive.  This is a workaround to lower the drive cycles and extend the drive life.  Generate the following three files using the commands below:
  
{{{
+
echo -e '#!/bin/sh\nhdparm -B 254 /dev/sda' | sudo tee -a /etc/acpi/start.d/99-macbook-fix.sh
echo -e '#!/bin/sh\nhdparm -B 254 /dev/sda' | sudo tee -a /etc/acpi/start.d/99-macbook-fix.sh
+
echo -e '#!/bin/sh\nhdparm -B 254 /dev/sda' | sudo tee -a /etc/acpi/resume.d/99-macbook-fix.sh
echo -e '#!/bin/sh\nhdparm -B 254 /dev/sda' | sudo tee -a /etc/acpi/resume.d/99-macbook-fix.sh
+
echo -e '#!/bin/sh\nhdparm -B 254 /dev/sda' | sudo tee -a /etc/acpi/suspend.d/99-macbook-fix.sh
echo -e '#!/bin/sh\nhdparm -B 254 /dev/sda' | sudo tee -a /etc/acpi/suspend.d/99-macbook-fix.sh
+
}}}
+
  
 
Add execute permissions to the files:
 
Add execute permissions to the files:
  
{{{
+
sudo chmod a+x /etc/acpi/start.d/99-macbook-fix.sh
sudo chmod a+x /etc/acpi/start.d/99-macbook-fix.sh
+
sudo chmod a+x /etc/acpi/resume.d/99-macbook-fix.sh
sudo chmod a+x /etc/acpi/resume.d/99-macbook-fix.sh
+
sudo chmod a+x /etc/acpi/suspend.d/99-macbook-fix.sh
sudo chmod a+x /etc/acpi/suspend.d/99-macbook-fix.sh
+
}}}
+
  
 
To have these changes take effect immediately (without requiring a reboot):
 
To have these changes take effect immediately (without requiring a reboot):
  
{{{
+
sudo hdparm -B 254 /dev/sda
sudo hdparm -B 254 /dev/sda
+
}}}
+
  
 
See [https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695 this bug] for more details.
 
See [https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695 this bug] for more details.
  
note: this is Ubuntu 8.04 "Hardy" on the Second Generation (C2D) MacBook. I have not tested on previous releases or other models.
+
{{nota|This is Ubuntu 8.04 "Hardy" on the Second Generation (C2D) MacBook. I have not tested on previous releases or other models.}}
  
 
== Right/Middle Clicking ==
 
== Right/Middle Clicking ==
  
 
There are two main approaches to right/middle clicking:
 
There are two main approaches to right/middle clicking:
* Two/three finger taps via the synaptics touchpad driver by editing xorg.conf
+
* Two/three finger taps via the synaptics touchpad driver by editing xorg.conf
* Remapping the functions of keys on the keyboard by editing system keyboard layouts or using xmodmap and a local configuration file
+
* Remapping the functions of keys on the keyboard by editing system keyboard layouts or using xmodmap and a local configuration file
  
 
=== Multi-finger taps ===
 
=== Multi-finger taps ===
 +
 
See [#touchpadtweaks More touchpad tweaks].
 
See [#touchpadtweaks More touchpad tweaks].
  
 
=== Keyboard keys ===
 
=== Keyboard keys ===
 +
 
Enable mouse emulation:
 
Enable mouse emulation:
* On Ubuntu: Go to '''System ▸ Preferences ▸ Keyboard ▸ Accessibility''' in the Main menu. Check '''Enable keyboard accessibility features'''. Click the ''Mouse Keys'' tab and check '''Enable Mouse Keys''' also.  
+
* On Ubuntu: Go to '''System ▸ Preferences ▸ Keyboard ▸ Accessibility''' in the Main menu. Check '''Enable keyboard accessibility features'''. Click the ''Mouse Keys'' tab and check '''Enable Mouse Keys''' also.  
* On Kubuntu: bring up ''System Settings'', find ''Keyboard & Mouse'', choose ''Mouse'' on the left, than the ''Mouse Navigation'' tab, and check the checkbox beside ''Move pointer with keyboard (using the num pad)''. Please note that on Kubuntu you will lose your numpad.
+
* On Kubuntu: bring up ''System Settings'', find ''Keyboard & Mouse'', choose ''Mouse'' on the left, than the ''Mouse Navigation'' tab, and check the checkbox beside ''Move pointer with keyboard (using the num pad)''. Please note that on Kubuntu you will lose your numpad.
* On Xubuntu: Go to '''Applications ▸ Settings ▸ Mouse Settings''' and on the '''Accessibility''' tab, enable the '''Enable mouse emulation''' check box.
+
* On Xubuntu: Go to '''Applications ▸ Settings ▸ Mouse Settings''' and on the '''Accessibility''' tab, enable the '''Enable mouse emulation''' check box.
 +
 
 
Then '''either''' edit the system files '''or''' use a local configuration file and xmodmap:
 
Then '''either''' edit the system files '''or''' use a local configuration file and xmodmap:
* Editing system files (choose '''one''' of the following options):
+
 
  * '''option 1:''' lower Enter key = Right Mouse Button, Shift + lower Enter key = Middle Mouse Button
+
* Editing system files (choose '''one''' of the following options):
  {{{
+
:* '''option 1:''' lower Enter key = Right Mouse Button, Shift + lower Enter key = Middle Mouse Button
sudo sed -i~ 's/KP_Enter/Pointer_Button3, Pointer_Button2/' /etc/X11/xkb/symbols/keypad
+
sudo sed -i~ 's/KP_Enter/Pointer_Button3, Pointer_Button2/' /etc/X11/xkb/symbols/keypad
}}}
+
:* '''option 2:''' lower Enter key = Right Mouse Button, Alt Gr key + lower Enter key = Middle Mouse Button
  * '''option 2:''' lower Enter key = Right Mouse Button, Alt Gr key + lower Enter key = Middle Mouse Button
+
  {{{
+
 
sudo sed -i~ 's/KP_Enter/Pointer_Button3, Pointer_Button3, Pointer_Button2, Pointer_Button2/' /etc/X11/xkb/symbols/keypad
 
sudo sed -i~ 's/KP_Enter/Pointer_Button3, Pointer_Button3, Pointer_Button2, Pointer_Button2/' /etc/X11/xkb/symbols/keypad
}}}
 
* Using xmodmap and a local configuration file to override the system-wide layouts:
 
  * The keycodes for relevant keys are:
 
  * right Apple - keycode 116
 
  * lower enter - keycode 108
 
  * The keysyms for relevant input events are:
 
  * Alt Gr - ISO_Level3_Shift
 
  * Middle-click - Pointer_Button2
 
  * Right-click - Pointer_Button3
 
  * Create a text file as ~/.xmodmap containing the following text:
 
  ('''Note''': for my set up I use left Apple as Alt Gr, right Apple as middle-click and lower enter as right-click. If you want to use right Apple as Alt Gr then you may need to rethink your keys for clicks assignments.)
 
  {{{
 
keycode 116 = Pointer_Button2
 
keycode 108 = Pointer_Button3
 
}}}
 
  * Add a call to xmodmap to your startup applications:
 
  * On Xubuntu: Go to '''Applications ▸ Settings ▸ Autostarted Applications''', click the '''Add''' button, fill in the '''Name''' and '''Description''' fields and put the following into the '''Command''' field:
 
  {{{
 
xmodmap ~/.xmodmap
 
}}}
 
  Then click '''OK''' and '''Close'''.
 
  
'''Restart X (Ctrl+Alt+Backspace) for the changes to take effect.'''
+
* Using xmodmap and a local configuration file to override the system-wide layouts:
 +
:* The keycodes for relevant keys are:
 +
::* right Apple - keycode 116
 +
::* lower enter - keycode 108
 +
:* The keysyms for relevant input events are:
 +
::* Alt Gr - ISO_Level3_Shift
 +
::* Middle-click - Pointer_Button2
 +
::* Right-click - Pointer_Button3
 +
:* Create a text file as ~/.xmodmap containing the following text:
  
 +
{{nota|for my set up I use left Apple as Alt Gr, right Apple as middle-click and lower enter as right-click. If you want to use right Apple as Alt Gr then you may need to rethink your keys for clicks assignments.}}
 +
keycode 116 = Pointer_Button2
 +
keycode 108 = Pointer_Button3
 +
 +
:* Add a call to xmodmap to your startup applications:
 +
::* On Xubuntu: Go to '''Applications ▸ Settings ▸ Autostarted Applications''', click the '''Add''' button, fill in the '''Name''' and '''Description''' fields and put the following into the '''Command''' field:
 +
xmodmap ~/.xmodmap
 +
Then click '''OK''' and '''Close'''.
 +
 +
'''Restart X (Ctrl+Alt+Backspace) for the changes to take effect.'''
  
 
== Motion Sensor ==
 
== Motion Sensor ==
Línea 420: Línea 365:
 
The motion sensor doesn't support disk parking yet ([https://bugs.launchpad.net/bugs/139881 bug #139881]), but you can play physical neverball :-)
 
The motion sensor doesn't support disk parking yet ([https://bugs.launchpad.net/bugs/139881 bug #139881]), but you can play physical neverball :-)
  
{{{
+
sudo modprobe applesmc
sudo modprobe applesmc
+
echo applesmc | sudo tee -a /etc/modules
echo applesmc | sudo tee -a /etc/modules
+
}}}
+
  
 
Then fire up neverball... (or any other game that uses a joystick)
 
Then fire up neverball... (or any other game that uses a joystick)
 
  
 
== Keyboard layouts ==
 
== Keyboard layouts ==
Línea 435: Línea 377:
 
## TODO cjwatson 2007-03-27: is this still required in Ubuntu 7.04? Changes like this won't be preserved on upgrade any more, so aren't recommended.
 
## TODO cjwatson 2007-03-27: is this still required in Ubuntu 7.04? Changes like this won't be preserved on upgrade any more, so aren't recommended.
  
* The GUI way:
+
* The GUI way:
 
  Bring up the ''Keyboard Preferences'' window with '''System ▸ Preferences ▸ Keyboard''' from the Main menu. Click on the '''Keyboard Layout Options''' tab, and find '''Third level choosers'''. Mark the ''right Win key'' as third level chooser. Now your right Apple key works as Alt Gr.
 
  Bring up the ''Keyboard Preferences'' window with '''System ▸ Preferences ▸ Keyboard''' from the Main menu. Click on the '''Keyboard Layout Options''' tab, and find '''Third level choosers'''. Mark the ''right Win key'' as third level chooser. Now your right Apple key works as Alt Gr.
* The console way, editing system files:
+
 
  * Alt Gr for right Apple key
+
* The console way, editing system files:
  {{{
+
:* Alt Gr for right Apple key
sudo sed -i~ '/xkb_symbols "ralt_switch" {/a\  include "level3(rwin_switch)"' /etc/X11/xkb/symbols/level3
+
sudo sed -i~ '/xkb_symbols "ralt_switch" {/a\  include "level3(rwin_switch)"' /etc/X11/xkb/symbols/level3
}}}
+
:* Fix swapped keys:
  * Fix swapped keys
+
sudo sed -i~ 's/    <LSGT> =  94;/    <LSGT> =  49;\n    <TLDE> =  94;/' /etc/X11/xkb/keycodes/xfree86
  {{{
+
 
sudo sed -i~ 's/    <LSGT> =  94;/    <LSGT> =  49;\n    <TLDE> =  94;/' /etc/X11/xkb/keycodes/xfree86
+
* The console way, using xmodmap and a local configuration file:
}}}
+
:* keycodes for relevant keys:
* The console way, using xmodmap and a local configuration file:
+
::* left Apple - keycode 115
  * keycodes for relevant keys:
+
::* right Apple - keycode 116
  * left Apple - keycode 115
+
::* § or ± (UK MacBook key beneath escape) - keycode 49
  * right Apple - keycode 116
+
::* ` or ~ (UK MacBook key left of z) - keycode 94
  * § or ± (UK MacBook key beneath escape) - keycode 49
+
:* keysyms for relevant characters/functions:
  * ` or ~ (UK MacBook key left of z) - keycode 94
+
::* Alt Gr - ISO_Level3_Shift
  * keysyms for relevant characters/functions:
+
::* § or ± - section plusminus
  * Alt Gr - ISO_Level3_Shift
+
::* ` or ~ - grave tilde
  * § or ± - section plusminus
+
:* To fix the swapped keys and make left Apple equivalent to Alt Gr, edit a text file at ~/.xmodmap (create it if it doesn't exist) adding the following lines:
  * ` or ~ - grave tilde
+
keycode 115 = ISO_Level3_Shift
  * To fix the swapped keys and make left Apple equivalent to Alt Gr, edit a text file at ~/.xmodmap (create it if it doesn't exist) adding the following lines:
+
keycode 49 = section plusminus
  {{{
+
keycode 94 = grave asciitilde
keycode 115 = ISO_Level3_Shift
+
Then add <code>xmodmap ~/.xmodmap</code> to your start up.
keycode 49 = section plusminus
+
keycode 94 = grave asciitilde
+
}}}
+
  Then add {{{xmodmap ~/.xmodmap}}} to your start up.
+
  
 
'''Restart X (Ctrl+Alt+Backspace) for the changes to take effect.'''
 
'''Restart X (Ctrl+Alt+Backspace) for the changes to take effect.'''
  
 
To swap the fn key behaviour:
 
To swap the fn key behaviour:
{{{
+
#Add one of these commands to /etc/rc.local
#Add one of these commands to /etc/rc.local
+
echo -n 0x01 > /sys/module/hid/parameters/pb_fnmode #FN on (like OSX)
echo -n 0x01 > /sys/module/hid/parameters/pb_fnmode #FN on (like OSX)
+
echo -n 0x02 > /sys/module/hid/parameters/pb_fnmode #FN off (press fn for volume/brightness/etc)
echo -n 0x02 > /sys/module/hid/parameters/pb_fnmode #FN off (press fn for volume/brightness/etc)
+
}}}
+
 
+
  
 
== Screen Colors (optional) ==
 
== Screen Colors (optional) ==
 +
 
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.
 
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.
  
Línea 480: Línea 416:
  
 
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 2 in /dev/sda2, 2 being the first standard partition):
 
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 2 in /dev/sda2, 2 being the first standard partition):
{{{
+
sudo mv ~/Desktop/xcalib /usr/local/bin/xcalib
sudo mv ~/Desktop/xcalib /usr/local/bin/xcalib
+
sudo chmod 755 /usr/local/bin/xcalib
sudo chmod 755 /usr/local/bin/xcalib
+
sudo mount -t hfsplus /dev/sda2 /mnt
sudo mount -t hfsplus /dev/sda2 /mnt
+
sudo cp /mnt/Library/ColorSync/Profiles/Displays/* /usr/local/etc
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).
 
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:
 
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>"
/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.
 
Restart X (Ctrl-Alt-Backspace) and your Mac OS X color profile will load as X starts.
Línea 501: Línea 434:
 
1. Open a terminal and do "sudo dpkg-reconfigure fontconfig-config".  Set font hinting to "None" and leave the rest of the options as default.
 
1. Open a terminal and do "sudo dpkg-reconfigure fontconfig-config".  Set font hinting to "None" and leave the rest of the options as default.
 
2. Paste the following into a new file entitled "/etc/fonts/conf.d/lcd-legacy.conf":
 
2. Paste the following into a new file entitled "/etc/fonts/conf.d/lcd-legacy.conf":
{{{
+
<fontconfig>
<fontconfig>
+
  <edit name="lcdfilter" mode="assign"><const>legacy</const></edit>
  <edit name="lcdfilter" mode="assign"><const>legacy</const></edit>
+
</fontconfig>
</fontconfig>
+
}}}
+
 
3. Install any fonts you commonly use on Mac OS X. (Note: the Microsoft Core Fonts - which are commonly used in Office documents and online - can be installed using Add/Remove Programs).
 
3. Install any fonts you commonly use on Mac OS X. (Note: the Microsoft Core Fonts - which are commonly used in Office documents and online - can be installed using Add/Remove Programs).
 
4. Enjoy!
 
4. Enjoy!
  
 
[[Anchor(touchpadtweaks)]]
 
 
== More touchpad tweaks ==
 
== More touchpad tweaks ==
  
 
To enable touchpad scrolling/tapping/right-click:
 
To enable touchpad scrolling/tapping/right-click:
  
You will need to edit the xorg.conf file (in /etc/X11/xorg.conf)
+
You will need to edit the xorg.conf file (in /etc/X11/xorg.conf).
  
'''For more information than is available below, read {{{man synaptics}}}!'''
+
'''For more information than is available below, read <code>man synaptics</code>!'''
  
 
Replace the Synaptics Touchpad InputDevice section with the following:
 
Replace the Synaptics Touchpad InputDevice section with the following:
* Basic device definition layout:
+
* Basic device definition layout:
  {{{
+
  Section "InputDevice"
Section "InputDevice"
+
        Identifier      "Synaptics Touchpad"
        Identifier      "Synaptics Touchpad"
+
        Driver          "synaptics"
        Driver          "synaptics"
+
        Option          "SendCoreEvents"        "true"
        Option          "SendCoreEvents"        "true"
+
        Option          "Device"                "/dev/psaux"
        Option          "Device"                "/dev/psaux"
+
        Option          "Protocol"              "auto-dev"
        Option          "Protocol"              "auto-dev"
+
        Option          "SHMConfig"            "true"
        Option          "SHMConfig"            "true"
+
'''...insert other options from below here...'''
'''...insert other options from below here...'''
+
EndSection
EndSection
+
 
}}}
+
* General options affecting the touchpad edge areas, speed, touch sensitivity, etc. Note that if not using edge scrolling, the edge boundaries can probably be decreased but the edge offsets will need to be reasonable (as below?) if edge scrolling is being used:
* General options affecting the touchpad edge areas, speed, touch sensitivity, etc. Note that if not using edge scrolling, the edge boundaries can probably be decreased but the edge offsets will need to be reasonable (as below?) if edge scrolling is being used.:
+
        Option          "LeftEdge"              "150"
{{{
+
        Option          "RightEdge"            "1070"
        Option          "LeftEdge"              "150"
+
        Option          "TopEdge"              "100"
        Option          "RightEdge"            "1070"
+
        Option          "BottomEdge"            "310"
        Option          "TopEdge"              "100"
+
        Option          "FingerLow"            "25"
        Option          "BottomEdge"            "310"
+
        Option          "FingerHigh"            "30"
        Option          "FingerLow"            "25"
+
        Option          "MaxTapTime"            "180"
        Option          "FingerHigh"            "30"
+
        Option          "MaxTapMove"            "220"
        Option          "MaxTapTime"            "180"
+
        Option          "SingleTapTimeout"      "100"
        Option          "MaxTapMove"            "220"
+
        Option          "MaxDoubleTapTime"      "180"
        Option          "SingleTapTimeout"      "100"
+
        Option          "LockedDrags"          "off"
        Option          "MaxDoubleTapTime"      "180"
+
        Option          "MinSpeed"              "1.10"
        Option          "LockedDrags"          "off"
+
        Option          "MaxSpeed"              "1.30"
        Option          "MinSpeed"              "1.10"
+
        Option          "AccelFactor"          "0.08"
        Option          "MaxSpeed"              "1.30"
+
 
        Option          "AccelFactor"          "0.08"
+
* Options affecting taps for button clicks:
}}}
+
Buttons 1, 2 and 3 correspond to the left, middle and right mouse buttons respectively. If you set the values to 0, the method will be disabled. The ''TapButton'' options are for one, two or three finger taps. The ''CornerButton'' options are for one finger taps in the right-top (''RT''), right-bottom (''RB''), left-top (''LT'') and left-bottom (''LB'') corners of the touchpad. Generally you will want to use either corner taps or multi-finger taps, not both.
* Options affecting taps for button clicks:
+
 
  Buttons 1, 2 and 3 correspond to the left, middle and right mouse buttons respectively. If you set the values to 0, the method will be disabled. The ''TapButton'' options are for one, two or three finger taps. The ''CornerButton'' options are for one finger taps in the right-top (''RT''), right-bottom (''RB''), left-top (''LT'') and left-bottom (''LB'') corners of the touchpad. Generally you will want to use either corner taps or multi-finger taps, not both.
+
:* Multi-finger taps
  * Multi-finger taps
+
The following example uses a one-finger tap for left-click, a two-finger tap for right-click and a three-finger tap for middle-click (and the physical button can still used for left-click):
  The following example uses a one-finger tap for left-click, a two-finger tap for right-click and a three-finger tap for middle-click (and the physical button can still used for left-click):
+
  {{{
+
 
         Option          "TapButton1"            "1"
 
         Option          "TapButton1"            "1"
 
         Option          "TapButton2"            "3"
 
         Option          "TapButton2"            "3"
 
         Option          "TapButton3"            "2"
 
         Option          "TapButton3"            "2"
}}}
+
 
  * One-finger corner taps
+
:* One-finger corner taps
  The following example uses the right-bottom corner for middle-click and left-bottom corner for right-click (and the physical button is still used for left-click):
+
The following example uses the right-bottom corner for middle-click and left-bottom corner for right-click (and the physical button is still used for left-click):
  {{{
+
 
         Option          "RTCornerButton"        "0"
 
         Option          "RTCornerButton"        "0"
 
         Option          "RBCornerButton"        "2"
 
         Option          "RBCornerButton"        "2"
 
         Option          "LTCornerButton"        "0"
 
         Option          "LTCornerButton"        "0"
 
         Option          "LBCornerButton"        "3"
 
         Option          "LBCornerButton"        "3"
}}}
+
 
* Options affecting scrolling:
+
* Options affecting scrolling:
You can either use edge scrolling or two-finger scrolling (as in Mac OS X) but you won't generally want to use both.
+
You can either use edge scrolling or two-finger scrolling (as in Mac OS X) but you won't generally want to use both.
  * Scrolling speed
+
 
  The following options affect how far you have to move your finger across the touchpad to affect a scroll. Smaller values should make scrolling faster.
+
:* Scrolling speed
  {{{
+
The following options affect how far you have to move your finger across the touchpad to affect a scroll. Smaller values should make scrolling faster.
 
         Option          "VertScrollDelta"      "20"
 
         Option          "VertScrollDelta"      "20"
 
         Option          "HorizScrollDelta"      "50"
 
         Option          "HorizScrollDelta"      "50"
}}}
+
 
  * Edge scrolling
+
:* Edge scrolling
  The following options toggle whether moving a finger along an edge of the touchpad invokes scrolling. Set to 0 to disable.
+
The following options toggle whether moving a finger along an edge of the touchpad invokes scrolling. Set to 0 to disable.
  {{{
+
 
         Option          "HorizEdgeScroll"      "1"
 
         Option          "HorizEdgeScroll"      "1"
 
         Option          "VertEdgeScroll"        "1"
 
         Option          "VertEdgeScroll"        "1"
}}}
+
 
  * Two-finger scrolling
+
:* Two-finger scrolling
  The following options toggle whether moving two fingers horizontally or vertically over the touchpad invokes scrolling. Set to 0 to disable.
+
The following options toggle whether moving two fingers horizontally or vertically over the touchpad invokes scrolling. Set to 0 to disable.
  {{{
+
 
         Option          "VertTwoFingerScroll"  "1"
 
         Option          "VertTwoFingerScroll"  "1"
 
         Option          "HorizTwoFingerScroll"  "1"
 
         Option          "HorizTwoFingerScroll"  "1"
}}}
+
 
* Additional useful information
+
* Additional useful information
  * Firefox horizontal scrolling behavior
+
 
  With two finger scrolling enabled, you will probably want to change Firefox's horizontal scrolling behavior.  To do so, open Firefox, go to the URL "about:config", and change the following settings:
+
:* Firefox horizontal scrolling behavior
  {{{
+
With two finger scrolling enabled, you will probably want to change Firefox's horizontal scrolling behavior.  To do so, open Firefox, go to the URL "about:config", and change the following settings:
mousewheel.horizscroll.withnokey.action from 2 to 0
+
mousewheel.horizscroll.withnokey.action from 2 to 0
mousewheel.horizscroll.withnokey.numlines from -1 to 1
+
mousewheel.horizscroll.withnokey.numlines from -1 to 1
}}}
+
 
  * Disable the touchpad temporarily while typing
+
:* Disable the touchpad temporarily while typing
  It is useful to have the touchpad not use click or scroll events while you are typing. The information for this was found [http://ubuntu.wordpress.com/2006/09/20/disable-touchpad-temporarily-when-typing/ here]. Make syndaemon start up by default each time you login, add it to the list of Startup Programs in System->Preferences->Sessions. Add the following command:
+
It is useful to have the touchpad not use click or scroll events while you are typing. The information for this was found [http://ubuntu.wordpress.com/2006/09/20/disable-touchpad-temporarily-when-typing/ here]. Make syndaemon start up by default each time you login, add it to the list of Startup Programs in System -> Preferences -> Sessions. Add the following command:
  {{{
+
syndaemon -t -d
syndaemon -t -d
+
}}}
+
  
 
'''Restart X for changes to take effect with Ctrl-Alt-Backspace'''
 
'''Restart X for changes to take effect with Ctrl-Alt-Backspace'''
  
 
=== Examples ===
 
=== Examples ===
* Example 1
+
 
With the following settings, two finger scrolling is enabled as in Mac OS X. Right-click is done by tapping the bottom-left corner of the touchpad, and middle-click is done by tapping the bottom-right corner of the touchpad.
+
* Example 1
  {{{
+
With the following settings, two finger scrolling is enabled as in Mac OS X. Right-click is done by tapping the bottom-left corner of the touchpad, and middle-click is done by tapping the bottom-right corner of the touchpad.
Section "InputDevice"
+
  Section "InputDevice"
 
         Identifier      "Synaptics Touchpad"
 
         Identifier      "Synaptics Touchpad"
 
         Driver          "synaptics"
 
         Driver          "synaptics"
Línea 638: Línea 560:
 
         Option          "VertTwoFingerScroll"  "1"
 
         Option          "VertTwoFingerScroll"  "1"
 
         Option          "HorizTwoFingerScroll"  "1"
 
         Option          "HorizTwoFingerScroll"  "1"
EndSection
+
EndSection
}}}
+
 
* Example 2
+
* Example 2
With the following settings the Synaptics Touchpad configuration should be closer to Mac OS X. Right-click using a two-finger tap and scroll by moving two fingers across the touchpad.
+
With the following settings the Synaptics Touchpad configuration should be closer to Mac OS X. Right-click using a two-finger tap and scroll by moving two fingers across the touchpad.
  {{{
+
  Section "InputDevice"
Section "InputDevice"
+
 
         Identifier      "Synaptics Touchpad"
 
         Identifier      "Synaptics Touchpad"
 
         Driver          "synaptics"
 
         Driver          "synaptics"
Línea 677: Línea 598:
 
         Option          "VertTwoFingerScroll"  "1"
 
         Option          "VertTwoFingerScroll"  "1"
 
         Option          "HorizTwoFingerScroll"  "1"
 
         Option          "HorizTwoFingerScroll"  "1"
EndSection
+
EndSection
}}}
+
  
 
== DVI Output (gutsy) ==
 
== DVI Output (gutsy) ==
[http://www.thinkwiki.org/wiki/Installing_Ubuntu_6.06.1_on_a_ThinkPad_R60e#Ubuntu_7.10_with_Intel_Graphics_Media_Accelerator_950 These instructions] worked perfectly for setting DVI output on my MacBook.
+
 
 +
[http://www.thinkwiki.org/wiki/Installing_Ubuntu_6.06.1_on_a_ThinkPad_R60e#Ubuntu_7.10_with_Intel_Graphics_Media_Accelerator_950 These instructions] worked perfectly for setting DVI output on my MacBook.
 
   
 
   
[http://ubuntu-tutorials.com/2007/11/25/extended-video-on-the-macbook-xrandr-ftw/ extended display] - These instructions worked for me. A little more to the point than the above link.
+
[http://ubuntu-tutorials.com/2007/11/25/extended-video-on-the-macbook-xrandr-ftw/ extended display] - These instructions worked for me. A little more to the point than the above link.
  
Warning: Screen and Graphics Preferences is currently dangerous. It completely broke my /etc/X11/xorg.conf on my first reconfiguration attempt.
+
{{advertencia|Screen and Graphics Preferences is currently dangerous. It completely broke my /etc/X11/xorg.conf on my first reconfiguration attempt.}}
  
 
== Misc ==
 
== Misc ==
 +
 
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.
 
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.
  {{{
+
  dd if=/dev/zero of=/swapfile bs=1024 count=2048000
dd if=/dev/zero of=/swapfile bs=1024 count=2048000
+
mkswap /swapfile
mkswap /swapfile
+
swapon /swapfile
swapon /swapfile
+
 
edit fstab:
 
edit fstab:
 
  /swapfile              swap                    swap    defaults        0 0
 
  /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> :
+
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
sudo filefrag -v /swapfile
+
#output : First block: 102300
#output : First block: 102300
+
 
}}}
+
 
Copy the first block number of the swapfile (ex:102300) and edit the defoptions line of /boot/grub/menu.lst :
 
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
# defoptions=quiet splash resume=/dev/sda3 resume_offset=102300
+
The update your grub configuration:
}}}
+
sudo update-grub
The update your grub configuration :
+
 
  {{{
+
sudo update-grub
+
}}}
+
 
On this example, the swapfile is on partition /dev/sda3.
 
On this example, the swapfile is on partition /dev/sda3.
 +
 
You are now able to use suspend on disk (hibernate).
 
You are now able to use suspend on disk (hibernate).
  
----
+
== Fuentes ==
References:
+
 
* [http://www.apple.com/macbook/ Apple - MacBook]
+
* [http://www.apple.com/macbook/ Apple - MacBook].
* [http://doc.gwos.org/index.php/UbuntuOnApple Ubuntu on Apple - Mac Mini]
+
* [http://doc.gwos.org/index.php/UbuntuOnApple Ubuntu on Apple - Mac Mini].
* [http://bin-false.org/?p=17 /bin/false –help » Installing Ubuntu Linux on a MacBook (Dual Boot)]
+
* [http://bin-false.org/?p=17 /bin/false –help » Installing Ubuntu Linux on a MacBook (Dual Boot)].
* [http://modular.math.washington.edu/macbook/ Mactel: Linux on the MacBook Pro]
+
* [http://modular.math.washington.edu/macbook/ Mactel: Linux on the MacBook Pro].
* [http://ubuntuforums.org/showthread.php?t=198453 Ubuntu on MacBook Pro - Ubuntu Forums]
+
* [http://ubuntuforums.org/showthread.php?t=198453 Ubuntu on MacBook Pro - Ubuntu Forums].
* [https://wiki.ubuntu.com/MacBookProFeisty (k)ubuntu fiesty 7.04 on a MacBookPro]
+
* [https://wiki.ubuntu.com/MacBookProFeisty (k)ubuntu fiesty 7.04 on a MacBookPro].
* [http://www.mactel-linux.org/wiki/Dual_Booting Dual Booting - Mactel-Linux]
+
* [http://www.mactel-linux.org/wiki/Dual_Booting Dual Booting - Mactel-Linux].
* [http://ubuntuforums.org/showthread.php?t=225621 Built-in iSight Howto, Intel Mac ( iMac, Macbook ) - Ubuntu Forums]
+
* [http://ubuntuforums.org/showthread.php?t=225621 Built-in iSight Howto, Intel Mac ( iMac, Macbook ) - Ubuntu Forums].
* [http://ubuntu-tutorials.com/2007/08/02/installing-ubuntu-on-a-macbook-tutorial-beta/ Nearly Complete Installation Tutorial]
+
* [http://ubuntu-tutorials.com/2007/08/02/installing-ubuntu-on-a-macbook-tutorial-beta/ Nearly Complete Installation Tutorial].
  
* [http://modular.math.washington.edu/macbook/suspend2/ suspend2]
+
* [http://modular.math.washington.edu/macbook/suspend2/ suspend2].
  
 
[[Categoría:Instalación avanzada]]
 
[[Categoría:Instalación avanzada]]

Última revisión de 22:22 9 jul 2008


Eye.png Este artículo necesita ser wikificado en base al manual de estilo de este wiki. Por favor, colabora editándolo conforme a las normas de edición de este sitio. No elimines este aviso hasta que lo hayas hecho.
SPEngUs2.png Página traduciendose de la documentación original https://help.ubuntu.com/community/MacBook?highlight=(macbook)

Esta guía le ayudará con los pasos necesarios para la instalación de Ubuntu en un MacBook. Esta guía ha sido realizada para Ubuntu 7.10 (Gutsy Gibbon), pero está siendo adaptada para Ubuntu 8.04 (Hardy Heron).

Si tienes un MacBook Pro te recomendamos que veas esta otra guía: https://wiki.ubuntu.com/MacBookPro, tenga en cuenta que es casi todo igual , aunque esta página es tambien relevante.

Si tienes el nuevo Macbook (Santa Rosa v3.1) veer esta guía: https://help.ubuntu.com/community/MacBook_Santa_Rosa

Para la discusión adicional de este asunto, vea: http://ubuntuforums.org/showthread.php?p=1699961

Para una guía de tripe arranque vea: http://wiki.onmac.net/index.php/Triple_Boot_via_BootCamp_Ubuntu


Las instrucciones abajo se refieren a la aplicación BootCamp de Apple que está disponible de forma pública excepto si usas Leopard Mac OS X 10.5. Otra opción, sin embargo, es redimensionar la partición Mac OS X utilizando las utilidades de disco o reinstalar Mac Os X haciendo más pequeña la partición de Mac OS X, dejando el espacion libre necesario para Ubuntu

Contenido

[editar] Instrucciones básicas

  1. Actualizar el software de tu sistema Mac Os X firmware a la versión más reciente.
    Tambien puede hacerlo de la manera estandard pulsando en la manzana y luego "Actualización de software"
    (Accesible desde el escritorio de su sistema Mac OS X)
  2. Baja tu Ubuntu Live CD. Para los primeros Macbooks tu debes seleccionar `i386`; Para los Macbooks Core 2 Duo
    (posterioes a 2006) puedes seleccionar `amd64` si tu estás interesado en arrancar a 64-bit OS,si no seleccionar ` i386`.
  3. Instalar rEFIt si tu quieres un menu de arranque (para poder seleccionar OS X/Ubuntu) seleccionar el arranque.
    Puedes hacer que el arranque a Ubuntu sea por defecto y cargar la cuenta atras editando el fichero "refit.conf"
    (Según está descrito en el anterior web site rEFIt).
  4. Si es necesario, use Boot Camp para redimensionar la partición OSX para dejar espacio para tu Ubuntu.
    Don't waste a CD creating a Windows driver disk. Reboot.
  5. Pulsa la tecla "C" para iniciar desde el CD.
  6. Instalar Ubuntu de la forma usual, excepto:
    1. En la particion, selecciona Editar manualmente la tabla de particiones
    2. Borra /dev/sda3 y /dev/sda4 si existe
    3. Crea una nueva partición ext3 para tu usuario root
    4. Monte la reción creada partición ext3 en '/'
    5. Tenga en cuenta que con Boot Camp puede darle problemas si hace más de dos particiones.
  7. Finaliza la instalación y reinicia.
  8. Si has instalado rEFIT, deberíaa tener la posibilidad de elegir entre el arranque OS X y Ubuntu.
    Utilice las teclas de flecha y ENTER para seleccionar Ubuntu.
  9. Alternativamente, si no has instalado rEFIT, mantenga pulsada Alt/Opción para decidir si desea arrancar en OSX / Ubuntu.
    El menú de arranque del Bootcamp instalado reconocerá la instalación de Ubuntu como si fuera de Window$
    pero en realidad arrancará Ubuntu sin problemas.
  10. Entre en su sistema.
  11. Siga las instrucciones que aparecen a continuación para configurar los distintos componentes de hardware que no funciona de forma estandard en Gutsy.

[editar] Sonido

Sound on MacBooks is provided by an Intel HDA-based integrated chipset, and should work out-of-the-box. However, in Ubuntu 8.04 alsa drivers 1.0.15 will not work with some chipsets, like SigmaTel STAC9221. In such cases everything seems to work fine but no sound is present (even unmuting all controls). Alsa drivers 1.0.16 should work fine, to install them:

sudo apt-get install build-essential linux-headers-$(uname -r) module-assistant alsa-source
sudo dpkg-reconfigure alsa-source
sudo module-assistant a-i   alsa-source

This may disable Madwifi drivers for the wireless card, hence you want to compile alsa first.

The volume control will not work correctly out-of-the-box - in particular, reducing the default volume will result in sound distortion at lower volume levels, and volume control changes won't effect the headphone volume level.

To fix this, do the following

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.

The above setting changes (step 3 and 4) can be done via the command line using these two gconftool-2 commands:

gconftool-2 --type list --list-type string --set /desktop/gnome/sound/default_mixer_tracks [PCM]
gconftool-2 --type string  --set /apps/panel/applets/mixer_screen0/prefs/active-track PCM

Step 1. may be necessary in Hardy even if you don't appreciate this issue.

[editar] Microphone

The built-in iSight microphone (above the LCD screen) will not record out of the box, but is really easy to get working. The steps that I took to get the microphone working were:

1. right-click on the volume applet and select "Open Volume Control".

2. within the volume control application select "Edit > Preferences".

3. select "Mux" and "Input Source" at the bottom of the list, and close.

4. select the "Recording" tab and set "Mux" at about 1/3 full volume (higher results in static).

5. make sure mic is unmuted!

6. select the "Options" tab and select "Mic" as the input source.

note: the only options I have checked in "Edit > Preferences" (step 2 above) are: PCM, Input source, and Mux.

The above settings, minus the 1/3 volume level setting, can be toggled using the below commands:

gconftool-2 --set /apps/gnome-volume-control/HDAIntelAlsamixerMux --type bool 1
gconftool-2 --set /apps/gnome-volume-control/HDAIntelAlsamixerPCM --type bool 1
gconftool-2 --set /apps/gnome-volume-control/HDAIntelAlsamixerInputSource --type bool 1

[editar] Wireless

If you have a first generation MacBook (Core Duo) then your wireless should just start working, though you may want to update to the latest version as illustrated below for better power efficiency and signal strength. Second generation Mac``Books (Core 2 Duo) have a newer version of the Atheros Wifi chipset which requires the installation of the latest Atheros Mad``Wifi drivers. bug #122703

Please note that the current Mad``Wifi drivers depend on a proprietary binary, the Atheros HAL, and therefore are not open-source software. A free software implementation, OpenHAL, is currently being developed by the Madwifi devs, but unfortunately it does not support the Atheros chipset in the MacBooks yet.

The following commands compile and install the prerelease Mad``Wifi driver, insert it into the kernel, and disable background scanning for better stability. For installation, you can choose to use daily snapshots or Subversion.

Using daily snapshots:

sudo apt-get install build-essential autoconf automake
wget http://snapshots.madwifi.org/madwifi-trunk-current.tar.gz
tar -zxvf madwifi-trunk-current.tar.gz
cd madwifi-trunk-r*
make
sudo make install-modules
echo -e '#!/bin/sh\n/sbin/iwpriv ath0 bgscan 0' | sudo tee -a /etc/acpi/resume.d/99-madwifi-bgscan.sh
sudo chmod 755 /etc/acpi/resume.d/99-madwifi-bgscan.sh

Alternatively, using Subversion (be patient with the checkout, it may take a while):

sudo apt-get install build-essential subversion autoconf automake
svn co http://svn.madwifi.org/madwifi/trunk madwifi
cd madwifi
make
sudo make install-modules
echo -e '#!/bin/sh\n/sbin/iwpriv ath0 bgscan 0' | sudo tee -a /etc/acpi/resume.d/99-madwifi-bgscan.sh
sudo chmod 755 /etc/acpi/resume.d/99-madwifi-bgscan.sh

At this point the driver should be installed and will be enabled after a reboot. Alternatively, you can skip the reboot and use the following commands to insert the driver into the running kernel:

sudo modprobe ath_pci
sudo iwpriv ath0 bgscan 0

Additionally, the Mad``Wifi drivers are sometimes unstable under certain circumstances when using the standard NetworkManager tool for managing networks. Because of these reasons, you may want to disable the drivers if you aren't using wireless. To do this, edit the /etc/modprobe.d/blacklist file and add "blacklist ath_pci" at the bottom. Additionally, you can deselect the Atheros HAL in the Restricted Manager (System-Administration-Restricted Drivers Manager).

To disallow replacement of just installed modules by installing linux-restricted-modules package update you can edit /etc/default/linux-restricted-modules-common and insert ath_hal into DISABLED_MODULES list:

sudo sed -i~ -e 's/^\(DISABLED_MODULES="\)\(.*"\)/\1ath_hal \2/' -e 's/ "$/"/' /etc/default/linux-restricted-modules-common

More information can be obtained at http://madwifi.org/wiki/UserDocs/FirstTimeHowTo

If you need to connect to a channel that's not allowed in the regulatory domain in which you bought your laptop, you'll need to follow these instructions: http://tumbleweed.org.za/2008/02/11/madwifi-regdomain-issues

[editar] Ndiswrapper

If you instead want to use ndiswrapper to use the Windows wireless drivers on Ubuntu (only for 32-bit) these are the instructions:

You have to have the XP drivers on your hard disk. If you don't have a Windows XP installation on an alternate partition, you can get the drivers from the Boot Camp driver disk. The drivers from the Boot Camp disk can be uncompressed using the non-free unrar in the multiverse repository:

mkdir ~/atheros
unrar x atherosxpinstaller.exe ~/atheros/

Install the atheros drivers using ndiswrapper:

sudo apt-get install ndiswrapper-utils-1.8

Install the driver into ndiswrapper:

sudo ndiswrapper -i "~/atheros/net5416.inf"

Or:

sudo mount /dev/sda4 /mnt
sudo ndiswrapper -i "/mnt/Program Files/Macintosh Drivers for Windows XP 1.1.2/net5416/net5416.inf"
sudo modprobe ndiswrapper
sudo echo >> /etc/modules "ndiswrapper"
sudo umount /mnt

Fuente: http://paulglover.net/20061210/triple-booting-macbook-os-x-ubuntu-edgy-windows-xp/

[editar] Wicd

In order to fix the wireless for the most recent Linux kernels, you may want to install wicd (http://wicd.net) instead of using network-manager. Follow the instructions for installation on Ubuntu on their website, then use these preferences:

WPA Supplicant Driver: wext Wireless Interface: ath0 Wired Interface: eth0

All of the rest should not matter, except for your specific network settings, you should just leave them alone.

[editar] Brightness

Brightness controls should work out-of-the box using HAL and GNOME Power Manager in Ubuntu 7.10. However, there are a few issues with automatic dimming. In particular, the automatic dimming feature actually *brightens* the MacBook screen when on AC, and on battery it brightens the screen if the screen brightness has been adjusted to a value below the standard level for battery power. This is documented in bug #137598 and #63543.

Due to these issues, you may want to disable auto-dimming. This can be done by opening the Gconf Editor (gconf-editor in a Terminal will open it), and unchecking the key "enable" in "apps/gnome-power-manager/backlight". If at a later time you want to re-enable this feature (i.e. if the bug is fixed in a future update) simply return to this key and check it instead of unchecking it.

Easy fix for Macbook Pro Gutsy

I simply went into System > Preferences > Power Management

  1. I unchecked "Dim Display when idle"
  2. In the "On Battery Power" tab, uncheck "Dim Display when idle"
  3. in the "General" tab, uncheck "use ambient light to adjust LCD brightness" <<-- This seems to be the main problem, but I kept the other two unchecked just to be sure ;-)

[editar] Suspend

Suspend is broken in Ubuntu 7.10 on many first-generation MacBooks as well as some later-generation MacBooks and MacBook Pros #151016. In particular, these machines will go into suspend, but will not come out of suspend. This is because the 32bit kernel supplied with 7.10 has some issues which prevent this from working (the x86_64 kernel works correctly out of the box). 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.

https://launchpad.net/ubuntu/gutsy/i386/linux-image-2.6.22-12-generic/2.6.22-12.39
https://launchpad.net/ubuntu/gutsy/i386/linux-headers-2.6.22-12/2.6.22-12.39
https://launchpad.net/ubuntu/gutsy/i386/linux-headers-2.6.22-12-generic/2.6.22-12.39
https://launchpad.net/ubuntu/gutsy/i386/linux-ubuntu-modules-2.6.22-12-generic/2.6.22-12.32
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.

Alternatively, users who prefer a newer kernel to an older one can install the 2.6.24 kernel packages from the upcoming Ubuntu 8.04 release by adding the hardy repositories to their software sources:

deb http://archive.ubuntu.com/ubuntu/ hardy main restricted
deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb http://security.ubuntu.com/ubuntu hardy-security main restricted
Clip.png These should not replace the existing gutsy sources, but should be in addition to them. See the Repositories Howto for more information.

Once the new repositories have been added, and the package list reloaded, installing the new linux-generic should get all the necessary kernel packages from hardy, including linux-image, linux-ubuntu-modules, and linux-restricted-modules. Once the new packages are installed, disable (but don't remove) the hardy repositories, so that upgrades using apt or synaptic don't result in a complete upgrade to hardy. The user can periodically re-enable these repositories in order to check for updated kernel packages.

Rebooting into the new kernel should result in a perfectly suspending MacBook.

On my Macbook (2007), I need to edit /etc/default/acpi-support in the following way:

  • change POST_VIDEO=true into POST_VIDEO=false
  • Add sky2 in the modules to be removed before suspend and reloaded after: MODULES="sky2"
Clip.png On my MacBook (2nd gen: Nov 2006), using the hardy kernel as explained above, no change to /etc/default/acpi-support was required.

[editar] Whining noise

In order to fix the whining noise that some MacBooks make, you need to install the iSight firmware. To install the iSight firmware, follow the steps listed below under "iSight". After installing the firmware and restarting, your MacBook should be whine-free.

Clip.png The above does not always work. In that case, add the following to /etc/init.d/acpid before exit 0.
echo 2 > /sys/module/processor/parameters/max_cstate

[editar] Fonts & Desktop Effects

When using desktop effects (which are enabled by default on most MacBooks), the fonts used for menu bar titles will sometimes be larger than normal. This issue is described in detail in bug #141001.

To fix this, in /etc/gdm/gdm.conf change:

[server-Standard]
name=Standard server
-command=/usr/bin/X -br -audit 0

To:

[server-Standard]
name=Standard server
-command=/usr/bin/X -br -audit 0 -dpi 96

Restart X for this to take effect.

[editar] iSight

The iSight is currently broken in Ubuntu Hardy, please see https://bugs.launchpad.net/ubuntu/+source/linux-ubuntu-modules-2.6.24/+bug/185634

iSight works on Gutsy as long as you either 1) boot OS X before booting Gutsy or 2) install the iSight firmware in Gutsy. To install the iSight firmware, perform the following steps, substituting your Mac OS X partition for sda2 and your kernel for 2.6.22-14-generic. Please note that you need a Mac OS X partition to extract the firmware.

sudo mount -t hfsplus /dev/sdax /mnt
sudo cp /mnt/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/* /lib/firmware/2.6.22-14-generic/

Also, in /etc/default/acpi-support, edit the line that begins with MODULES such that it reads:

MODULES="isight_usb"

Restart for this to take effect. Once the firmware is functional, the iSight may be used with the "ekiga" program.

To install prerequisites and launch Ekiga (Ekiga may also be launched through the menus), do the following:

sudo apt-get install ekiga libpt-plugins-v4l2
ekiga
  1. Configuration. You may have to select the iSight device. Edit > Preferences > Devices > Video Devices >
  2. Video plugin: V4L2
  3. 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

[editar] Minimum Fan Speed

To set a minimum fan speed which may help your MacBook run cooler. Substitute your speed of choice (in RPM) for 3000 if you wish.

First you need to load the appropriate module:

sudo modprobe applesmc
echo applesmc | sudo tee -a /etc/modules

then add the following line to /etc/init.d/acpid just before the exit statement:

echo 3000 > /sys/devices/platform/applesmc.768/fan1_min

[editar] Reducing Power Consumption

PowerTOP is a program that monitors a Linux system and gives suggestions on reducing power consumption. To install PowerTOP, enter this command in a terminal:

sudo apt-get install build-essential libncurses5-dev libncursesw5-dev
wget -c http://www.lesswatts.org/projects/powertop/download/powertop-1.9.tar.gz
tar -xvf powertop-1.9.tar.gz
cd powertop-1.9
sudo make
sudo make install

You can also use “checkinstall” instead of “make install” to create a simple .deb for easier removal.

PowerTOP must always be run as root, so use the following command to run it:

sudo powertop

[editar] Reducing Drive Load/Unload Cycles

My Second Generation (C2D) MacBook is susceptible to a high load/unload cycle count on the hard drive. This is a workaround to lower the drive cycles and extend the drive life. Generate the following three files using the commands below:

echo -e '#!/bin/sh\nhdparm -B 254 /dev/sda' | sudo tee -a /etc/acpi/start.d/99-macbook-fix.sh
echo -e '#!/bin/sh\nhdparm -B 254 /dev/sda' | sudo tee -a /etc/acpi/resume.d/99-macbook-fix.sh
echo -e '#!/bin/sh\nhdparm -B 254 /dev/sda' | sudo tee -a /etc/acpi/suspend.d/99-macbook-fix.sh

Add execute permissions to the files:

sudo chmod a+x /etc/acpi/start.d/99-macbook-fix.sh
sudo chmod a+x /etc/acpi/resume.d/99-macbook-fix.sh
sudo chmod a+x /etc/acpi/suspend.d/99-macbook-fix.sh

To have these changes take effect immediately (without requiring a reboot):

sudo hdparm -B 254 /dev/sda

See this bug for more details.

Clip.png This is Ubuntu 8.04 "Hardy" on the Second Generation (C2D) MacBook. I have not tested on previous releases or other models.

[editar] Right/Middle Clicking

There are two main approaches to right/middle clicking:

  • Two/three finger taps via the synaptics touchpad driver by editing xorg.conf
  • Remapping the functions of keys on the keyboard by editing system keyboard layouts or using xmodmap and a local configuration file

[editar] Multi-finger taps

See [#touchpadtweaks More touchpad tweaks].

[editar] Keyboard keys

Enable mouse emulation:

  • On Ubuntu: Go to System ▸ Preferences ▸ Keyboard ▸ Accessibility in the Main menu. Check Enable keyboard accessibility features. Click the Mouse Keys tab and check Enable Mouse Keys also.
  • On Kubuntu: bring up System Settings, find Keyboard & Mouse, choose Mouse on the left, than the Mouse Navigation tab, and check the checkbox beside Move pointer with keyboard (using the num pad). Please note that on Kubuntu you will lose your numpad.
  • On Xubuntu: Go to Applications ▸ Settings ▸ Mouse Settings and on the Accessibility tab, enable the Enable mouse emulation check box.

Then either edit the system files or use a local configuration file and xmodmap:

  • Editing system files (choose one of the following options):
  • option 1: lower Enter key = Right Mouse Button, Shift + lower Enter key = Middle Mouse Button
sudo sed -i~ 's/KP_Enter/Pointer_Button3, Pointer_Button2/' /etc/X11/xkb/symbols/keypad
  • option 2: lower Enter key = Right Mouse Button, Alt Gr key + lower Enter key = Middle Mouse Button

sudo sed -i~ 's/KP_Enter/Pointer_Button3, Pointer_Button3, Pointer_Button2, Pointer_Button2/' /etc/X11/xkb/symbols/keypad

  • Using xmodmap and a local configuration file to override the system-wide layouts:
  • The keycodes for relevant keys are:
  • right Apple - keycode 116
  • lower enter - keycode 108
  • The keysyms for relevant input events are:
  • Alt Gr - ISO_Level3_Shift
  • Middle-click - Pointer_Button2
  • Right-click - Pointer_Button3
  • Create a text file as ~/.xmodmap containing the following text:
Clip.png for my set up I use left Apple as Alt Gr, right Apple as middle-click and lower enter as right-click. If you want to use right Apple as Alt Gr then you may need to rethink your keys for clicks assignments.
keycode 116 = Pointer_Button2
keycode 108 = Pointer_Button3
  • Add a call to xmodmap to your startup applications:
  • On Xubuntu: Go to Applications ▸ Settings ▸ Autostarted Applications, click the Add button, fill in the Name and Description fields and put the following into the Command field:
xmodmap ~/.xmodmap

Then click OK and Close.

Restart X (Ctrl+Alt+Backspace) for the changes to take effect.

[editar] Motion Sensor

The motion sensor doesn't support disk parking yet (bug #139881), but you can play physical neverball :-)

sudo modprobe applesmc
echo applesmc | sudo tee -a /etc/modules

Then fire up neverball... (or any other game that uses a joystick)

[editar] Keyboard layouts

(Xubuntu 7.10 UK MacBook) There are some MacBook / MacBook Pro keyboard models defined in xkb, however, I have found that the Apple Laptop model with layout as gb (for my UK MacBook) and variant as mac with the xmodmap configuration as below. Maybe this approach will work well for others.

To make the keyboard usable, for an international keyboard layout:

    1. TODO cjwatson 2007-03-27: is this still required in Ubuntu 7.04? Changes like this won't be preserved on upgrade any more, so aren't recommended.
  • The GUI way:
Bring up the Keyboard Preferences window with System ▸ Preferences ▸ Keyboard from the Main menu. Click on the Keyboard Layout Options tab, and find Third level choosers. Mark the right Win key as third level chooser. Now your right Apple key works as Alt Gr.
  • The console way, editing system files:
  • Alt Gr for right Apple key
sudo sed -i~ '/xkb_symbols "ralt_switch" {/a\  include "level3(rwin_switch)"' /etc/X11/xkb/symbols/level3
  • Fix swapped keys:
sudo sed -i~ 's/    <LSGT> =  94;/    <LSGT> =  49;\n    <TLDE> =  94;/' /etc/X11/xkb/keycodes/xfree86
  • The console way, using xmodmap and a local configuration file:
  • keycodes for relevant keys:
  • left Apple - keycode 115
  • right Apple - keycode 116
  • § or ± (UK MacBook key beneath escape) - keycode 49
  • ` or ~ (UK MacBook key left of z) - keycode 94
  • keysyms for relevant characters/functions:
  • Alt Gr - ISO_Level3_Shift
  • § or ± - section plusminus
  • ` or ~ - grave tilde
  • To fix the swapped keys and make left Apple equivalent to Alt Gr, edit a text file at ~/.xmodmap (create it if it doesn't exist) adding the following lines:
keycode 115 = ISO_Level3_Shift
keycode 49 = section plusminus
keycode 94 = grave asciitilde

Then add xmodmap ~/.xmodmap to your start up.

Restart X (Ctrl+Alt+Backspace) for the changes to take effect.

To swap the fn key behaviour:

#Add one of these commands to /etc/rc.local
echo -n 0x01 > /sys/module/hid/parameters/pb_fnmode #FN on (like OSX)
echo -n 0x02 > /sys/module/hid/parameters/pb_fnmode #FN off (press fn for volume/brightness/etc)

[editar] Screen Colors (optional)

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 2 in /dev/sda2, 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/sda2 /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.

[editar] Fonts like Mac OS X (optional)

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 a terminal and do "sudo dpkg-reconfigure fontconfig-config". Set font hinting to "None" and leave the rest of the options as default. 2. Paste the following into a new file entitled "/etc/fonts/conf.d/lcd-legacy.conf":

<fontconfig>
  <edit name="lcdfilter" mode="assign"><const>legacy</const></edit>
</fontconfig>

3. Install any fonts you commonly use on Mac OS X. (Note: the Microsoft Core Fonts - which are commonly used in Office documents and online - can be installed using Add/Remove Programs). 4. Enjoy!

[editar] More touchpad tweaks

To enable touchpad scrolling/tapping/right-click:

You will need to edit the xorg.conf file (in /etc/X11/xorg.conf).

For more information than is available below, read man synaptics!

Replace the Synaptics Touchpad InputDevice section with the following:

  • Basic device definition layout:
Section "InputDevice"
        Identifier      "Synaptics Touchpad"
        Driver          "synaptics"
        Option          "SendCoreEvents"        "true"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "auto-dev"
        Option          "SHMConfig"             "true"
...insert other options from below here...
EndSection
  • General options affecting the touchpad edge areas, speed, touch sensitivity, etc. Note that if not using edge scrolling, the edge boundaries can probably be decreased but the edge offsets will need to be reasonable (as below?) if edge scrolling is being used:
        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          "SingleTapTimeout"      "100"
        Option          "MaxDoubleTapTime"      "180"
        Option          "LockedDrags"           "off"
        Option          "MinSpeed"              "1.10"
        Option          "MaxSpeed"              "1.30"
        Option          "AccelFactor"           "0.08"
  • Options affecting taps for button clicks:

Buttons 1, 2 and 3 correspond to the left, middle and right mouse buttons respectively. If you set the values to 0, the method will be disabled. The TapButton options are for one, two or three finger taps. The CornerButton options are for one finger taps in the right-top (RT), right-bottom (RB), left-top (LT) and left-bottom (LB) corners of the touchpad. Generally you will want to use either corner taps or multi-finger taps, not both.

  • Multi-finger taps

The following example uses a one-finger tap for left-click, a two-finger tap for right-click and a three-finger tap for middle-click (and the physical button can still used for left-click):

       Option          "TapButton1"            "1"
       Option          "TapButton2"            "3"
       Option          "TapButton3"            "2"
  • One-finger corner taps

The following example uses the right-bottom corner for middle-click and left-bottom corner for right-click (and the physical button is still used for left-click):

       Option          "RTCornerButton"        "0"
       Option          "RBCornerButton"        "2"
       Option          "LTCornerButton"        "0"
       Option          "LBCornerButton"        "3"
  • Options affecting scrolling:

You can either use edge scrolling or two-finger scrolling (as in Mac OS X) but you won't generally want to use both.

  • Scrolling speed

The following options affect how far you have to move your finger across the touchpad to affect a scroll. Smaller values should make scrolling faster.

       Option          "VertScrollDelta"       "20"
       Option          "HorizScrollDelta"      "50"
  • Edge scrolling

The following options toggle whether moving a finger along an edge of the touchpad invokes scrolling. Set to 0 to disable.

       Option          "HorizEdgeScroll"       "1"
       Option          "VertEdgeScroll"        "1"
  • Two-finger scrolling

The following options toggle whether moving two fingers horizontally or vertically over the touchpad invokes scrolling. Set to 0 to disable.

       Option          "VertTwoFingerScroll"   "1"
       Option          "HorizTwoFingerScroll"  "1"
  • Additional useful information
  • Firefox horizontal scrolling behavior

With two finger scrolling enabled, you will probably want to change Firefox's horizontal scrolling behavior. To do so, open Firefox, go to the URL "about:config", and change the following settings:

mousewheel.horizscroll.withnokey.action from 2 to 0
mousewheel.horizscroll.withnokey.numlines from -1 to 1
  • Disable the touchpad temporarily while typing

It is useful to have the touchpad not use click or scroll events while you are typing. The information for this was found here. Make syndaemon start up by default each time you login, add it to the list of Startup Programs in System -> Preferences -> Sessions. Add the following command:

syndaemon -t -d

Restart X for changes to take effect with Ctrl-Alt-Backspace

[editar] Examples

  • Example 1

With the following settings, two finger scrolling is enabled as in Mac OS X. Right-click is done by tapping the bottom-left corner of the touchpad, and middle-click is done by tapping the bottom-right corner of the touchpad.

Section "InputDevice"
       Identifier      "Synaptics Touchpad"
       Driver          "synaptics"
       Option          "SendCoreEvents"        "true"
       Option          "Device"                "/dev/psaux"
       Option          "Protocol"              "auto-dev"
       Option          "SHMConfig"             "true"
       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          "LockedDrags"           "off"
       Option          "MinSpeed"              "1.10"
       Option          "MaxSpeed"              "1.30"
       Option          "AccelFactor"           "0.08"
       Option          "TapButton1"            "0"
       Option          "TapButton2"            "0"
       Option          "TapButton3"            "0"
       Option          "RTCornerButton"        "0"
       Option          "RBCornerButton"        "2"
       Option          "LTCornerButton"        "0"
       Option          "LBCornerButton"        "3"
       Option          "VertScrollDelta"       "20"
       Option          "HorizScrollDelta"      "50"
       Option          "HorizEdgeScroll"       "0"
       Option          "VertEdgeScroll"        "0"
       Option          "VertTwoFingerScroll"   "1"
       Option          "HorizTwoFingerScroll"  "1"
EndSection
  • Example 2

With the following settings the Synaptics Touchpad configuration should be closer to Mac OS X. Right-click using a two-finger tap and scroll by moving two fingers across the touchpad.

Section "InputDevice"
       Identifier      "Synaptics Touchpad"
       Driver          "synaptics"
       Option          "SendCoreEvents"        "true"
       Option          "Device"                "/dev/psaux"
       Option          "Protocol"              "auto-dev"
       Option          "SHMConfig"             "true"
       Option          "LeftEdge"              "10"
       Option          "RightEdge"             "1200"
       Option          "TopEdge"               "10"
       Option          "BottomEdge"            "370"
       Option          "FingerLow"             "10"
       Option          "FingerHigh"            "20"
       Option          "MaxTapTime"            "180"
       Option          "MaxTapMove"            "220"
       Option          "SingleTapTimeout"      "100"
       Option          "MaxDoubleTapTime"      "180"
       Option          "LockedDrags"           "off"
       Option          "MinSpeed"              "1.10"
       Option          "MaxSpeed"              "1.30"
       Option          "AccelFactor"           "0.08"
       Option          "TapButton1"            "1"
       Option          "TapButton2"            "3"
       Option          "TapButton3"            "2"
       Option          "RTCornerButton"        "0"
       Option          "RBCornerButton"        "0"
       Option          "LTCornerButton"        "0"
       Option          "LBCornerButton"        "0"
       Option          "VertScrollDelta"       "20"
       Option          "HorizScrollDelta"      "50"
       Option          "HorizEdgeScroll"       "0"
       Option          "VertEdgeScroll"        "0"
       Option          "VertTwoFingerScroll"   "1"
       Option          "HorizTwoFingerScroll"  "1"
EndSection

[editar] DVI Output (gutsy)

These instructions worked perfectly for setting DVI output on my MacBook.

extended display - These instructions worked for me. A little more to the point than the above link.

Advert.3.png Screen and Graphics Preferences is currently dangerous. It completely broke my /etc/X11/xorg.conf on my first reconfiguration attempt.

[editar] Misc

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.

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

edit 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

The update your grub configuration:

sudo update-grub

On this example, the swapfile is on partition /dev/sda3.

You are now able to use suspend on disk (hibernate).

[editar] Fuentes

Herramientas personales