NVIDIA DRIVERS - (Nvidia-340).
I followed this tutorial for Ubuntu. https://askubuntu.com/questions/264247/ ... 573#613573
What it took to find out was which was the correct driver (when I tried to install Ubuntu, the system informed me that the correct driver was Nvidia-304. But it wasn't. The correct driver for this machine is NVIDIA-340.
*******
1. Install Ubuntu in UEFI mode with the Nvidia drivers
I will not go into details here because there are lots of articles on the web showing you how to do this and end up with the nouveau drivers running your machine hot or with the black screen after installing the Nvidia drivers (e.g. www.rodsbooks.com/ubuntu-efi).
Please note however that the following instructions assume you have successfully installed and booted in UEFI mode. You can verify that by checking for existence of the directory /sys/firmware which is only created after booting in EFI mode.
2. Find the right PCI-E bus identifiers
We need both the IDs for the graphics card and the PCI-E bridge that it is connected to. Issue the following command in a shell:
Code: Select all
~$ sudo lshw -businfo -class bridge -class display
pci@0000:00:03.0 bridge MCP89 LPC Bridge
pci@0000:00:0e.0 bridge NVIDIA Corporation
pci@0000:00:15.0 bridge NVIDIA Corporation
pci@0000:00:16.0 bridge NVIDIA Corporation
pci@0000:00:17.0 >!!< bridge MCP89 PCI Express Bridge
pci@0000:04:00.0 >!!< display MCP89 GeForce 320M
Have a look at (1) the line saying display and (2) the line with bridge right before that display line. Write down the PCI-E bus ids (format XX:YY.Z) of the bridge device (here 00:17.0) and the display device (here 04:00.0) and remember which is which. Note: Those IDs may be different on your machine, depending on your Mac model and revision.
3. Create a GRUB script for setting the PCI-E registers during boot
Fire up a text editor with sudo nano /etc/grub.d/01_enable_vga.conf and copy/paste the content below. Replace 00:17.0 with the PCI-E ID of your bridge device noted in step 2. Replace 04:00.0 with the PCI-E ID of your display device noted in step 2.
Code: Select all
[b]
cat << EOF
setpci -s "00:17.0" 3e.b=8
setpci -s "04:00.0" 04.b=7
EOF[/b]
Code: Select all
~$ sudo chmod 755 /etc/grub.d/01_enable_vga.conf
~$ sudo update-grub[/b]
If, after rebooting, the register values have been set to 8 (bridge device) and 7 (display device), everything went fine:
Code: Select all
~$ sudo setpci -s "00:17.0" 3e.b
08
~$ sudo setpci -s "04:00.0" 04.b
5. Install Nvidia drivers and enjoy!
Use Ubuntu's Additional drivers GUI to install the Nvidia drivers. (NVIDIA-340!!!!!)
****
GETTING WIFI TO WORK
I installed the b43-firmware-installer package, which worked on the first boot. But in the second boot, the wifi networks disappeared and Network-Manager could not find any network.
Scanning the system error messages, I discovered that the card driver was changing the MAC address at all times. This is a bug already commented and I did the same https://bugs.debian.org/cgi-bin/bugrepo ... bug=863463
Code: Select all
# sudo nano /etc/NetworkManager/conf.d/10-mac-randomization-off.conf
[Device]
Wifi.scan-rand-mac-address = no
In my case, I put REGDOMAIN = BR
Then I ran the following command:
$ sudo Iw reg set BR
With these two steps, my wifi was stable.
Another thing that is not done in the default installation is to enable the applesmc and coretemp modules.
My /etc/modules file looks like this...
Code: Select all
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
applesmc
coretemp