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

Sample.plist/SampleCustom.plist: possibly borked patch in UEFI/ReservedMemory #2302

Closed
5T33Z0 opened this issue Jun 14, 2023 · 9 comments
Closed

Comments

@5T33Z0
Copy link

5T33Z0 commented Jun 14, 2023

Patch in question:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>UEFI</key>
	<dict>
		<key>ReservedMemory</key>
		<array>
			<dict>
				<key>Address</key>
				<integer>569344</integer>
				<key>Comment</key>
				<string>Fix black screen on wake from hibernation for Lenovo Thinkpad T490</string>
				<key>Enabled</key>
				<false/>
				<key>Size</key>
				<integer>4096</integer>
				<key>Type</key>
				<string>RuntimeCode</string>
			</dict>
		</array>
	</dict>
</dict>
</plist>

Background

I recently acquired a used ThinkPad T490 model. I had issues with the backlight turning off during boot occasionally. I thought this patch may help to address the issue.

But when I tried it, it crashed the system on boot. Not only that: instead of just crashing and power cycling, it actually caused the system to turn itself off which I haven't seen before. So maybe you should remove this one.

Greetings.

@m0d16l14n1
Copy link

m0d16l14n1 commented Jun 14, 2023

It's not for fixing backlight issues. It's for black screen "stuck" after waking up from hibernation.

I am using that patch to get hibernation working on my Ice Lake laptop (not Lenovo). Same goes to many guys who have Lenovo/HP and etc. Only with that patch enabled our laptops could hibernate properly in 3/25 modes.

@5T33Z0
Copy link
Author

5T33Z0 commented Jun 14, 2023

I have a Lenovo T490 with a Whiskey Lake CPU and in my case it does what I described – no matter how it may work for other people.

@m0d16l14n1
Copy link

I have a Lenovo T490 with a Whiskey Lake CPU and in my case it does what I described – no matter how it may work for other people.

So it should be removed because it didn't work for you? ^_^
I just clarified it works not only for fixing hibernation issues on Lenovo (that's what that patch is actually doing, not backlight stuff).

@5T33Z0
Copy link
Author

5T33Z0 commented Jun 14, 2023

Tell me: how does a system go into hibernation if it can't even boot because this patch turns my system off before booting?

I don't think this is the intended purpose of this patch – or is it?
Or does it require HibernationFIxup as well so it doesn't turn off the system when trying to boot?

@m0d16l14n1
Copy link

m0d16l14n1 commented Jun 14, 2023

Tell me: how does a system go into hibernation if it can't even boot because this patch turns my system off before booting?

I don't think this is the intended purpose of this patch – or is it? Or does it require HibernationFIxup as well so it doesn't turn off the system when trying to boot?

I don't know why it's happening to you, sorry. In my case system is working properly, once it goes to sleep, it goes then into hibernation and can be properly wake up from hibernation 3/25. Without that patch it would stuck on black (or screen with many graphical artifacts, I will add an example of that screen below). And yes, it's booting/rebooting fine with that patch enabled.
Not sure about HibernationFixup, I can hibernate with or without it (same with booting).

AFAIK, @1Revenger1 have been using that patch for his Lenovo (might be wrong) and @savvamitrofanov was the one who did find that solution and added to OC, they might tell you more about that and share some links to their discussions in some of Lenovo github threads/issues (can't find it now).

image

@m0d16l14n1
Copy link

m0d16l14n1 commented Jun 16, 2023

I was able to find that thread related to discovering that patch, you can check it there, @5T33Z0.
And it's not working only for T490 > click. Same goes for me and some other guys from Ice Lake gitter chat, who did check that patch on their laptops and found out it worked in our case too.

Might be the issues with your set of booter quirks btw?

@5T33Z0
Copy link
Author

5T33Z0 commented Jun 16, 2023

@umka-petrovich Thanks for the follow-up. I will look into it. For now I don't plan to use Hibernation.

@5T33Z0
Copy link
Author

5T33Z0 commented Jun 16, 2023

@neresident Okay I've tested the Booter Quirks you mentioned:

  1. With EnableWriteUnprotector enabled, the system no longer turns off immediadely if the Reserved Memory region is enabled – but it won't boot.
  2. Disabling RebuildAppleMemoryMap then allowed to boot, so I will close this issue.

I've changed Hibernate Mode to 25 – are there additional pmset flags I need to change to make it work? And how long does it take until the system enters Hibernation? Or does it replace regular sleep and goes straight into hibernation automatically if I send it to sleep?

@5T33Z0 5T33Z0 closed this as completed Jun 16, 2023
@m0d16l14n1
Copy link

@neresident Okay I've tested the Booter Quirks you mentioned:

  1. With EnableWriteUnprotector enabled, the system no longer turns off immediadely if the Reserved Memory region is enabled – but it won't boot.
  2. Disabling RebuildAppleMemoryMap then allowed to boot, so I will close this issue.

I've changed Hibernate Mode to 25 – are there additional pmset flags I need to change to make it work? And how long does it take until the system enters Hibernation? Or does it replace regular sleep and goes straight into hibernation automatically if I send it to sleep?

  1. HibernateMode > Auto
  2. Disable (if it's enabled) RTC wake fix patch (config.plist > Kernel > Patch)
  3. In terminal: sudo pmset -a standby 1
  4. sudo pmset -a hibernatemode 25

Should work properly. You can also try to use HibernationFixup.kext > you will need to add one boot-arg to enable auto-hibernation and that's it. Not sure, maybe there is something specific on Lenovo's, but that's how it's working on some of latest (Ice Lake) Ideapads.

P.S. - you might need to disable some of "native" features like powernap and etc in pmset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants