MacBook Pro 7,1 Ubuntu 10.10 (Maverick Meerkat)
This page aims to describe the steps needed, to fully enable all features of the 13.3 (MBP 7,1) when using Ubuntu 10.10, Maverick Meerkat.
Much of this page (even the formatting, I admit) is just taken from the guide for Lucid, so thank you to the contributor of that page. My goal is to make this specialized to Maverick and update a couple of the guides and fixes that worked and were documented for Lucid.
Please note that before going through any of the suggested fixes for this hardware, or installing any additional drivers, please make sure you RUN UPDATE MANAGER first and apply all updates to the system.
You can find out what model you have by typing at the terminal:
sudo dmidecode -s system-product-name
If you have a different model, please go here and find the right wiki.
Overview
Anything not mentioned here probably already works out of the box. If not, please refer to the Ubuntu Apple Users forum.
Feature
Support status
(works out-of-the-box)
(works, with remarks)
(needs manual install)
(won't work)
(not yet documented)
Basic Installation Instructions
Common things about installing and maintaining Ubuntu on Intel-based Macs: Intel CPU-based Macintosh Generic Installation Instructions.
Most 7,1 models come with 4GB of RAM. Both the CD and DVD installer of Ubuntu automatically installs the PAE enabled kernel if it detects more than 3 Gb of available memory, however the PAE kernel packages are not present on the CD. If you do not have an Ethernet cable connected when installing you will only be able to access under 3GB. If you do not have a network connection you can always use the following command to install the PAE kernel afterwards:
sudo apt-get install linux-generic-pae linux-headers-generic-pae
Package Support for Intel Macs
You need some modules from the MactelSupportTeam/PPA :
sudo add-apt-repository ppa:mactel-support && sudo apt-get update
The mactel PPA modules needed on Ubuntu on this MBP are applesmc-dkms (driver for light sensor, temperatures, fans and keyboard backlight), nvidia-bl-dkms (driver for the LCD panel backlight) and pommed (daemon to control them all).
Sensors
The program lmsensors detects the sensors, however it does not know what they are yet. But coretemp will allow lm-sensor to detect the others sensors, the rotation speed of the fan and the GPU temperature.
sudo modprobe coretemp
Then add coretemp to the list of modules loaded during the boot process:
sudo gedit /etc/modules
It is highly recommended to use the fan controller daemon that is included in the mactel-support ppa called macfanctl. After enabling the ppa as shown above you can add this tool with the following command:
sudo apt-get install macfanctld
After installation you there is a config file located at /etc/macfanctl.conf. The default configurations seems to work well.
Suspend
Works without problem.
Screen
Installing the current version of nvidia-bl-dkms (0.17 or greater) will enable the control of the screen backlight with the keyboard keys F1 and F2. The help is then accessible from fn-F1.
sudo apt-get install nvidia-bl-dkms
Then promote this module
sudo modprobe nvidia-bl
Colors
MacBook Pros can use a program called xcalib to emulate the screen coloring calibration of OS X:
sudo apt-get install xcalib sudo mount -t hfsplus /dev/sda2 /mnt #(this mounts the mac partition [/dev/sda2] on /mnt) sudo mkdir /etc/xcalib sudo cp /mnt/Library/ColorSync/Profiles/Displays/* /etc/xcalib
Then, do an ls /etc/xcalib 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/kde4/kdm/Xsetup (for Kubuntu/KDE), before the final "exit" statement:
/usr/bin/xcalib "/etc/xcalib/<insert name of profile here>"
Restart X by logging out and logging back in, or typing sudo /etc/init.d/gdm restart and your Mac OS X color profile will load as X starts.
Battery
This is kind of irrelevant, the biggest obstacle to battery life is usage, and everyone uses it differently.
Ethernet
Works without problems, but get crazy regarding the power management:
WARNING, this broke my wired connection, apply only if necessary.
sudo gedit /etc/modprobe.d/blacklist.conf
and add at the end of the file:
blacklist forcedeth
Reboot
Run
gksudo gedit /etc/default/grub
and change the line
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash reboot=pci"
Now, on the terminal run
sudo update-grub
Finally, ask the computer to shutdown, then complete the shutdown by pressing the power button during five seconds when the shutdown process is stuck, wait few more seconds until the hard drive stop spinning and power it on again. Now it should work normally.
Touchpad
Coming soon. This section will document a newish project that enables the multitouch functions fully, including two-finger click and drag.
$ sudo add-apt-repository ppa:mactel-support && sudo apt-get update $ sudo apt-get install bcm5974-dkms xserver-xorg-input-synaptics
--
Additional notes on touchpad:
Works. Side vertical scrolling is enabled by default, but two-finger scrolling and horizontal scrolling can be enabled through the mouse preferences. Single click works as expected (tap or press); right click is a tap or press with two fingers, and middle click (paste) is a tap or press with three fingers, and click and drag is a tap/click and slide. Swiping works as well, three finger swipe up is "back", three finger swipe down is "forward".
The touchpad by default (as described above) uses 'tap-to-click'. 'tap-to-click' doesn't work well for many people because the touchpad is so large and it is easy to palm or graze the touchpad which can be quite distracting.
The easiest thing to do is simply disable 'tap-to-click'. Go to System/Preferences/Mouse, click the Touchpad tab, then uncheck 'Enable mouse click with Touchpad'. With this configuration, when doing click and drag operations you will have to lift your finger and reclick if you reach the edge of the touchpad.
This situation can be improved by using the xf86-input-multitouch driver and bcm5974-dkms kernel driver from the mactel PPA. The multitouch driver has no configuration at this time and you cannot disable 'tap-to-click' via System/Preferences/Mouse. People can try the one in ppa:jdstrand/ppa, which is the driver from the mactel ppa with #define use_tapping 0 set in src/memory.c (and on Lucid also with a backported mtdev library). Once 'tap-to-click' is disabled and the bcm5974 and multitouch drivers are enabled, click and drag operations become clicking and holding at the bottom of the touchpad with one finger, and then using another finger to perform the drag (eg, to move a window, put the cursor on the title bar, click and hold with your thumb and then use your index finger to move the window). One, two and three finger clicks all work as expected (ie, one finger = left click, two finger = right click and three finger = middle click).
To enable the multitouch drivers, run this in a console:
sudo apt-get install xf86-input-multitouch bcm5974-dkms
Then add this to xorg.conf:
Section "InputClass" MatchIsTouchpad "true" Identifier "Multitouch Touchpad" Driver "multitouch" MatchDevicePath "/dev/input/event*" EndSection
Then reboot (so that the new bcm5974 kernel module is loaded and X is restarted).
"Disable touchpad while typing" does not seem to work, but if you disable 'tap-to-click' this shouldn't be a problem.
NOTE: In Lucid and later, xorg is partially configured via snippets in /usr/{lib,share}/X11/xorg.conf.d. In particular, the synaptics configuration may override your multitouch configuration if you put the above into the xorg.conf.d directory. To ensure that the multitouch configuration is not overridden, it is recommended that the above be added to the /etc/X11/xorg.conf file (usually created when configuring the nvidia driver, but can also be created to have only the above snippet) which takes precedence over the xorg.conf.d snippets. Some forums documentation suggests that the MatchDevicePath "/dev/input/event*" is not needed, but in practice if the xserver-xorg-input-all package is installed (the default in Ubuntu) the synaptics driver could be picked up instead (as seen in /var/log/Xorg.0.log). The above snippet makes sure that the multitouch driver is loaded for all touchpad devices on the system.
FireWire
Works out of the box.
Video
You can enjoy 3D acceleration by using the nVidia proprietary driver which can be retrieved in the Ubuntu Hardware Drivers menu. This operation will change the screen resolution appearing at every boot and shutdown of your laptop. If you want to get back the right resolution do as follow:
Install v86d
sudo apt-get install v86d
Edit GRUB configuration file
sudo gedit /etc/default/grub
Add to the line...
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
The following:
nomodeset video=uvesafb:mode_option=1280x800-24,mtrr=3,scroll=ywrap
If you already applied the previous modifications on this line you should get:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1280x800-24,mtrr=3,scroll=ywrap reboot=pci"
Close it and edit initramfs configuration file:
sudo gedit /etc/initramfs-tools/modules
Add at the end of the file,
uvesafb mode_option=1280x800-24 mtrr=3 scroll=ywrap
Close it and launch the following command,
echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
Update GRUB,
sudo update-grub
Update initramfs,
sudo update-initramfs -u
--
Bug: There is a known issue with the video on this model. When watching video there may be lines when watching video. If you have this issue, please see Bug #681465 - nvidia-current - Video has horizontal lines on Nvidia GeForce 320M which affects both nvidia-current (closed source) and nouveau (open source).
HFS+
- Read Only: Confirmed working out of the box.
- Read/Write: It is necessary to disable journal:
- Login macos and open a terminal.
- Identify the partition.
- Run diskutil to disable journaling.
$ mount /dev/disk0s2 on / [...] $ sudo diskutil disableJournal force /dev/disk0s2 Journaling has been disabled for volume [...] on disk0s2
Keyboard
If you want to invert the Control and Command keys to have the same configuration as Mac OS X you can create the following file:
# gedit ~/.xmodmap
and copy the following into it
! ! xmodmap script to swap right control & right command key ! ! remove both keycodes (to which Control_L & Super_L is attached) ! from previous modifier map remove control = Control_L remove mod4 = Super_L Hyper_L ! swap keysyms keysym Control_L = Super_L Hyper_L keysym Super_L = Control_L ! re-add both keycodes to respective modifier maps add control = Control_L add mod4 = Super_L Hyper_L ! ***** end of source *****
Close this file. Now you can activate it with
# xmodmap ~/.xmodmap
Next time you will boot and get to the desktop you will have to choose if this configuration has to loaded at every boot.
External Monitor
Nouveau drivers (which ship with Ubuntu by default) do not support external monitor Bug #681555. For external monitor to work, the nVidia binary driver needs to be installed (System > Administration > Additional Drivers).
With the latest nVidia drivers installed, the Mini Display Port and adapters work out of the box.
To enable a cycle displays function (which is handy if you do a lot of presentations) you can use disper and a small script to switch through the modes "LCD/External/extend over LCD+Ext./Clone"
Install disper:
sudo add-apt-repository ppa:disper-dev/ppa sudo apt-get update && sudo apt-get install disper
create a script called /usr/bin/display_mode_switcher.sh
status_folder="~/.display_mode_switcher/" status_file_name="status.txt" status_file=$status_folder$status_file_name if (cat $status_file); then echo "Swtichting display mode.." else echo "No status file found. Creating "$status_file mkdir -p $status_folder echo "0" > $status_file fi status=$(cat $status_file) if [ "$status" -eq "0" ]; then echo 1 > $status_file disper -s elif [ "$status" -eq "1" ]; then echo 2 > $status_file disper -S elif [ "$status" -eq "2" ]; then echo 3 > $status_file disper -e elif [ "$status" -eq "3" ]; then echo 0 > $status_file disper -c else echo 0 > $status_file disper -s fi
make the script executable for everyone
sudo chmod ugo+rx-w /usr/bin/display_mode_switcher.sh
If you have compiz running use "CCSM->commands" to assign display_mode_switcher.sh to Fn+F3. Alternatively you can use "System->preferences->keyboard shortcuts" or add it to .xmodmap as explained in the keyboard section.
Wireless
In the Ubuntu Hardware Drivers menu you can choose a wireless driver. There is a free and a proprietary driver. The proprietary driver is known as working, also with WPA2. You can have difficulties to activate it before general updates have been performed so manage to get a wired connection to make this initial updates:
sudo apt-get update sudo apt-get dist-upgrade
I was seeing very bad performance using wireless. I discovered that the default power management state was causing frames to be dropped which in turn caused very high latency. I addressed this by turning off power management on the wireless interface. This probably has a negative effect on battery life but I would prefer a network connection that performs well.
You can disable power management manually by running the following command:
/sbin/iwconfig eth1 power off
You can automate this by placing a script named wireless in /etc/pm/power.d:
!/bin/sh # /etc/pm/power.d/wifipower # Matt's Macbook Pro 7,1 wifi power adjuster # # I've found that turing off power management fixes performance problems with the # BCM4322 802.11a/b/g/n Wireless Controller found in the Macbook Pro 7,1 # /sbin/iwconfig eth1 power off
Make sure to make the script executable:
sudo chmod +x /etc/pm/power.d/wifipower
Bluetooth
Works after installing bluetooth package from mactel PPA repository. Restart after install to get bluetooth working.
sudo apt-get install btusb-dkms
Webcam
The iSight works out of the box. You can test it using cheese or any other of your choice.
Sound
From the terminal, type:
gksudo gedit /etc/modprobe.d/alsa-base.conf
Add the following line to the end of the file.
options snd-hda-intel model=mbp55
Save and close the file, then reboot.
Front speakers is initially muted and need to be unmuted,
alsamixer
Then use the key M to mute/unmute the channels front speaker and surround. You can also mute S/PDIF and S/PDIF-D channels if you don't use a digital cable, this will save battery.
My alsamixer settings were not restored after reboot. This caused the S/PDIF to come back in an enabled state after every boot. To make it stay off I did the following:
Muted S/PDIF using alsamixer
Issued the following command:
sudo /sbin/alsactl store 0
Then I added a new startup application using Startup Applications under the System -> Preferences menu. I used the following settings in Startup Applications Preferences:
Click Add Name: Restore Alsa State Command: /sbin/alsactl restore Comment: Turn off Optical Out
Now the optical audio out will turn off when you login.
Microphone
The microphone is muted out of the box. Go to System-->Preferences-->Sound-->Input and either move the slider to 100%. You can snap your finger or speak in front of your laptop to see the capture bar moving and adjust it if needed.
If you are using skype, don't forget to turn off automatic volume adjustment in skype program: Options > Sound Devices > Allow Skype to automatically adjust my mixer levels
|