0

I'm struggling to figure this out and I'm hoping someone can provide me with some advice or at least point me in the right direction.

I've got a 2010 Macbook Pro (7,1) that I'm trying to get stable on Xubuntu. Most things are running fine, the issue I'm running into is that I can't get the Nvidia display and PCI bridge to register correctly, so when I suspend the device, it is unresponsive when I bring it back up and I end up having to hard reset it.

I started on 19.10 and tried following stommestack's answer here and subsequently ylwghst's answer here (and many other places) with no luck.

My PCI register values pre-attempt are: MCP89 [GeForce 320M] -- "04:00.0" 04b is 07 (as it should be) MCP89 PCI Express Bridge -- "00:17.0" 3e.b is 02 (should be 08)

My PCI register values post attempt are: MCP89 [GeForce 320M] -- "04:00.0" 04b is 07 (as it should be) MCP89 PCI Express Bridge -- "00:17.0" 3e.b is 0a (different, but should be 08)

The output from my lshw --businfo -class bridge -class display command is:

Bus info          Device      Class          Description
========================================================
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]

The contents of my 01_enable_vga.conf is:

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

The contents of my current dmesg shortly after boot is:

[    0.000000] efi: EFI v1.10 by Apple
[    0.000000] efi:  ACPI=0xbf96a000  ACPI 2.0=0xbf96a014  SMBIOS=0xbf71a000 
[    0.046985] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[    0.334057] pci 0000:04:00.0: BAR 1: assigned to efifb
[    0.340118] Registered efivars operations
[    0.708530] efifb: probing for efifb
[    0.708554] efifb: No BGRT, not showing boot graphics
[    0.708558] efifb: framebuffer at 0xc0010000, using 6400k, total 6400k
[    0.708561] efifb: mode is 1280x800x32, linelength=8192, pages=1
[    0.708564] efifb: scrolling: redraw
[    0.708567] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[    0.712633] fb0: EFI VGA frame buffer device
[    0.981620] EFI Variables Facility v0.08 2004-May-17
[    1.394155] [Firmware Bug]: ACPI(IGPU) defines _DOD but not _DOS
[    7.812178] fb0: switching to nouveaufb from EFI VGA

I've tried 18.04 LTS, and setpci works correctly there, but then I can't get my Broadcom wireless card to work even with the proprietary drivers. 18.04 is also less ideal, as I'd like to be on 20.04 when it releases later this month.

I've also tried the 20.04 LTS Beta (which is the currently installed version) and am having the same issues as 19.10.

Please let me know if there's anything else I can provide to help figure this issue out. I appreciate any help. Thanks!

2
  • I can't really add much other than I gave up trying to get a good Linux experience out of my own MBP and shelled out for a 2nd hand ThinkPad T Series. I wish I hadn't wasted months trying to get things to work. I think the reality is that you're unlikely to get a good Linux experience in a Mac.
    – Kurankat
    Apr 15, 2020 at 22:42
  • Yeah, I realize it may be a bit of an uphill battle. Everything else works fine though, so I hate to give up when it feels like I'm this close... I'm hoping there's something in logs somewhere that I'm unable to comprehend that someone more experienced can point out?
    – Jay
    Apr 16, 2020 at 14:04

1 Answer 1

0

I have a 2008 mbp 4,1 but I have the same problem setting those registers.

Frankly I want to make the NVIDIA drivers work in EFI so I have been pushing to try and crack the code on this setpci thing. I've noticed that using setpci actually does change the proper register to 08 if you manually enter it at the grub command line, but sets to 0a when using scripts. Also of note, using 9 instead of 8 sets it to 0b and using 10 sets it to 12. Sounds like hex math to me? I'm not really sure whats going on but I feel really close to getting the graphics card to initialize properly. I've probably spent way too much time over the last couple years on this.

Its not an ideal solution but installing in CSM also seems to be the best way to resolve nvidia related issues on these older mac devices and linux. It's not super easy to do since we can't simply change the option in bios. This is not prefered because UEFI has benefits over bios but at least it works. To do this we will have to install in UEFI and then make system changes from a live USB.

Step one is to install linux normally. This will automatically setup UEFI. DO NOT INSTALL NVIDIA DRIVERS YET. After installation reboot back into your live USB environment. Open your partitioning tool of choice (Gparted if you use Ubuntu). Find your HDD often located at /dev/sda. Find the efi and delete this partition. Create a new partition in that space and format it as cleared. Apply those changes and then add the bios_grub flag.

DO NOT REBOOT BEFORE FOLLOWING THE NEXT STEP

Mount your system partition at /media using something like Disks. Change the directory to /media and find your partition then check in that directory to find and copy the GUID-name directory. Run the following command replacing with the name of your directory

sudo grub-install --no-uefi-secure-boot --boot-directory=/media/mint/<GUID>/boot /dev/sda

If this installs cleanly you are done. You can now install the Nvidia 340 drivers after rebooting.

note that some distros like Ubuntu 21.10 and up have started shipping BOTH bios and UEFI grub versions. This may not appear to be a problem until you upgrade your distro so make sure that when you restart you check for the grub-efi-amd64-signed package and remove it. I had to unintall grub-common and reinstall grub-pc upgrading from 21.10 to 22.04 and that fixed the issue.

Unfortunately this will also force your SATA controller to switch to IDE mode. To solve this I was able to add a file to /etc/grub.d/ containing

#!/bin/sh
set -e
## Enable nvidia proprietary drivers
echo "setpci -d 8086:2828 90.b=40"

This renenabled ACHI mode for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .