- Joined
- Nov 8, 2012
- Messages
- 2
- Motherboard
- Gigabyte GA-Z77X-UP5 TH
- CPU
- i7-3770K
- Graphics
- GTX 770
Is hibernation supported? And if not, will support for it return?
There seems to be a lot of interest in this question. Perhaps one of our resident experts on all things Clover can weigh in on this in a thread specifically dedicated to it.
I have seen a lot of conflicting statements about this. The newer posts seem to suggest not. Many users are reporting that it worked until updating to 10.12, and then no longer. At the very least, the general consensus is to disable it. However, hibernation detection is clearly built into Clover, along with code and behavior that suggests it is capable of resuming from this state. Most hackintoshes with proper power management can enter into hibernation and write a sleepimage file.
This file exists in the Clover repository on SourceForge:
rEFIt_UEFI/Platform/Hibernate.c
Note: My preboot.log contains debugging logs from this file.
This is in the Clover change log:
"Revision 2525 - hibernation"
Moreover, wake time is one of hibernation's main benefits. If hibernation is not in the cards, I'm sure many besides me would like to know how boot time can be reduced, other than setting Clover's timeout to 0. What portions of the boot process take the longest time? Are there other Clover settings that can make a noticeable difference? Are there unnecessary steps in the boot process that can be set to skip, e.g. the check for an encrypted disk, for those of us not using one? Are there ways to reduce macOS's timeouts during the boot process? Any tips that might serve to reduce boot time in the absence of hibernation would be helpful.
Hibernation is a pretty basic function, and it seems to be in pretty high demand. If it is indeed broken, then it's just one more thing that a genuine Mac has over us. Something tells me we won't allow that forever...are there plans to address this and restore functionality?
I am including my own issue below, but I am separating it since I know many other people would like a definitive answer to the main question and related issues above. Also, if hibernation is not supported, then what follows is largely irrelevant, though it may have to do with why it is nonfunctional.
-------------------------------
I would really like to get hibernation working on one of my systems. It is used very much like a laptop, with an uninterruptible power supply that is often on battery power. Boot/wake time also happens to be critical for its purposes, and though sleep is working just fine, it doesn't last more than a day or two on ~12Ah of battery life.
The system in question:
Intel NUC7i5 (Kaby Lake i5-7260U)
16GB 2133MHz DDR4 RAM
Samsung 960 Pro
High Sierra Beta, Clover_v2.4k_r4200 (UEFI boot)
iMac14,2 system definition
No MultiBeast, post-installation done following RehabMan's NUCi7 installation guide, but adapted for High Sierra (e.g. no HackrNVMeFamily, no SSDT_NVMe or SSDT-SkylakeSpoof)
Clover does not recognize that the system has been hibernated, and it is logging a "Not Found" error when attempting to open sleepimage. Clover is installed to the EFI partition on the 960 Pro, and there are no other drives. The sleepimage file is in the default location and is being created upon entering hibernation with hibernatemode 25. Clover is looking to that location, according to the preboot.log:
0:428 0:005 Check if volume Is Hibernated:
0:428 0:000 Check sleep image 'by signature':
0:429 0:000 using default sleep image name = \private\var\vm\sleepimage
0:429 0:000 sleepimage not found -> Not Found
0:429 0:000 hibernated: no - sign
...
0:476 0:008 Check if volume Is Hibernated:
0:476 0:000 Check sleep image 'by signature':
0:491 0:014 read prefs \Library\Preferences\com.apple.PowerManagement.plist status=Success
0:491 0:000 using default sleep image name = \private\var\vm\sleepimage
0:497 0:006 sleepimage not found -> Not Found
0:497 0:000 hibernated: no - sign
This suggests that in Clover's "Hibernate.c", in the "GetSleepImagePosition" function, the "ImageVolume->RootDir->Open" command is failing to find the sleepimage file, even though it is being passed the correct path. Both times, it is called by IsSleepImageValidBySignature().
The function call in question (currently at line 438 of Hibernate.c):
if (ImageVolume->RootDir) {
// Open sleepimage
Status = ImageVolume->RootDir->Open(ImageVolume->RootDir, &File, ImageName, EFI_FILE_MODE_READ, 0);
if (EFI_ERROR(Status)) {
DBG(" sleepimage not found -> %r\n", Status);
return 0;
}
}
Why might this be happening? Is this error specific to my hardware, or are other people getting the same results in their Clover logs after attempting to hibernate? Could this be because the drive in question is NVMe (i.e. might I have better luck using an AHCI SM951 instead)? Could this be because the drive is formatted APFS for High Sierra, and Clover isn't reading it natively? I am using the apfs.efi driver from the 10.13 beta, but Clover loads that driver long before doing the hibernate check, and it can detect and boot the OS without issue. Will failure inevitably occur further along in the resume-from-hibernation process anyway?
Thanks to anyone who can offer any suggestions or shed some light on these topics.
There seems to be a lot of interest in this question. Perhaps one of our resident experts on all things Clover can weigh in on this in a thread specifically dedicated to it.
I have seen a lot of conflicting statements about this. The newer posts seem to suggest not. Many users are reporting that it worked until updating to 10.12, and then no longer. At the very least, the general consensus is to disable it. However, hibernation detection is clearly built into Clover, along with code and behavior that suggests it is capable of resuming from this state. Most hackintoshes with proper power management can enter into hibernation and write a sleepimage file.
This file exists in the Clover repository on SourceForge:
rEFIt_UEFI/Platform/Hibernate.c
Note: My preboot.log contains debugging logs from this file.
This is in the Clover change log:
"Revision 2525 - hibernation"
Moreover, wake time is one of hibernation's main benefits. If hibernation is not in the cards, I'm sure many besides me would like to know how boot time can be reduced, other than setting Clover's timeout to 0. What portions of the boot process take the longest time? Are there other Clover settings that can make a noticeable difference? Are there unnecessary steps in the boot process that can be set to skip, e.g. the check for an encrypted disk, for those of us not using one? Are there ways to reduce macOS's timeouts during the boot process? Any tips that might serve to reduce boot time in the absence of hibernation would be helpful.
Hibernation is a pretty basic function, and it seems to be in pretty high demand. If it is indeed broken, then it's just one more thing that a genuine Mac has over us. Something tells me we won't allow that forever...are there plans to address this and restore functionality?
I am including my own issue below, but I am separating it since I know many other people would like a definitive answer to the main question and related issues above. Also, if hibernation is not supported, then what follows is largely irrelevant, though it may have to do with why it is nonfunctional.
-------------------------------
I would really like to get hibernation working on one of my systems. It is used very much like a laptop, with an uninterruptible power supply that is often on battery power. Boot/wake time also happens to be critical for its purposes, and though sleep is working just fine, it doesn't last more than a day or two on ~12Ah of battery life.
The system in question:
Intel NUC7i5 (Kaby Lake i5-7260U)
16GB 2133MHz DDR4 RAM
Samsung 960 Pro
High Sierra Beta, Clover_v2.4k_r4200 (UEFI boot)
iMac14,2 system definition
No MultiBeast, post-installation done following RehabMan's NUCi7 installation guide, but adapted for High Sierra (e.g. no HackrNVMeFamily, no SSDT_NVMe or SSDT-SkylakeSpoof)
Clover does not recognize that the system has been hibernated, and it is logging a "Not Found" error when attempting to open sleepimage. Clover is installed to the EFI partition on the 960 Pro, and there are no other drives. The sleepimage file is in the default location and is being created upon entering hibernation with hibernatemode 25. Clover is looking to that location, according to the preboot.log:
0:428 0:005 Check if volume Is Hibernated:
0:428 0:000 Check sleep image 'by signature':
0:429 0:000 using default sleep image name = \private\var\vm\sleepimage
0:429 0:000 sleepimage not found -> Not Found
0:429 0:000 hibernated: no - sign
...
0:476 0:008 Check if volume Is Hibernated:
0:476 0:000 Check sleep image 'by signature':
0:491 0:014 read prefs \Library\Preferences\com.apple.PowerManagement.plist status=Success
0:491 0:000 using default sleep image name = \private\var\vm\sleepimage
0:497 0:006 sleepimage not found -> Not Found
0:497 0:000 hibernated: no - sign
This suggests that in Clover's "Hibernate.c", in the "GetSleepImagePosition" function, the "ImageVolume->RootDir->Open" command is failing to find the sleepimage file, even though it is being passed the correct path. Both times, it is called by IsSleepImageValidBySignature().
The function call in question (currently at line 438 of Hibernate.c):
if (ImageVolume->RootDir) {
// Open sleepimage
Status = ImageVolume->RootDir->Open(ImageVolume->RootDir, &File, ImageName, EFI_FILE_MODE_READ, 0);
if (EFI_ERROR(Status)) {
DBG(" sleepimage not found -> %r\n", Status);
return 0;
}
}
Why might this be happening? Is this error specific to my hardware, or are other people getting the same results in their Clover logs after attempting to hibernate? Could this be because the drive in question is NVMe (i.e. might I have better luck using an AHCI SM951 instead)? Could this be because the drive is formatted APFS for High Sierra, and Clover isn't reading it natively? I am using the apfs.efi driver from the 10.13 beta, but Clover loads that driver long before doing the hibernate check, and it can detect and boot the OS without issue. Will failure inevitably occur further along in the resume-from-hibernation process anyway?
Thanks to anyone who can offer any suggestions or shed some light on these topics.
Last edited: