Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
32
rated 0 times [  32] [ 0]  / answers: 1 / hits: 74984  / 2 Years ago, wed, february 9, 2022, 3:04:22

I have a dual-boot Mac OS X 10.8 and Kubuntu 12.10 64x on my white MacBook from mid-2010 installed. (Model identifier: MacBook7,1 . I have upgraded my RAM from 2GB to 8GB, if that matters.) I have the proprietary NVIDIA drivers installed on my Kubuntu.



Judging from the temperature monitor widget in Kubuntu, my temperature seems to be ~10℃ hotter compared to under Mac OS X. In Mac OS X I use Temperature Monitor. I'm comparing the CPU Core 0 and CPU Core 1 values in Kubuntu to the CPU Core 1 and CPU Core 2 values in Mac OS X.



10℃ more may be not a very big overheating disaster, but when I do really intense things on my computer (such as playing Team Fortress 2 a while) my CPU is at ~70℃ on OSX, and when playing it a while on Kubuntu, my CPU is ~80℃. I worry that the higher temperature may shorten the lifetime of my laptop.



I did some research and found out that it may be that I installed it in BIOS mode, which causes the heat. I can't install it in EFI mode, because the propietary NVidia drivers don't work then (already tried that, it gave a black screen). Does anyone know how to get the propietary NVidia drivers work in EFI mode?



Edit: Ok, even if there isn't a way to use the proprietary nvidia drivers in EFI mode (doesn't seem like there is a way to do it, I'm not getting any answers), I would already be happy if the heating could be fixed in BIOS mode. How can I at least fix the heating in BIOS mode?
I tried putting this in my xorg.conf in the Device section to enable power saving:



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


...but that didn't work.



Oh, and I'm not using rEFIt by the way, could it be that?


More From » drivers

 Answers
5

For me, booting Ubuntu in UEFI mode with the Nvidia drivers loaded, also always resulted in the well-known black screen when X was started.


That was until yesterday!


After running into some very promising info in another thread about installing Windows 7 in UEFI mode on a Mac. Folks over there struggled with Windows 7's required int 10h legacy support and found out that in order to work around that, one can perform an unattended installation (because display doesn't work during install). The crucial information to successfully boot Ubuntu in UEFI mode even with Nvidia drivers was that upon start of EFI boot (while handing over to grub), Apple's firmware does not actually activate the VGA card as PCI-E bus master. The Windows' guys explained how to circumvent this using an EFI shell which chainloads the Windows boot manager in order to at least run the setup in unattended mode. And here is the good news: it's easy to do this in GRUB!


In fact, I am right now typing this on a MacBook Pro 7,1 (mid-2010) running Ubuntu Vivid booted in UEFI mode (Xorg.0.log). However, it should be easy to run on or adapt this to any Linux distribution providing an EFI version of GRUB, e.g. Ubuntu 14.04.2 LTS.


~$ dmesg | grep -i efi
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.19.0-15-generic.efi.signed root=UUID=7843c644-e6f4-4d64-9317-0b854cb524f2 ro quiet splash intremap=off acpi_osi=! acpi_osi=Darwin nomodeset vt.handoff=7
[ 0.000000] efi: EFI v1.10 by Apple
[ 0.000000] efi: ACPI=0xbf96a000 ACPI 2.0=0xbf96a014 SMBIOS=0xbf71a000

To cut the long story short, we have to set two PCI-E registers: one that enables bus-mastering on the video card and the other one enabling VGA support on the PCI-E bridge of the video card. So it has actually nothing to do with the Nvidia drivers and depending on the viewpoint, not even with Apple's outdated/crippled/you name it EFI implementation.


This is how I solved it. Of course, the kudo's go primarily to the guys on the MacRumors forum.
DISCLAIMER The following instructions are provided as is, without guarantees nor do I assume any liability. DO THIS AT YOUR OWN RISK!



  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.



  1. 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:


~$ sudo lshw -businfo -class bridge -class display
pci@0000:00:00.0 bridge MCP89 HOST Bridge
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.



  1. 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. Make sure to paste all 4 lines into that file! 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.


cat << EOF
setpci -s "00:17.0" 3e.b=8
setpci -s "04:00.0" 04.b=7
EOF

Finally, make the created file executable and update your grub config files using the following TWO commands.


~$ sudo chmod 755 /etc/grub.d/01_enable_vga.conf
~$ sudo update-grub


  1. Reboot and check




If, after rebooting, the register values have been set to 8 (bridge device) and 7 (display device), everything went fine:


 ~$ sudo setpci -s "00:17.0" 3e.b
08
~$ sudo setpci -s "04:00.0" 04.b
07


  1. Install Nvidia drivers and enjoy!




Use Ubuntu's Additional drivers GUI to install the Nvidia drivers. I recommend following this article on how to enable brightness controls because it doesn't work out of the box.


[#32361] Thursday, February 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nnaisdio

Total Points: 369
Total Questions: 112
Total Answers: 108

Location: Kenya
Member since Mon, Jun 14, 2021
3 Years ago
;