Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacBookPro9,1 boots to black screen #3

Closed
dennes544 opened this issue Dec 2, 2020 · 87 comments
Closed

MacBookPro9,1 boots to black screen #3

dennes544 opened this issue Dec 2, 2020 · 87 comments
Labels
bug Something isn't working help wanted Extra attention is needed MacBook Pro

Comments

@dennes544
Copy link

MacBookPro9,1, NVIDIA GeForce GT 650M boots to black screen with Big Sur 11.0.1 installer. After verbose boot it shows mouse cursor for a second, the blackscreen and backlight disables

NVRAM is cleared before trying to boot

@project-bot project-bot bot added this to Open Issues in Issue/PR Panel Dec 2, 2020
@khronokernel
Copy link
Member

Hmmm odd, can you send me the EFI folder the patcher created?

@khronokernel khronokernel added bug Something isn't working MacBook Pro labels Dec 2, 2020
@dennes544
Copy link
Author

EFI.zip

I used firstly 0.0.3 release(had same issue), then tried to use last commit version (0.0.4), where you fixed PCI paths. In archive efi folder generated by 0.0.4

@dennes544
Copy link
Author

on 0.0.4 error still persists btw. before installing opencore to efi, i manually deleted old files from efi (just to be sure)

@khronokernel
Copy link
Member

I believe I found an issue, right now the patcher uses MacBookPro11,2 as the new SMBIOS however this actually is a bit broken as your machine is a dual GPU model while this SMBIOS is a single GPU machine. I added a new EFI below that uses MacBookPro11,3 with a proper iGPU+dGPU setup, please report back if this resolved your issue
EFI.zip

@dennes544
Copy link
Author

will reply in 5-10 mins

@dennes544
Copy link
Author

Nope, still same black screen

@dennes544
Copy link
Author

dennes544 commented Dec 2, 2020

I can try to boot my big sur installation patched by micropatcher and the get bootlog, will this be helpful? (On this installation i have same blackscreen issue if booting via opencore)

@dennes544
Copy link
Author

boot.log

I think found reason, search "kernel: GFX0-0x1ac-A::_doControl(23) not gated" and further

@dennes544
Copy link
Author

Tried to boot without WhateverGreen, still no luck

@khronokernel
Copy link
Member

EFI.zip

As mentioned in issue #6, very likely AGDP is at fault. When you have some free time, test this build out

@dennes544
Copy link
Author

Still same black screen, even if added -no_compat_check as mentioned in #6

@WTannen
Copy link

WTannen commented Dec 8, 2020

I'm trying to install Big Sur on my mid-2012 MacBook Pro (dual GPU) using OpenCore Legacy Patcher v0.0.6 and I'm having the same issue that dennes544 reported here. After booting from the USB stick and selecting the EFI Boot Option I get the verbose boot, the mouse shows cursor for a second and then the blackscreen and backlight disables

Am I missing something or is it a bug with the patcher?

@TinyHim
Copy link

TinyHim commented Dec 9, 2020

Having same issue on my MacBook Pro9,1 (dual gpu)
Have tried both the 0.0.6 Release package, as well as the master.

@doogiecode
Copy link

Chiming in to say I'm having the same issue on my MBP 9,1 (NVIDIA GeForce GT 650M). Would be glad to help troubleshoot.

In case any of this helps: naïvely shooting in the dark using this page (which I know is more geared toward Hackintoshes), I first tried adding agdpmod=vit9696 to the boot-args right after agdpmod=pikera. Nothing seemed to change on boot, still a black screen. I then tried appending nv_disable=1 for no GPU acceleration. This got me past the black screen and into the Big Sur installer, but of course, I could tell the graphics were under the weather. Was cool to see the spoofed MacBookPro11,2 after running sysctl hw.model in the terminal, but I decided I didn't want to do the install.

(Furthermore: I also tried booting into my Catalina install with OpenCore using these args, and instead of booting my OS it booted the recovery partition, also without GPU acceleration. I'm new to this, so I'm not sure if this is typical OpenCore behavior somehow. And furthermore beyond that: once I removed the thumb drive and tried booting my Catalina disk again without OpenCore, the progress under the Apple logo was making no progress after several minutes. This is strange to me, because before I tweaked the arguments it was booting fine though verbose, and I wouldn't guess any of the new arguments I put in would cause an indefinite boot delay. After I reset the PRAM to clear the arguments, my Catalina install is now working again as usual, so I've got that going for me, which is nice.)

@jbdamiano
Copy link

With pikera I have a black screen on boot
If I replace pikera with vit9696 I don't have a blank scrren on boot but the system doesn't recover from sleep mode, I have a black screen

@jbdamiano
Copy link

I added agdpmod=vit9696 before agdpmod=pikera. The system boot normally

I have always the sleep issue. I close the lip, wait a couple of minutes and reopen it. The screen remains black. But If I attach an external screen, It is working correctly. On internal screen I can guess the displayed window like the brightness is at minimum.

@jbdamiano
Copy link

jbdamiano commented Mar 17, 2021

I have always the same issue on the last version
In fact by looking in the log file when the problem occurs during the boot is with this traces in displaypolicyd,1:0.0.log

2021-03-17 09:06:27.784989+0100: PolicyEngine started: 7800020000000000, Time: Wed Mar 17 09:06:27 2021
2021-03-17 09:06:28.107067+0100: NOTICE: kAGDCCallbackCapability: 0x0 []
2021-03-17 09:06:28.613517+0100: NOTICE: Vendor portmap 0x7f0000 mst 0x700000 ddc 0xe0000 aux 0x700000
2021-03-17 09:06:28.987413+0100: NOTICE: Features policyd 0x20000000 kernel 0x0
2021-03-17 09:06:28.988744+0100: NOTICE: FB AGDC state FB[0] - OFF
2021-03-17 09:06:28.988896+0100: NOTICE: inject FB[0] change

With my openCore configuration that doesn't change the model version I don't have this line and the display is working correctly

I can't get the dmesg output when the problem occurs because my screen in black. as the back light was turn off.

@LIPA85
Copy link

LIPA85 commented Mar 21, 2021

Hi, unfortunately I have the same problem above on my MacBook Pro 9,1. Black screen at boot with smbios spoofing. Is there something else to try? Thank you

@dhinakg dhinakg added the help wanted Extra attention is needed label Mar 22, 2021
@khronokernel
Copy link
Member

khronokernel commented Mar 22, 2021

Currently unavailable to provide test binaries, however for those more comfortable with OpenCore I do have some things you can try. Regarding debugging OpenCore, we have dedicated docs here:

The main thing you'd want is to enable Kext DEBUG and know how to mount the EFI for editing.

Test 1: AGDP Ignore

For the first test, mount OpenCore's drive and edit the /EFI/OC/config.plist file:

  • NVRAM -> Add -> 7C436110-AB2A-4BBB-A880-FE41995C9F82 -> boot-args:
    • Change agdpmod=pikera to agdpmod=ignore

Test 2: No WEG

Disable WhateverGreen in your config.plist:

  • Kernel -> Add -> Item 1:
    • Enabled: False

Test 3: Manual Patch

Disable WhateverGreen in your config.plist and add the following patch to Kernel -> Patch:

Arch       |  String | x86_64
Comment    |  String | board-id to board-ix patch
Count      | Integer | 0
Enabled    | Boolean | true
Find       |   Data  | 626f6172642d6964
Identifier |  String | com.apple.driver.AppleGraphicsDevicePolicy
Limit      | Integer | 0
Mask       |   Data  | 
MaxKernel  |  String |
MinKernel  |  String |
Replace    |   Data  | 626f6172642d6978
ReplaceMask|   Data  | 
Skip       | Integer | 0
  • Note: Specific fields were left blank on purpose

@dennes544
Copy link
Author

I thought, maybe instead patching board-id to board-ix, we need to override mbp11,2 board-id with mbp9,1’s in driver? So it will think it’s loading mbp11,2, but with mbp9,1’s graphics parameters?

@khronokernel
Copy link
Member

@dennes544 Add the following to boot-args in OpenCore will do exactly that:

  • shikigva=40
  • shiki-id=Mac-4B7AC7E43945597E

The main issue with this is it replaces the board ID throughout macOS and most likely will break OTA updates, since it'll see an unsupported model. Additionally other drivers may break in the patcher such as USB maps

Regarding patching 1 single kext, would be unlikely to do in-memory without breaking the kext's functionality (ie. GPU switching). We try to avoid on-disk patching whenever possible as it breaks a lot of macOS's security including FileVault, SIP, etc

That's why I recommend trying the tests listed above instead

@dennes544
Copy link
Author

dennes544 commented Mar 22, 2021

Ok, I will, I have one more question, can I with opencore have multiple configs, and change them on boot (like in clover)? Just now I have config without changing board-id, and mbp9,1 is my work daily driver. Don’t want to mess it up

@khronokernel
Copy link
Member

I would recommend just putting OpenCore on a spare USB with a FAT32 partition, and testing the patches that way.

But short answer, no OpenCore does not support config selection

Just now I have config without changing board-id

Wait do you have a config that's booting correctly? Or am I misreading that

@dennes544
Copy link
Author

Config without replacing board-id, it’s just do no-compat-check and fix WiFi kext. Of course no ota updates

@LIPA85
Copy link

LIPA85 commented Mar 23, 2021

boot is ok, sleep/wake also is working just fine. only thing that I lost is the automatic GPU switching.

@jbdamiano
Copy link

jbdamiano commented Mar 23, 2021

@LIPA85 the automatic switch is block because displaypolicyd is using the Nvidia card. If you kill the process you go back to the intel card

@LIPA85
Copy link

LIPA85 commented Mar 23, 2021

@LIPA85 the automatic switch is block because displaypolicyd is using the Nvidia card. If you kill the process you go back to the intel card

Even if I kill it, It suddenly restarts...

@jbdamiano
Copy link

jbdamiano commented Mar 23, 2021

@LIPA85 strange because I killed it and it is not restarted And now I'm using the intel card. I'm using the AGDP override and the AMC override version 2

I used the last OCLP version to generate all needed information. I added agpmod=vit9696 before agpmod=pikera

@khronokernel
Copy link
Member

Hmm still not ideal that the dGPU is stuck enabled until you restart the process, can you 2 test all 3 kexts with agdpmod=vit9696?:

Note they're the same exact kexts from earlier in the thread, just copied them here so easier to grab

@jbdamiano
Copy link

@khronokernel I have to do a sudo pkill displaypolicyd to recover the dynamic switching.
I tested with the last OCLP by adding the agdpmod=vit9696 and the 3 kexts

Except that the boot and wakeup are working now

@cgrazy
Copy link

cgrazy commented Mar 23, 2021

using boot args 'keepsyms=1 debug=0x100 agdpmod=vit9696' and these three kexts, my MBP9,1 is booting and waking up after lid was closed and after 'pmset sleepnow'.

@khronokernel
Copy link
Member

@cgrazy Awesome, thanks for confirming. Was sudo pkill displaypolicyd required for you as well to get the iGPU to activate again or did auto switching work on boot up regardless?

@cgrazy
Copy link

cgrazy commented Mar 23, 2021

I've killed nothing ... And there was nothing obviously wrong.

@khronokernel
Copy link
Member

Oh very nice! Ok so must be a case by case situation. Knowing that, I'm much more confident closing this issue when patchers updated.

Thanks so much to everyone in this issue thread! Really appreciate all the troubleshooting you guys have gone through for us!

@jbdamiano
Copy link

@cgrazy what graphical card is activated by the system ? The About this Mac Shows the NVIDIA or Intel Card ?

@cgrazy
Copy link

cgrazy commented Mar 23, 2021

@jbdamiano it's the NVIDIA

@jbdamiano
Copy link

@cgrazy So you boot on Nvidia and normally you must be on Intel I have to kill the displaypolicyd to switch back on intel card and after that it is ok how switch is working correctly

@khronokernel Thanks for your patch because now we can use OCLP

@dennes544
Copy link
Author

dennes544 commented Mar 23, 2021

@khronokernel sudo launchctl disable system/com.apple.displaypolicyd does the trick, you dont have to kill displaypolicyd every reboot, but i think we need to find way, to disable it from opencore (you know apple, it can be automatically reenabled on each update)

sleep works, no black screen, and graphics switching works perfectly

@LIPA85
Copy link

LIPA85 commented Mar 23, 2021

I can also confirm the same situation as @cgrazy and @jbdamiano
With all the latest 3 kexts and "keepsyms=1 debug=0x100 agdpmod=vit9696'" boot-args the system starts with NVIDIA one.
If I run "sudo pkill displaypolicyd" in terminal it goes back to the intel one... and it stays with that. Then I have tried to launch Photoshop (that usually use the NVIDIA 650m) and it switch to that, after close it returns back to the intel.

For now thank you all for your efforts!

@dhinakg
Copy link
Member

dhinakg commented Mar 23, 2021

Instead of killing displaypolicyd on boot, can you try adding this kext?
RestrictEvents-1.0.1-DEBUG.zip

@dennes544
Copy link
Author

@dhinakg It might work, but its not blocking /usr/libexec/displaypolicyd. I will try it, if won't work, it will need be recompiled with this binary blacklisted

@dennes544
Copy link
Author

@dhinakg Or your kext already recompiled?

@dhinakg
Copy link
Member

dhinakg commented Mar 23, 2021

It's not the stock kext.

@dennes544
Copy link
Author

@dhinakg didnt work

@dhinakg
Copy link
Member

dhinakg commented Mar 23, 2021

Was worth a try, will explore more later.

@khronokernel
Copy link
Member

As this issue is mostly resolved, I will be closing. However we do plan to keep an issue open for tracking regarding displaypolicyd issues: #116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed MacBook Pro
Projects
Issue/PR Panel
  
Resolved
Development

No branches or pull requests

9 participants