Macbook Pro 7,1 and Ubuntu 12.10 (Quantal Quetzal)


This page aims to describe the steps needed, to fully enable all features of the 13.3 MacBookPro 7,1 (release date: mid 2010) when using Ubuntu 12.10, codename 'Quantal Quetzal'.

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.

For this helping guide I use gedit, the standard text-editor in Ubuntu. You can also use your own favourite text-editor like leafpad, geany, nano or vim, it shouldn't matter.

IconsPage/terminal.png 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

Almost everything listed here works out of the box, linked entries lead to further information and help:

IconsPage/ok.png (works out-of-the-box) IconsPage/ok.png IconsPage/info.png (works with remarks) IconsPage/warning.png (needs manual install) IconsPage/dont.png (won't currently work) IconsPage/question.png (not yet documented)

Basic Installation Instructions

Common things about installing and maintaining Ubuntu on Intel-based Macs: Intel CPU-based Macintosh Generic Installation Instructions.

Dual/Triple Boot, Basic Installation Instructions

If you are attempting to dual or even triple boot (OSX as standard, and optional with Windows or Ubuntu or both) you probably at least installed rEFITt. Many are saying to use bootcamp for dividing up the HDD.

But there are more elegant ways to do it without bootcamp as it only supports limited filesystems to format.

Please have a look in this Forum or this Blog. Neither of them uses bootcamp and it works fine.

Colors

Works on fresh install.

For a better colour profile, please use Colord to configure the colour profiles of several devices like display or webcam, similar to the color profiling tools in OS X.

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 sensors-detect

All the temperatures and sensors should work on fresh install.

It is highly recommended to use the fan controller daemon that is included in the mactel-support ppa called macfanctl.

sudo add-apt-repository ppa:mactel-support
sudo apt-get update
sudo apt-get install macfanctld

After installation it, there is a config file located at /etc/macfanctl.conf. The default configurations seems to work well.

Suspend & Hibernate

Works on fresh install.

Hibernation is deactivated by default though.

Shutdown & Reboot

If your macbook won't shutdown unless you hold down the power button, use the nvidia-experimental-304 driver under:

Software Sources -> Additional Drivers

More info here.

HFS+

You have to disable journaling from MacOS X (do not fear, this is really not harmful, there are practically no differences, it is just that with journaling you won't be able to change anything on the system, maybe for good, if you're absend and somebody has access to your MacbookPro, even if it's turned off) on the partitions you want to see on Ubuntu. If you to change the files without being root, you must have the same user id on both MacOS X and Ubuntu.

Wireless (AirPort)

If you just installed Ubuntu on you Notebook, you'll see that the Wireless LAN is deactivated, maybe with some words like 'firmware is missing'.

As you can tell, some driver is missing, it needs the 'Broadcom STA wireless driver', which can be easily be installed on this way:

Software Sources -> Additional Drivers

This is listing possible missing drivers in your system, amongst them the Wireless LAN driver from Broadcom. After installation, reboot your computer and your Wireless LAN should be working.
If there are performance problems (as for me, there are none), have a look at the broadcom website and compile the latest Wireless LAN driver. But this should't be necessary.

If you have the problem that the connection often crashes, try to add the BSSID of your router/access point in WLAN settings.

WebCam (iSight)

Works on fresh install.

It'll be automatically be recognised by programs, which needs the WebCam. If it's turned on, you can see a green control light next to the camera.
If you want a program similar to 'Photo Booth', please have a look at 'Cheese' as described here on the Ubuntu Wiki.

Touchpad (appletouch)

Works on fresh install.

Fine-tuning the touchpad

You can play with other options offered by Synaptic input drivers that are explained here and in this blog post.

Video/Graphic Card

Works on fresh install.

Now there are the additional hardware suggestion to install proprietary drivers. Without is fine too.

But at the latest, you'll see that some linux games or just graphic card based programs works fairly slow or even not show a proper rendering.

The driver you have after installation is the Nouveau display driver, in short 'nouveau'. This is the Open Source driver for all NVIDIA running system with linux. And the MacBookPro of mid 2010 is using a NVIDIA graphic card.

Why proprietary (for now)?

Okay, so here I'm suggesting you to switch to a proprietary driver (in other words 'close source' or 'don't know how it works, but it works' program) rather than keep on using the preinstalled OpenSource driver? What are the benefits to do this?

  1. The proprietary drivers is from the nvidia company directly, they know the specification of each graphic card they have (well, they develop and manufacture them, so no surprise), so they can enhance the driver until each graphic card breaks.

    On the other hand, the nouveau driver is 'reverse engineered', in other words, the developers mostly don't know the graphic cards specifications and API and have to experiment until their code works. They have made good progress though.
    For more information you can visit their side and look for the current status.

  2. The proprietary driver is (currently in sum) faster and less flawed than the OpenSource driver, especially in rendering complex 3D graphics. There are various Benchmarks you can find about these drivers, so feel free to investigate it yourself.

  3. You have some extras like 'vdpau' or a complete UI based control center to config or even overclock your graphic card like you want. The OpenSource driver hasn't reached this level yet, but we will see, how that will look like for Ubuntu 13.04 or 13.10 from now on.

  4. Ubuntu itself has made the installation of the proprietary driver very easy, so that you shouldn't have any problems with this. In the following I explain how to activate, use and configure the driver correctly in Ubuntu 12.10 (that means some explanation won't do for earlier versions of Ubuntu).

Activate proprietary nvidia driver

Like the Wireless LAN problem, you just do:

Software Sources -> Additional Drivers

This time search for NVIDIA and look for a combination of 'NVIDIA binary Xorg driver' and 'nvidia-current' (not 'nvidia-current-updates'). Activate this, reboot and wonder why you can't change the brightness and why the resolution on startup are messed up.

To re-enable the brightness buttons after installing the proprietary Nvidia video driver, open a terminal and edit:

nvidia-xconfig

The command above create a new 'xorg.conf', if there are non, which is sometimes the case. The following command opens this file:

sudo gedit /etc/X11/xorg.conf

Search for Section "Device" and edit the file as below (note that yours might not be exactly the same as here):

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 320M"

    #This following line actually enables the brightness control
    Option  "RegistryDwords" "EnableBrightnessControl=1"

EndSection

Now another quick reboot and your brightness control should be working now.

Fine-tuning Xorg nvidia driver

In the Section "Device", you can also add some useful extra options to make your system a little bit better or even fix some annoying problems:

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 320M"

This disables the logo, which is shown on boot up:

    Option         "NoLogo" "True"

This allows you to use OpenGL while compositing is running:

    Option         "AllowGLXWithComposite" "true"

This enables the power saving

    Option         "DPMS" "1"

This disables vblank interrupts

    Option         "OnDemandVBlankInterrupts" "1"

These are various options you can set, and besides the Brightness control, there are some powersave settings, which can help to reduce the power consumption on the graphic card:

    Option         "RegistryDwords" "EnableBrightnessControl=1; PowerMizerEnable=0x1; PerfLevelSrc=0x2233; PowerMizerDefault=0x3"

Warning! Only activate this line if you are sure about this!
This line activates the OverClocking feature in the driver, so be careful if you overclock your card, you are responsible for the outcome.

    Option         "Coolbits" "true"

EndSection

Like above, reboot your system and enjoy the result you get after this little tuning.

GPU powered movie watching - vdpau

[...] This VDPAU API allows video programs to offload portions of the video decoding process and video post-processing to the GPU video-hardware. [...]

from wikipedia

One of the most exciting benefits with the proprietary driver is without a doubt the GPU based rendering of not only games or 3D modelling (with i.e. Blender), but even for just watching movies or maybe image manipulations. And fortunately the graphic card inside the MacBookPro 7.1 is able to make use of this.

First, to enable this feature we have to install the API-library, so open a terminal and enter:

sudo apt-get install libvdpau1 vdpauinfo

