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

Clamshell boot/headless Mac no-display boot does not load Lilu + drivers #9

Open
Piipperi opened this issue Jul 19, 2021 · 24 comments
Open
Labels
dependency:oc Issues related to OpenCore priority:low

Comments

@Piipperi
Copy link

Problem Description

MacBook won't boot in clamshell mode to macOS properly. No picture on monitor, however caps lock key on external keyboard does work and my mouse's LEDs that are controlled via software does work. Strangely enough though I could not ping my computer and it never showed up on the network. If laptop is booted with the lid open, it boots as expected.

Logs

opencore-2021-07-19-153157.txt

Screenshots

@mayankk2308 mayankk2308 added the awaiting-user-response Additional information required from user label Jul 19, 2021
@mayankk2308
Copy link
Owner

mayankk2308 commented Jul 19, 2021

What Mac, macOS version, eGPU, and is FileVault enabled?

@Piipperi
Copy link
Author

MacBook Pro 11,3, macOS 11.5 (GM as of writing this comment, soon official release), eGFX Breakaway Box 550 w/RX 5700 XT, FileVault, and SIP are disabled.

@Piipperi
Copy link
Author

I should add that this issue seems to be also present in Windows, if I restart to Windows in clamshell mode, the fans ramp up and sometimes my keyboard's lights turn on but I receive no monitor signal or any other signs of life.

Also I should probably open another issue about this, but OpenCore disables Virtualization on Windows. It's a weird issue but I found out that at least rEFInd had a way to enable it again.

@mayankk2308
Copy link
Owner

@Piipperi try removing OpenRuntime.efi from drivers section [note that you need this for OCLP in case you use that too] in plist. This should make sleep and boot behave more closely to native but updating macOS may require reselecting OC disk as default every time.

@Piipperi
Copy link
Author

Piipperi commented Jul 24, 2021

Made no difference. Still refuses to boot if the lid is closed.

EDIT: I'll need to do some more testing but this might have fixed it on the Windows-side at least.

@Piipperi
Copy link
Author

Some more results from my testing:
First, as your comment did suggest, the OC disk thing is completely broken, which might have been why the Windows side is working like normal as I select my boot device using System Preferences/Boot Camp Control Panel. And apparently, choosing the disk there breaks the chain so it boots directly to the chosen partition without OpenCore. Which kinda defeats the whole purpose of this "fix" as to choose OpenCore as my boot device again I need to open the lid.

But now we get to the weird stuff. I still cannot boot at least into macOS w/OC while having the lid closed, however closing the lid after the initial boot does seem to turn off the internal display, and macOS is able to boot with Kryptonite and everything working.

@mayankk2308 mayankk2308 added the dependency:oc Issues related to OpenCore label Jul 25, 2021
@Piipperi
Copy link
Author

By "turning off the display" I ment turning off the backlight, after more testing I have not been able to reproduce that anymore. The backlight is still on after booting when lid is closed, but the display itself does not appear in System Preferences nor in About this Mac.

Just commented to add this little detail.

@Caldarie
Copy link

Caldarie commented Aug 19, 2021

Hi @mayankk2308, just wanted to say thank you for the awesome project.

I also have a similar problem with Piipperi. When booting up with clamshell mode, the display does show. However, restarting or sleeping causes the macbook to not output any display, despite the fact that the egpu is detected.

  1. I have already set my macbook to automatically boot macOS via Kryptonite
  2. I am using an external monitor
  3. I am using Radeon RX 560
  4. Filevault and passwords have been disabled
  5. This hasnt been an issue with purge-wrangler

Let me know if you have any suggestions to this problem.

@mayankk2308
Copy link
Owner

@Caldarie what Mac? I'd need logs to investigate. If your system fails to wake up, there should be a panic log on next boot which I'd like to see as well (something like EFI wake failure). Last release should have fixed sleep issues, at least from my testing.

@Piipperi these boot issues seem like OpenCore-specific problems rather than Kryptonite. Since opening the issue, have you inquired with OpenCore devs? In any case, on my end I will first need to test and reproduce the issue. But for the time being, just slightly open up your MBP so it's display is active for boots.

@Piipperi
Copy link
Author

@Caldarie what Mac? I'd need logs to investigate. If your system fails to wake up, there should be a panic log on next boot which I'd like to see as well (something like EFI wake failure). Last release should have fixed sleep issues, at least from my testing.

@Piipperi these boot issues seem like OpenCore-specific problems rather than Kryptonite. Since opening the issue, have you inquired with OpenCore devs? In any case, on my end I will first need to test and reproduce the issue. But for the time being, just slightly open up your MBP so it's display is active for boots.

I don't think it's really an OC issue unless OC has issues with eGPUs normally, on my second MacBook Pro which only has OCLP, it boots fine in clamshell mode (with the HDMI directly plugged into the MacBook ofc)

@mayankk2308
Copy link
Owner

@Piipperi Kryptonite is a kext so it plays a role much later in the boot sequence. Could be OpenCore version.

@mayankk2308
Copy link
Owner

@Piipperi
Copy link
Author

@Piipperi please try latest update: https://github.com/mayankk2308/kryptonite/releases/latest

Tried a fresh install of this (no OCLP or anything) but I still get the same behaviour.

@mayankk2308
Copy link
Owner

mayankk2308 commented Sep 17, 2021

The only way of booting a MacBook in clamshell mode is through restarts no?:

  1. Restarting from Windows to macOS.
  2. Restarting macOS itself.

