XiaoMi-Pro-Hackintosh icon indicating copy to clipboard operation
XiaoMi-Pro-Hackintosh copied to clipboard

Not booting after running out of battery.

Open Casm101 opened this issue 2 years ago • 14 comments

I have an issue, that normally occurs when leaving my computer to go into sleep mode, and forgetting about it until it runs out of battery... (This happens often, every single time I have run down the battery while having MacOS and OpenCore).

As soon as I plug it back in, and attempt to start it, the indicator light turns on, but the screen stays black, no other activity is visible on the laptop. I have attempted fully charging my device, then turning it on, but the same issue occurs.

To fix this issue, I have to open up the laptop, remove the boot drive, attempt to boot a couple of times, until the system turns on, displays no boot drive available, I put the drive back in, then I am able to start the system as usual. It's as if the system gets stuck in the sleep / hibernate mode.

Has anyone had this issue before? Any recommendations as how to solve it?

Casm101 avatar May 19 '22 21:05 Casm101

I also had this issue last time. The first thought is to remove HibernationFixup, and change Misc -> Boot -> HibernateMode -> None. I am not sure why the issue could happen. A helpful resource would be https://dortania.github.io/OpenCore-Post-Install/universal/sleep.html#fixing-sleep

stevezhengshiqi avatar May 19 '22 23:05 stevezhengshiqi

I removed the kext, and changed the option in my config file, ran down the battery, and as soon as I plugged it in, it booted first try!

This raises a question for me though, when I close the lid, or put the system to sleep, is it actually sleeping? Or is it still on with screen off? Since when I have woken it, it hasn't asked me for my password to log back in, which isn't ideal as I use my laptop for work, and rather not have people being able to snoop my work.

Casm101 avatar May 26 '22 11:05 Casm101

as soon as I plugged it in, it booted first try!

Sounds perfect! Could you also try adding back HibernationFixup.kext since it helps save battery life by enabling hibernation mode. This time just change Misc -> Boot -> HibernateMode -> None in config.

it hasn't asked me for my password to log back in

You can try System Preferences - Security & Privacy - Require Password - Immediate

stevezhengshiqi avatar May 26 '22 12:05 stevezhengshiqi

I actually feel that adding back HibernationFixup.kext would cause the no boot problem. In my understanding of this issue, when the device was low in battery and hibernates, the low battery protection (Force shutdown when battery low) was not guarding for some reason, and resulted in our device draining too much battery in hibernation mode and can not boot. Need actual tests to verify.

stevezhengshiqi avatar May 26 '22 13:05 stevezhengshiqi

Okay, I will put the kext back and test in in normal use, so results may take a couple of days...

Thanks for the help so far @stevezhengshiqi !

Casm101 avatar May 26 '22 17:05 Casm101

OKay, so I let the laptop run flat, with the kext installed, and the hibernation mode set to none, and it wont boot, so I guess the solution for now is to leave it without the hibernationfix kext...

Casm101 avatar May 30 '22 07:05 Casm101

Thank you for testing that! I believe it would be a pain to recover from that. I will disable HibernationFixup.kext for 10th Gen U device in the next release.

stevezhengshiqi avatar May 30 '22 07:05 stevezhengshiqi

Yeah, was a bit of a pain to get running again, had to use an Ubuntu key to boot, hotplug the M.2, mount the EFI and delete the kext..., thanks for the help @stevezhengshiqi

Casm101 avatar May 30 '22 08:05 Casm101

-hbfx-disable-patch-pci disables patching of IOPCIFamily (this patch helps to avoid hang & black screen after resume (restoreMachineState won't be called for all devices)

toxa70x4 avatar Jun 01 '22 01:06 toxa70x4

@toxa70x4 Our issue is laptop won't be boot up after we left it hibernate for a long time when battery low. I don't see much connection with -hbfx-disable-patch-pci. When battery level is higher than critical level, the laptop hibernates perfect with HibernationFixup.

Also, when we say can not boot, it's BIOS level. The laptop can not boot into any system or bootloader or even BIOS.

stevezhengshiqi avatar Jun 01 '22 02:06 stevezhengshiqi

@stevezhengshiqi I don't know how much battery power you need. 5% is not a problem. I have a TM1963 laptop. Parameter -hbfx-disable-patch-pci, kext NVMeFix and slightly different SSDT-USB.aml

toxa70x4 avatar Jun 01 '22 10:06 toxa70x4

@toxa70x4 Did you meet the exact same problem as us before? When our problem happens, the laptop can not boot even you charged it to full battery.

What happened to us is that we hibernates our laptop when battery is around 5%, and leave it there one day or even one week. Then it is unbootable even connected with power.

-hbfx-disable-patch-pci I think it is not recommended to have. As the deacription says, the pci patch can fix black screen, and adding this boot argument will disable the fix.

stevezhengshiqi avatar Jun 01 '22 12:06 stevezhengshiqi

@Casm101 Hi, in the commit https://github.com/daliansky/XiaoMi-Pro-Hackintosh/commit/b902144e36f9b0af9aeb420d5fbf854fcbfecd7b, I re-enabled HibernationFixup; and if you still need to disable hibernation to avoid this problem, you can follow https://github.com/daliansky/XiaoMi-Pro-Hackintosh/blob/main/Docs/README_CML.txt

stevezhengshiqi avatar Dec 23 '22 22:12 stevezhengshiqi

@stevezhengshiqi thanks for the update, I'll check it out when I transition to the latest version

Casm101 avatar Jan 17 '23 17:01 Casm101