Jump to content

Clover General discussion


ErmaC
29,818 posts in this topic

Recommended Posts

Just for report:

 

I use Hibernate Mode here, and with OsxAptioFix2Drv-64.efi, my wake up and shutdown is very fast than using OsxAptioFixDrv-64.efi.

 

Congrats for your hard work Clover Team^_^

  • Like 1
Link to comment
Share on other sites

@Allan, too bad hibernation doesn't work on many laptops!

 

Yeah is truth, here is appearing many user with this problem.

The most os the users (60%) have Laptop with Haswell CPUs, but with Ivy CPUs (40%) the Hibernation mode works good.

 

My Laptop use Ivy i5 3210M. 

 

I don't want change my hardware too soon, just want to make some upgrades.

Like buy a SSD  :rolleyes:
Link to comment
Share on other sites

All documentation regarding Hibernation was at ProjectOSX, that unfortunately is down...

 

Proper hibernation depends on many things, CPUPM, GPUPM, ACPI Table, HDD/SDD, including bootloader capability to resume it... And Clover has this capability...

 

But in some cases, there are some tricks that must be used with Clover, like proper slide value, and at OS X, like proper hibernatemode to make it work...

 

The proper slide value apparently (for the most of users) was fixed by using OsxAptioFixDrv2, but you still need some things...

 

For example, you'll never have proper sleep using OsxAptioFixDrv2+slide=0+hibernatemode=0, but maybe using OsxAptioFixDrv2+slide=0+hibernatemode=3...

 

If i'm not wrong, the first successful report from dmazar was using hibernatemode=25 on a regular HDD, but the same settings using a SSD not worked...

 

Let's hope that some of this information can be recovered, and that ProjectOSX can be back again! 

  • Like 4
Link to comment
Share on other sites

I am working hibernate.

OS X-10.10.4 N53sv

UefiMode

hibernate=57,slide=100, OsxAptioFix2Drv-64

LegacyMode

hibernate=28

post-617057-0-46917000-1433678585_thumb.png

0:100  0:100  MemLog inited, TSC freq: 1995476266
0:100  0:000  
0:100  0:000  Now is 7.6.2015,  3:35:42 (GMT+2047)
0:100  0:000  Starting Clover rev 3220 on American Megatrends EFI
0:100  0:000  SelfDevicePath=PciRoot(0x0)\Pci(0x1F,0x2)\Sata(0x1,0xFFFF,0x0)\HD(1,GPT,F61211C5-87B9-4CDD-BE33-9DC9BD4A478E,0x28,0x64000) @2308B98
0:100  0:000  SelfDirPath = \EFI\CLOVER
......
0:100  0:000  Clover revision: 3220  running on N53SV
0:100  0:000  ... with board N53SV
0:100  0:000  CPU Vendor = 756E6547 Model=206A7
0:100  0:000  The CPU supported turbo
0:100  0:000  BrandString = Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz
..........
.........
2:099  0:000  NVidia GFX injection not set
2:099  0:000  Intel Intel HD Graphics 3000 [8086:0116] :: PciRoot(0x0)\Pci(0x2,0x0)
2:099  0:000  Intel GFX revision  =0x9
2:099  0:000  USB Controller [8086:1C2D] :: PciRoot(0x0)\Pci(0x1A,0x0)
2:099  0:000  USB Controller [1B73:1000] :: PciRoot(0x0)\Pci(0x1C,0x3)\Pci(0x0,0x0)
2:100  0:000  LAN Controller [10EC:8168] :: PciRoot(0x0)\Pci(0x1C,0x5)\Pci(0x0,0x0)
2:100  0:000  USB Controller [8086:1C26] :: PciRoot(0x0)\Pci(0x1D,0x0)
2:100  0:000  stringlength = 2514
2:100  0:000  CurrentMode: Width=800 Height=600
2:100  0:000  FSInjection: using kexts path: 'EFI\CLOVER\OEM\N53SV\UEFI\kexts\10.10'FSInjectionInstall ...
- Our FSI_SIMPLE_FILE_SYSTEM_PROTOCOL installed on handle: 2308898
2:101  0:000  
2:104  0:003  PrepareHibernation:
2:112  0:008      read prefs \Library\Preferences\SystemConfiguration\com.apple.PowerManagement.plist status=Success
2:112  0:000      SleepImage name from pref: ImageVolume = 'YOS11', ImageName = '\private\var\vm\sleepimage'
2:112  0:000      returning previously calculated offset: A34B75000
2:112  0:000   SleepImageOffset: A34B75000
2:112  0:000  02 01 0C 00 D0 41 03 0A 00 00 00 00 01 01 06 00 | .....A..........
2:112  0:000  02 1F 03 12 0A 00 01 00 FF FF 00 00 04 04 18 00 | ................
2:112  0:000  41 00 33 00 34 00 42 00 37 00 35 00 30 00 30 00 | A.3.4.B.7.5.0.0.
2:112  0:000  30 00 00 00 7F FF 04 00                         | 0.......
2:112  0:000  boot-image before: PciRoot(0x0)\Pci(0x1F,0x2)\Sata(0x1,0xFFFF,0x0)\A34B75000
2:116  0:003  DeleteBootOption: Boot0082
2:119  0:002   Boot0082 deleted
2:119  0:000  DeleteFromBootOrder: 0082
2:119  0:000  BootOrder: 3: Boot0002, Boot0000, Boot0082
2:121  0:002   found at index 2
2:124  0:003  SetVariable: BootOrder = Success
2:125  0:000   boot-switch-vars present
2:125  0:000  Removed efi-boot-device-data variable: Not Found
2:125  0:000  SetScreenResolution: 800x600 - already set
2:125  0:000  Custom boot is disabled
2:125  0:000  Closing events for wake
2:125  0:000  Closing log
 

OS X-10.10.3 Z77-D3sh

UefiMode

hibernate=57,slide=8,OsxAptioFix2Drv-64

LegacyMode

hibernate=29

For other systems, these settings need to be adjusted

post-617057-0-81769500-1433678667_thumb.png

0:100  0:100  MemLog inited, TSC freq: 3403346486
0:100  0:000  
0:100  0:000  Now is 7.6.2015,  6:1:57 (GMT+2047)
0:100  0:000  Starting Clover rev 3218 on American Megatrends EFI
0:100  0:000  SelfDevicePath=PciRoot(0x0)\Pci(0x1F,0x2)\Sata(0x1,0xFFFF,0x0)\HD(1,GPT,0863F066-65A6-46F9-B747-72F25E463E02,0x28,0x64000) @DB84A598
0:100  0:000  SelfDirPath = \EFI\BOOT
………
1:586  0:075      AddLoaderEntry for Volume Name=YOSHDD
1:616  0:030      Check if volume Is Hibernated:
1:616  0:000      Check sleep image 'by signature':
1:676  0:060      read prefs \Library\Preferences\SystemConfiguration\com.apple.PowerManagement.plist status=Success
1:676  0:000      SleepImage name from pref: ImageVolume = 'YOSHDD', ImageName = '\private\var\vm\sleepimage'
1:707  0:030      Reading first 512 bytes of sleepimage ...
1:721  0:014   OurBlockIoRead: Lba=2F0A6338, Offset=5E14C67000 (BlockSize=512)
1:721  0:000   sig lion: 73696D65
1:721  0:000   sig snow: 0
1:721  0:000   got sleep image offset
1:721  0:000      Reading completed -> Success
1:721  0:000       sleepimage offset acquired successfully: 5E14C67000
1:721  0:000       gSleepTime: 1433656867
1:722  0:000       HFS+ volume modifyDate: 1433656867
1:722  0:000       image older then volume: 0 sec
1:722  0:000       hibernated: yes
1:722  0:000       UEFI with NVRAM: yes
1:744  0:022   5: 'Recovery HD'
1:746  0:001      AddLoaderEntry for Volume Name=Recovery HD
1:768  0:022   6: 'ArchYOSHDD'
1:860  0:092   7: 'EFI'
2:842  0:981   8: 'ML-10.8.5ssd'
2:852  0:010      AddLoaderEntry for Volume Name=ML-10.8.5ssd
2:859  0:007      Check if volume Is Hibernated:
2:859  0:000      Check sleep image 'by signature':
2:866  0:006      read prefs \Library\Preferences\SystemConfiguration\com.apple.PowerManagement.plist status=Success
2:866  0:000      SleepImage name from pref: ImageVolume = 'ML-10.8.5ssd', ImageName = '\private\var\vm\sleepimage'
2:871  0:005      sleepimage not found -> Not Found
2:871  0:000       hibernated: no - sign
2:876  0:004   9: 'archssd'
2:879  0:003  GetEfiBootDeviceFromNvram: efi-boot-device-data not found
2:879  0:000  EfiBootVolume not found
2:879  0:000   found entry 0. 'Boot Mac OS X from YOSHDD (hibernated)', Volume 'YOSHDD', DevicePath 'PciRoot(0x0)\Pci(0x1F,0x2)\Sata(0x1,0xFFFF,0x0)\HD(2,GPT,8451DBC1-BA2E-481F-A925-95AB1B0AAEAA,0x64028,0x3A28EA60)\System\Library\CoreServices\boot.efi'
2:879  0:000  DefaultIndex=0 and MainMenu.EntryCount=3
2:879  0:000  StartLoader() start
2:879  0:000  Finally: Bus=100098kHz CPU=3403MHz
……..
3:040  0:000  CurrentMode: Width=800 Height=600
3:040  0:000  FSInjection: using kexts path: 'EFI\CLOVER\OEM\Z77-DS3H\UEFI\kexts\10.10'FSInjectionInstall ...
- Our FSI_SIMPLE_FILE_SYSTEM_PROTOCOL installed on handle: DB84A298
3:040  0:000  
3:044  0:003  PrepareHibernation:
3:049  0:005      read prefs \Library\Preferences\SystemConfiguration\com.apple.PowerManagement.plist status=Success
3:049  0:000      SleepImage name from pref: ImageVolume = 'YOSHDD', ImageName = '\private\var\vm\sleepimage'
3:049  0:000      returning previously calculated offset: 5E14C67000
3:049  0:000   SleepImageOffset: 5E14C67000
3:049  0:000  02 01 0C 00 D0 41 03 0A 00 00 00 00 01 01 06 00 | .....A..........
3:049  0:000  02 1F 03 12 0A 00 01 00 FF FF 00 00 04 04 1A 00 | ................
3:049  0:000  35 00 45 00 31 00 34 00 43 00 36 00 37 00 30 00 | 5.E.1.4.C.6.7.0.
3:049  0:000  30 00 30 00 00 00 7F FF 04 00                   | 0.0.......
3:049  0:000  boot-image before: PciRoot(0x0)\Pci(0x1F,0x2)\Sata(0x1,0xFFFF,0x0)\5E14C67000
3:051  0:001  DeleteBootOption: Boot0082
3:051  0:000   Boot0082 deleted
3:051  0:000  DeleteFromBootOrder: 0082
3:051  0:000  BootOrder: 8: Boot0000, Boot0080, Boot0081, Boot0085, Boot0002, Boot0084, Boot0083, Boot0082
3:051  0:000   found at index 7
3:052  0:001  SetVariable: BootOrder = Success
3:052  0:000   boot-switch-vars present
3:052  0:000  Removed efi-boot-device-data variable: Not Found
3:052  0:000  SetScreenResolution: 800x600 - already set
3:052  0:000  Custom boot is disabled
3:052  0:000  Closing events for wake
3:052  0:000  Closing log

  • Like 1
Link to comment
Share on other sites

What is your:

Slide = ( ) value?

Hibernation Mode?

And what driversUEFI you use?

 

I use MacBookPro10,2 SMBios here, and everything works good.

I tried these:

Slide=0 and slide =8 and slide=100 with hibertationmode=29 (its the only mode that I get to have my desktop running but nothing on screen, i checked with vnc, and other than that it still not usuable, it hangs after the first seconds of waking) every other mode keep hanged on the boot logo with the progress bar under it and my cpu fan start spinning like a jet!

For drivers I replaced VboxHFS with Hfsplus and i selected aptiofix2 nothing else.

But now ive noticed than my hdd is failing (like 6GB of bad blocks!) And hopefully its at the end of the drive) I can still try tho.

And another thing, I use a clover kext patching for Capri drivers, I use IGP4 and the patch adds extra port for hdmi/dp.

Link to comment
Share on other sites

And another thing, I use a clover kext patching for Capri drivers, I use IGP4 and the patch adds extra port for hdmi/dp.

 

I use this in my config.plist too, is not a problem.

 

RWc.png

 

And my Sleep/Hibernate works like a charm.  :P

Link to comment
Share on other sites

RE: hibernation

 

it is working (mostly) on the Lenovo T420 laptop platform with the OsxAptioFix2Drv-64 driver.

  • UEFI Mode
  • pmset hibernatemode=7 (which to my understanding is like mode 3 but not encrypted so it works!)
  • slide=0
  • OsxAptioFix2Drv-64

there is 1 issue -- upon resume from the hibernation image (versus resume from memory), the LCD is black (backlight black) until it goes through 1 sleep/wake cycle - close lid and then open as soon as it is asleep. Then all is fine.  Since this a laptop and I rarely need to resume from the HD (i.e. hibernation image) I have not worried about it until now i when see some discussion on this topic!

 

So anyway, I was curious about the slide values (other than 0) and how that may possibly help the resume?

or anyone has some thoughts or ideas on how to resume from hibernation without blank screen?

  • Like 1
Link to comment
Share on other sites

 

InfoPlist Patching

 

There is interesting Clover ability to perform an Info.plist patching on the fly.

Since rev.3154 I should set more strict rules to have a success.

Write into config.plist the follow as example

	<key>KernelAndKextPatches</key>
	<dict>
		<key>KextsToPatch</key>
		<array>
			<dict>
				<key>Comment</key>
				<string>Power state 1 - 0</string>
				<key>Name</key>
				<string>AppleIntelHDGraphicsFB</string>
				<key>InfoPlistPatch</key>
				<true/>
				<key>Find</key>
				<data>PGtleT5Qb3dlclN0YXRlczwva2V5PjxpbnRlZ2VyPjE8L2ludGVnZXI+</data>
				<key>Replace</key>
				<data>PGtleT5Qb3dlclN0YXRlczwva2V5PjxpbnRlZ2VyPjA8L2ludGVnZXI+</data>
			</dict>
		</array>
	</dict>

It corresponds to replace in kext AppleIntelHDGraphicsFB.kext, in its Info.plist the lines

				<key>PowerStates</key>
				<integer>1</integer>

by lines

				<key>PowerStates</key>
				<integer>0</integer>

but original pattern contains symbols "<", ">", "/", LF, TAB, SPACES that impossible to correctly write into config.plist.

So

1. You have to erase all invisible characters from pattern search.

2. Convert <string> to <data>.

The result looks like

attachicon.gifScreen Shot 2015-02-02 at 17.19.48.png

This is only way to do search and replace will be success.

 

Next problem.

If you want to replace DeviceID into IOPCIMatch the you can use this InfoPlistPatch

For example inject unsupported ATI Radeon ID into AMDRadeonX3000.kext. But the kext is not present in kernelcache and the patch will not occur.

In this case you have to boot without caches and Clover will Force load this kext for patching.

 

 

 

I followed you example to make sure that it works because I have never had success with this feature. It did succeed in patching the plist for AppleIntelHDGraphicsFB.

 

But......

 

I want to patch /System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns/AppleGraphicsDevicePolicy.kext/Contents/Info.plist

 

find:

				<key>Mac-F60DEB81FF30ACF6</key>
				<string>Config1</string>
 

replace with:

				<key>Mac-F60DEB81FF30ACF6</key>
				<string>none</string>
 

I entered:

 

Name:                                                

AppleGraphicsDevicePolicy  
Find:

<key>Mac-F60DEB81FF30ACF6</key><string>Config1</string> 
Replace:

<key>Mac-F60DEB81FF30ACF6</key><string>none</string> 
Comment:

MacPro6,1 GFX Fix 
I select the check box for "infoPlistPatch" and changed the "Type/Key?" to DATA.

 

I still get this in bdmesg:

KextToPatch 2: AppleGraphicsDevicePolicy (MacPro6,1 GFX Fix) Info.plist patch - invalid Find/Replace data - skipping!
 

I think this feature is still broken for kexts inside of other kext's plugins folders. This might be something to work on.

 

Thanks for all the great work so far!

  • Like 1
Link to comment
Share on other sites

 

 

I followed you example to make sure that it works because I have never had success with this feature. It did succeed in patching the plist for AppleIntelHDGraphicsFB.

 

But......

 

I want to patch /System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns/AppleGraphicsDevicePolicy.kext/Contents/Info.plist

 

find:

				<key>Mac-F60DEB81FF30ACF6</key>
				<string>Config1</string>
 

replace with:

				<key>Mac-F60DEB81FF30ACF6</key>
				<string>none</string>
 

I entered:

 

Name:                                                

AppleGraphicsDevicePolicy  
Find:

<key>Mac-F60DEB81FF30ACF6</key><string>Config1</string> 
Replace:

<key>Mac-F60DEB81FF30ACF6</key><string>none</string> 
Comment:

MacPro6,1 GFX Fix 
I select the check box for "infoPlistPatch" and changed the "Type/Key?" to DATA.

 

I still get this in bdmesg:

KextToPatch 2: AppleGraphicsDevicePolicy (MacPro6,1 GFX Fix) Info.plist patch - invalid Find/Replace data - skipping!
 

I think this feature is still broken for kexts inside of other kext's plugins folders. This might be something to work on.

 

Thanks for all the great work so far!

 

This errors means Search and Replace strings have different length.

Link to comment
Share on other sites

This errors means Search and Replace strings have different length.

 

I also have stumbled upon this. But why? At least for info.plist patches I think this should be possible, or this feature - which I think is great in general! - feels somewhat limited with some usecases (like this one).

Link to comment
Share on other sites

This errors means Search and Replace strings have different length.

info.plist patch is extremely useful and it would be great to be able to replace any text with any other. This would be indispensable if Apple ever locks us completely out of SLE. I guess I call it a feature request.

 

thanks again for the great work

Link to comment
Share on other sites

So anyway, I was curious about the slide values (other than 0) and how that may possibly help the resume?

or anyone has some thoughts or ideas on how to resume from hibernation without blank screen?

 

I think you may be right about the hibernation mode you are using (7 bit 111), but, if i'm not wrong (and probably I am, as I'm not

even close to a low level programmer :D ), using bit 2 will enable encryption right? 

 

The slide=0 was a workaround made to force boot.efi to be loaded at a specific memory block, and it's needed since Mountain Lion...

 

Nowadays, it's automatically set (slide=0), without the need of the user manually add it... 

 

dmazar gave us some formulas and complete instructions on what are the best memory regions to use, and on how to use this regions by setting

its slide value at Clover, obviously, different than 0...

 

It was a HUGE amount of information, that unfortunately was lost, and maybe, only dmazar will have a documentation...

  • Like 2
Link to comment
Share on other sites

I think you may be right about the hibernation mode you are using (7 bit 111), but, if i'm not wrong (and probably I am, as I'm not

even close to a low level programmer :D ), using bit 2 will enable encryption right? 

 

The slide=0 was a workaround made to force boot.efi to be loaded at a specific memory block, and it's needed since Mountain Lion...

 

Nowadays, it's automatically set (slide=0), without the need of the user manually add it... 

 

dmazar gave us some formulas and complete instructions on what are the best memory regions to use, and on how to use this regions by setting

its slide value at Clover, obviously, different than 0...

 

It was a HUGE amount of information, that unfortunately was lost, and maybe, only dmazar will have a documentation...

 

Stuff was not really 'lost', it's simply not put up in a single place once again... anything specific you want to know?

Link to comment
Share on other sites

 

 

Stuff was not really 'lost', it's simply not put up in a single place once again...

Oh! Nice to hear this!

 

There are some users wanting to know more about Secure Boot, that was implemented by apianti, but wasn't finished... The whole "known" research was at ProjectOSX...

 

The same for OsxAptioFixDrv, its variants...

 

This, not taking in count many other "great" stuff like Pene's PatchVBios findings...

 

It would be a great thing have it again at a known place!

 

anything specific you want to know?

No, I don't want nothing specific for now...

 

Thank you!

  • Like 2
Link to comment
Share on other sites

I can say digest.

 

About hibernation.

$ man pmset 

will tell you more then I can say.

0 is a simple sleep. Good for desktop but eat battery power on notebooks.

1 is hibernation. 

Other flags (hex numbers while pmset set decimal!!!!)

enum
{
    kIOHibernateModeOn      = 0x00000001,
    kIOHibernateModeSleep   = 0x00000002,
    kIOHibernateModeEncrypt = 0x00000004,
    kIOHibernateModeDiscardCleanInactive = 0x00000008,
    kIOHibernateModeDiscardCleanActive   = 0x00000010,
    kIOHibernateModeSwitch	= 0x00000020,
    kIOHibernateModeRestart	= 0x00000040,
    kIOHibernateModeSSDInvert	= 0x00000080,
    kIOHibernateModeFileResize	= 0x00000100,
};

Working solution found with flags 21, 29, 57. Decimal!!!

21 = 0x15 = kIOHibernateModeDiscardCleanActive + kIOHibernateModeEncrypt + kIOHibernateModeOn

29 = 0x15 + 8 -> + kIOHibernateModeDiscardCleanInactive

57 = 0x30 + 8 + 1 = kIOHibernateModeSwitch + Clean + Hibernate

Strange about encrypt but it seems works not as expected.

 

Hibernation works since 10.9.1. No solutions for 10.8. Some success for 10.7 but unconfirmed.

Hibernation works with legacy Clover but not with UEFI because of wrong OsxAptioFixDrv.

Dmazar created special version OsxAptioFix2Drv.efi which compatible with hibernation. But this version loads only 10.9. No way to load 10.7. I don't know about Yosemite.

 

 

About OsxAptioFix variants.

This is very complex driver that attempts to correct memory map left after UEFI on the fly.

Memory map from legacy Clover is very good.

The problem is different OEM UEFI BIOSes have different mistakes and the OsxAptioFix can't be universal.

So different versions of the driver created:

- one works for AMI UEFI

- another works for Phoenix

- third correct hibernation

- fourth switch on hardware NVRAM.

 

I am happy with my Gigabyte H61 board. There is UEFI BIOS.

Main version of OsxAptioFix works for me loading 10.7.5 and 10.9.5 with working hardware NVRAM. 

UEFI hibernation no. It works with OsxAptioFix2Drv but without possibility to boot 10.7.5.

 

More question?

A developers may create own version of OsxAptioFix but users can not ask to create a version for him. It's impossible. It requires to have such hardware and spent several hours rebooting.

  • Like 5
Link to comment
Share on other sites

×
×
  • Create New...