That's all! But how do we make use of them? Yes, we have to tell your favourite movie player (if it can handle it), that we want let our CPU rest and let the GPU work.

For example to enable hardware acceleration in MPlayer edit '~/.mplayer/config' and add these:

vo=vdpau
vc=ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffh264vdpau,ffodivxvdpau

If mplayer then crashes on some videos, just append i.e. a '-vo gl' to your command. Now it uses the gl library to render your movies, which should always work, but this runs on the CPU again.

Install SMplayer or Gnome MPlayer for a video player based on mplayer with a user friendly interface. This way you can configure this inside the program easily.

For more feel free to research this.

External Monitor

Once upon a time one has the desire to connect his/her Notebook to a Screen far bigger than the own. But unless the monitor has a build in DisplayPort (left from the USB port on the left), one has to buy an adaptor to connect oneself with the monitor.

Even if you have a MacbookPro newer than 7.1, namely the ones with Thunderbolt, fear not! Thunderbolt is designed to be backwards compatible to DisplayPort. So even if you have dozen of DisplayPort cable laying around but have the newest MacbookPro (since Feb. 2011), you can go on reading this and use them.

Some info as intro

As you know, there a not only one but many different way to connect a pc or notebook with a monitor. So there are many adaptors for the MacbookPro to buy. The currently most used are VGA and HDMI, and the main different can't be any bigger than the fact that one is analogue and one is digital. By the way, there is also DVI, which can put through both analogue and digital.

VGA is often used in schools, universities and various home computers, while HDMI often can be found in Home Cinema, newer generation of monitors and also coming generation, some newer devices in school and universities and many other places.

If you had the chance to look for an adaptor, you'll notice that those with DVI or VGA are often more expensive than HDMI, why? The DisplayPort sends the data digitally, but VGA needs analogue signals, so the adaptor has to convert it to analogue, which makes them more expensive because of this converter. HDMI is already digital, so there are no problem to produce cheap but good working adaptors.

There are reasons to use HDMI, because it is mostly standard in many living rooms and almost no device nowadays doesn't have the ability to connect with HDMI, so presume this as a "at-least-working" feature for now and coming future. There is also an ethernet feature inside HDMI cables, but for now, this is something you don't need for an external monitor, trust me. But of course you're free to buy any adaptor you need.

So of course there are no harm to buy other types of adaptors. As long as you can connect your monitor to it, the graphic card should be able to handle it.

Nvidia and TwinView

What is TwinView? As the name implies it weakly, this is the magical spell which can expand your monitor to other connected monitors like in other operating systems. I assume you are currently using the proprietary driver from nvidia, because nouveau doesn't know TwinView.

Before you connect your system with the monitor, call your Xorg.conf again by:

sudo gedit /etc/X11/xorg.conf

and add this lines inside the Section "Device", like the part Activate proprietary nvidia driver:

    Option         "TwinView" "on"
    Option         "TwinViewOrientation" "RightOf"

The lines above activates TwinView. The line below the first is to connect the new expanded monitor on the right of the main screen right away.

Starting with an HDMI adaptor you just have to connect this to your device which can handle this port interface. Search for the HMDI port in the menu of your monitor or TV and choose them and activate it.

Then go to:

NVIDIA X Server Settings -> X Server Display Configuration

Here you can see the layout of the current running display, in this case it should be the Apple (DFP-0), which is selected and activated. If the cable is connected correctly and both system are recognising each other, you will not only see your own screen, you will be able to see another screen in the layout setting (i.e. 'SamXXng TV xyz' or something like that), which is right of the main rectangle and is deactivated for now.

The fun starts now after you select the other screen by choosing it in the Selection drop down box or just click on the deactivated screen.

At first you will see, that it says 'disabled' in the Resolution section. But now you can choose one of many resolution, as many as your external monitor can handle. If you apply after choosing a resolution, it will warn you that it will handle what is possible.

At this point you now should see your background on the external screen.