Do both scenarios fail?

I tried restarting macOS on my TB3 Mac (running latest Kryptonite) and there is no issue if FileVault is off. System boots appropriately and I'm greeted with login screen on eGPU screen. MacBook11,3 requires disabling dGPU for AMD eGPU output - do you have that configured? Maybe that plays a role? I don't know. I'll have to try that.

@Piipperi
Copy link
Author

The only way of booting a MacBook in clamshell mode is through restarts no?:

  1. Restarting from Windows to macOS.
  2. Restarting macOS itself.

Do both scenarios fail?

I tried restarting macOS on my TB3 Mac (running latest Kryptonite) and there is no issue if FileVault is off. System boots appropriately and I'm greeted with login screen on eGPU screen. MacBook11,3 requires disabling dGPU for AMD eGPU output - do you have that configured? Maybe that plays a role? I don't know. I'll have to try that.

Both restarting from Windows and macOS have the same behaviour. Firevault is off, also dGPU has been disabled.

@mayankk2308
Copy link
Owner

@Piipperi can you try w/o the dGPU disabled? Connect your external display directly to Mac and try restarting in clamshell mode.

@Piipperi
Copy link
Author

@Piipperi can you try w/o the dGPU disabled? Connect your external display directly to Mac and try restarting in clamshell mode.

Tried this, and it boots fine in clamshell mode.

@mayankk2308
Copy link
Owner

@Piipperi Mystery solved then. To disable GPU, instead of using DeviceProperties, try putting nv_disable=1 in boot-args in OC config and run the nvram gpu power prefs command here: https://github.com/mayankk2308/kryptonite/wiki/Post-Install#disable-nvidia-discrete-gpu-requires-igpu (if boot fails run again)

Perhaps this may fix your boot issue.

@Piipperi
Copy link
Author

@Piipperi Mystery solved then. To disable GPU, instead of using DeviceProperties, try putting nv_disable=1 in boot-args in OC config and run the nvram gpu power prefs command here: https://github.com/mayankk2308/kryptonite/wiki/Post-Install#disable-nvidia-discrete-gpu-requires-igpu (if boot fails run again)

Perhaps this may fix your boot issue.

Unfortunately it didn't :/ still the exact same behaviour.

@mayankk2308
Copy link
Owner

Nothing else I can do. This seems to occur due to disabled dGPU and is an edge case.

@Piipperi
Copy link
Author

Nothing else I can do. This seems to occur due to disabled dGPU and is an edge case.

But it didn't happen on PurgeWrangler tho... Kryptonite is not a very good replacement for PurgeWrangler if it has a major fault like this.

@mayankk2308
Copy link
Owner

mayankk2308 commented Sep 17, 2021

Gee, thanks, don’t use it if it bothers you so much or feel free to write your own solution.

I’ll try and explain one last time. Kryptonite is a kext that heavily relies on OpenCore and Lilu to work (it is compulsory on macOS 11+). Take for example acidanthera/bugtracker#1623 (comment), notice how Lilu can have weird bugs where it doesn’t execute when there is no GOP/UGA display output (when dGPU is disabled, display output is delayed, and clamshell mode could prevent output)? There can be many such issues that could be the cause of this problem (I don’t know what the cause is). To find a cause I’ll have to spend time trying out various configurations, generating logs, etc. which I don’t have.

I don’t get much time to work on this stuff and this is a minor issue in the grand scheme of things (most other configs don’t need to disable gpus to begin with) which could get fixed with newer OpenCore/Lilu updates. To be fair I should keep it open for future investigation.

@Piipperi
Copy link
Author

Gee, thanks, don’t use it if it bothers you so much or feel free to write your own solution.

I’ll try and explain one last time. Kryptonite is a kext that heavily relies on OpenCore and Lilu to work (it is compulsory on macOS 11+). Take for example acidanthera/bugtracker#1623 (comment), notice how Lilu can have weird bugs where it doesn’t execute when there is no GOP/UGA display output (when dGPU is disabled, display output is delayed, and clamshell mode could prevent output)? There can be many such issues that could be the cause of this problem (I don’t know what the cause is). To find a cause I’ll have to spend time trying out various configurations, generating logs, etc. which I don’t have.

I don’t get much time to work on this stuff and this is a minor issue in the grand scheme of things (most other configs don’t need to disable gpus to begin with) which could get fixed with newer OpenCore/Lilu updates. To be fair I should keep it open for future investigation.

I was thinking it could be an issue like that where it can't find a display output. Maybe a workaround could be to implement OC to display the boot screen via eGPU if it's possible. (which could still maybe not solve the issue with systems that have no GOP/UGA graphics)

@Caldarie
Copy link

@mayankk2308 Thank you for the response. Appreciate the assistance.

It seems the problem resolved itself by updating macos 11.5.6 to 11.6. Now it's working fine.

@mayankk2308 mayankk2308 changed the title Unable to boot in clamshell mode Unable to boot in clamshell mode when discrete GPU is disabled Sep 25, 2021
@mayankk2308 mayankk2308 removed the awaiting-user-response Additional information required from user label Oct 5, 2021
@mayankk2308 mayankk2308 changed the title Unable to boot in clamshell mode when discrete GPU is disabled Clamshell boot/headless Mac no-display boot does not load Lilu + drivers Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency:oc Issues related to OpenCore priority:low
Projects
None yet
Development

No branches or pull requests

3 participants