Now you can drag windows from one monitor to another and so on. You will also notice that the configuration has switched to TwinView.

For further, you can configure it to be Absolute somewhere on the screen. This enables you to drag your monitor on a position you like.

Nvidia and separate X-Screen

This is a little different than TwinView, because you can't drag your windows into other screens. Every screen has their own environment. This doesn't require TwinView.

HDMI and Sound

Another cool feature of HDMI is to be able to transmit sound too! For this, as I could experiment until now is like this:

mplayer <your favourite movie> -ao alsa:device=plughw=0.7

The line above says, that mplayer shall use the alsa output, then of the nvidia the plughw card 0 port 7. Just try it, but be careful that you only can use one program which make use of this port per time.

If it still doesn't work, try to type this:

dmesg | grep HDMI

And look for the right number. Play around with the numbers, wrong digits won't make any harm. Unfortunately there're no easier method to connect with the sound channel on HDMI, if there are better solution, don't hesitate and tell us.

Further Documentation and testing needed.

Keyboard functions

Works on fresh install.

Install the package pommed to enable Apple specific keys as volumes, media, brightness.

Edit: pommed seems not to be needed anymore. For backlight and brightness lightum works great: Display brightness and keyboard brightness is regulated by using the light sensor. It could also dim display & keyboard backlight if your macbook isn't used for a few seconds. Have a look at ~/.config/lightum/lightum.conf. There are no packages for quantal, I could use "precise" packages sources instead

deb http://ppa.launchpad.net/poliva/lightum-mba/ubuntu precise main

Recent experiments results that lightum can automatically detect the brightness of the environment but it won't start automatically. So you have to start is manually.

Another way to make it easier is to install the indicator of lightum so you can easily configure everything.

By the way, if you use Xubuntu by any chance, you still can't access the keyboard brightness as xfce doesn't work with it yet.

Microphone

Works on fresh install. Unlike the 15' and 17' MacBookPro, the 13' doesn't have a separated microphone inLine jack. Normally in MacOS X you can switch this jack from audio to mic by setting. Unfortunately, there are still no solution for a similar way to set up the audio/mic jack to mic.

If you have a microphone with USB-plug, then the problem above doesn't matter for you.

Bluetooth

Works on fresh install.

Bluetooth by default stays on if you boot into Ubuntu, even if you turn it off. It will be on after the next boot again.

Disable Bluetooth on startup

If you want to turn it off by default during boot, type this in the terminal:

sudo gedit /etc/rc.local

Insert the line 'rfkill block bluetooth' before 'exit 0' so it looks like this:

#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

rfkill block bluetooth

exit 0

Save and exit. Now Bluetooth is disabled by default, you can turn on your Bluetooth by clicking 'Turn on Bluetooth' from the Bluetooth icon in the notification area again.

Make Bluetooth work properly

If you by any chance are using Xubuntu, then bluetooth will work with remarks. You can turn if off by clicking on the Bluetooth icon on the top and click 'Turn off Bluetooth'. But somehow, you can't turn it on again. You have to reboot the entire system to re-activate your Bluetooth again.

This is probably because of a 'coexistence protection' of the WiFi and the bluetooth, a setting of the B43 driver precisely. So this protection has to be deactivated.

First, this way you can reconfigure the driver while the system is running, with modprobe:

# remove b43
    sudo modprobe -r b43
# reinsert b43, with the right settings
    sudo modprobe b43 btcoex=0

But these steps only ensure the proper work until you reboot your system. So we need a way to make these settings permanent.
Open up the terminal and type this:

sudo gedit /etc/modprobe.d/options

Normally this will be an empty file, because now we're creating one. Insert this line in the file:

options b43 btcoex=0

Now save this file, and reboot your system. Now you don't need to modprobe anymore. This has deactivated the Bluetooth coexistence blocking setting for good!

Apple Remote Control

Documentation, device to experiment with and testing needed.


CategoryMac

MacBookPro7-1/Quantal (last edited 2013-12-14 02:32:48 by knome)