Jump to content

Clover Problems and Solutions


ErmaC
3,206 posts in this topic

Recommended Posts

@Sherlocks,

 

Switch to OsxAptioFixDrv not OsxAptioFix2Drv. Or inspect your memory map and see if you have enough pages anywhere below 4GB (0x100000000) and slide the allocation (although you probably do not have that memory available).

 

 

So why Clover uses Hacked one? :rolleyes:

 

...Hacked?   :huh: ...To add more tools? ...To help, you know, with making it easier to build...

  • Like 1
Link to comment
Share on other sites

@Sherlocks,

 

Switch to OsxAptioFixDrv not OsxAptioFix2Drv. Or inspect your memory map and see if you have enough pages anywhere below 4GB (0x100000000) and slide the allocation (although you probably do not have that memory available).

 

 

 

...Hacked? :huh: ...To add more tools? ...To help, you know, with making it easier to build...

Already checked osxaptifix2drv and osxaptiofixdrv. Still no luck.

 

How can inspect memory?

 

나의 LG-F410S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

Go into the efi shell, select a volume and 

memmap > memmap.txt
EDIT: Oh, also, don't use any of the fix drivers in combinations, only ever use one, they conflict. Also those X79/X99 fixes, that came about from my conversation with nick, are not good long term solutions but a proof of concept. They basically just release as much memory as possible - that's probably not good.
Link to comment
Share on other sites

Go into the efi shell, select a volume and 

memmap > memmap.txt
EDIT: Oh, also, don't use any of the fix drivers in combinations, only ever use one, they conflict. Also those X79/X99 fixes, that came about from my conversation with nick, are not good long term solutions but a proof of concept. They basically just release as much memory as possible - that's probably not good.

 

 

yes, i only use one driver osxaptifix2drv or osxaptiofixdrv

 

 

here is memmap file

 

 

also, my skylake laptop has similiar issue. if use safe mode boot, i get memory error

memmap.txt.zip

Link to comment
Share on other sites

Well even test2.efi and free2000.efi, etc. You can only use one memory fix. But not sure what's going on, where in the boot process is this memmap from? After the clover GUI? I see that you have plenty of memory here:

Available  000000000EDE4000-000000002C941FFF 000000000001DB5E 000000000000000F
Unsure why it's trying to allocate at the top of this available region instead of the bottom. What message are you getting with OsxAptioFixDrv, that message was from OsxAptioFix2Drv, right? Can you please start clover, enter the shell, get memmap, then boot with both using each driver and post memmaps and result images?

 

EDIT: Wording.

Link to comment
Share on other sites

Well even test2.efi and free2000.efi, etc. You can only use one memory fix. But not sure what's going on, where in the boot process is this memmap from? After the clover GUI? I see that you have plenty of memory here:

Available  000000000EDE4000-000000002C941FFF 000000000001DB5E 000000000000000F
Unsure why it's trying to allocate at the top of this available region instead of the bottom. What message are you getting with OsxAptioFixDrv, that message was from OsxAptioFix2Drv, right? Can you please start clover, enter the shell, get memmap, then boot with both using each driver and post memmaps and result images?

 

EDIT: Wording.

 

 

here is result

case OsxAptioFixDrv-64.efi zip

1. enter gui -> efi sell -> get memmap -> exit -> get preboot.log -> macos installer -> memory error -> take a pic

efi file list

AppleImageCodec-64.efi 

AppleKeyAggregator-64.efi

AppleUITheme-64.efi

DataHubDxe-64.efi

EmuVariableUefi-64.efi 

FirmwareVolume-64.efi

FSInject-64.efi 

HFSPlus.efi 

OsxAptioFixDrv-64.efi

OsxFatBinaryDrv-64.efi

 

SMCHelper-64.efi

 

case OsxAptioFixDrv2-64.efi zip

1. enter gui -> efi sell -> get memmap -> exit -> get preboot.log -> macos installer -> memory error -> take a pic

efi file list

AppleImageCodec-64.efi 

AppleKeyAggregator-64.efi

AppleUITheme-64.efi

DataHubDxe-64.efi

EmuVariableUefi-64.efi 

FirmwareVolume-64.efi

FSInject-64.efi 

HFSPlus.efi 

OsxAptioFixDrv2-64.efi

OsxFatBinaryDrv-64.efi

SMCHelper-64.efi

 

 

thanks in advance

OsxAptioFixDrv-64.efi.zip

OsxAptioFixDrv2-64.efi.zip

Link to comment
Share on other sites

Well, that makes very little sense. There are two problems I see in both, there appears to be some weird page count computation error, and looks like an allocation is being made inside the region that needs allocated. Seems that printing out the memmap when this error happens would be more useful since maybe also other stuff changed.... Damn. Anyway here's the current issue:
 
As you can see for AptioFix, the relocation block appears to be cut off by a driver, or maybe even clover itself. What's really weird is that the region it wants is completely available according to your memmap, I have a feeling that there must be another allocation here between these two not seen when your memmap was captured.

Requested mem: 5D9C000 - 17701FFF, Pages: 11966, Size: 11966000
Reloc block: 17020000 - 2C97AFFF, Pages: 1595B, Size: 1595B000
Available 000000000EDE4000-000000002C941FFF 000000000001DB5E 000000000000000F
LoaderCode 000000002C942000-000000002CADCFFF 000000000000019B 000000000000000F

Then AptioFix2,

Error allocating 0x275 pages at 0x0000000000ed28000 alloc type 2
Available  0000000000100000-000000000EDA3FFF 000000000000ECA4 000000000000000F
BS_Data    000000000EDA4000-000000000EDE3FFF 0000000000000040 000000000000000F
Available  000000000EDE4000-000000002C941FFF 000000000001DB5E 000000000000000F

So, first, I think that there needs to be a better method of determining if the allocation will fail, I think it has to do with the page computation method(s). There's something weird going on there.
Second, and I think this is probably the big thing, need to probably prevent boot time allocations from happening in lower memory where the kernel/device-tree/runtime/etc is going to try to be allocated. This can be easily achieved by hooking the memory allocation functions and modifying boot time allocations to be made above 4GB. Although I'm not sure if this is entirely possible/would not break stuff, but I also don't see why it would since all code should, in theory, be 64bit. Hmmmmmm....

  • Like 1
Link to comment
Share on other sites

Well, that makes very little sense. There are two problems I see in both, there appears to be some weird page count computation error, and looks like an allocation is being made inside the region that needs allocated. Seems that printing out the memmap when this error happens would be more useful since maybe also other stuff changed.... Damn. Anyway here's the current issue:

 

As you can see for AptioFix, the relocation block appears to be cut off by a driver, or maybe even clover itself. What's really weird is that the region it wants is completely available according to your memmap, I have a feeling that there must be another allocation here between these two not seen when your memmap was captured.

Requested mem: 5D9C000 - 17701FFF, Pages: 11966, Size: 11966000Reloc block: 17020000 - 2C97AFFF, Pages: 1595B, Size: 1595B000
Available 000000000EDE4000-000000002C941FFF 000000000001DB5E 000000000000000FLoaderCode 000000002C942000-000000002CADCFFF 000000000000019B 000000000000000F
Then AptioFix2,
Error allocating 0x275 pages at 0x0000000000ed28000 alloc type 2
Available  0000000000100000-000000000EDA3FFF 000000000000ECA4 000000000000000FBS_Data    000000000EDA4000-000000000EDE3FFF 0000000000000040 000000000000000FAvailable  000000000EDE4000-000000002C941FFF 000000000001DB5E 000000000000000F
So, first, I think that there needs to be a better method of determining if the allocation will fail, I think it has to do with the page computation method(s). There's something weird going on there.

Second, and I think this is probably the big thing, need to probably prevent boot time allocations from happening in lower memory where the kernel/device-tree/runtime/etc is going to try to be allocated. This can be easily achieved by hooking the memory allocation functions and modifying boot time allocations to be made above 4GB. Although I'm not sure if this is entirely possible/would not break stuff, but I also don't see why it would since all code should, in theory, be 64bit. Hmmmmmm....

first of all, thanks

 

i tested many times. seems to get no memory error now.

but i can't pass kernel log with -v

post-980913-0-69552000-1495303718_thumb.jpeg

Ram 8(4x2) dual channel 2. And dimm0,2 but onboard ram

 

 

also my laptop has similar issue. i used aptiofixv2

here

normal boot no problem. just can't boot if i use -x boot arg

post-980913-0-01340200-1495304093_thumb.jpeg

memmap.txt-laptop.zip

Ram 8g single channel, has that can change ram slot.

Link to comment
Share on other sites

Probably just a matter of luck that nothing is getting allocated in the region the kernel wants. As for the safe mode, something needs fixed there, you clearly have enough to allocate at 0x100000. Unless somehow now your memmap is allocating down there instead of higher..... It's hard to really say at that point. Since I don't think boot services are terminated yet, there is possibility to dump stuff when failure. This may be a better approach than the current screen printing, well in addition to.

Link to comment
Share on other sites

Probably just a matter of luck that nothing is getting allocated in the region the kernel wants. As for the safe mode, something needs fixed there, you clearly have enough to allocate at 0x100000. Unless somehow now your memmap is allocating down there instead of higher..... It's hard to really say at that point. Since I don't think boot services are terminated yet, there is possibility to dump stuff when failure. This may be a better approach than the current screen printing, well in addition to.

These are errors I get when trying to use Intel Graphics instead of Nvidia. My solution was always to just keep restarting until it doesn't happen.

 

I've thought about getting logging to work over serial port (which would only work if you have a serial port), or to an EFI device-property (which would only work if you could boot into macOS). I haven't had time to look into either solution. Logging to a file would be the best solution if that were possible at this stage. Maybe it's not, otherwise it would be doing that already or maybe it just requires more work.

Link to comment
Share on other sites

Yeah that just reinforces that it's a matter of luck where nothing happens to get allocated in the region boot.efi decides is the place the kernel should load. Has become a more prevalent error as it seems that firmware vendors changed the way that they allocate memory, seems to fragment more than previously. Also the kernel cache is becoming larger and larger.

It should be entirely possible to log to file, obviously this is an allocation so boot services are still available. In fact AptioFix itself intercepts the exit boot services call and performs some stuff before calling exit boot services, so I see no reason why not (unless boot.efi has done something crazy and unloaded everything, that's doubtful though). There's also this and this. However I doubt those will be particularly useful since it's getting to the end and printing out the error message anyway and that's what's useful. What really is needed is the error message with the addresses and sizes/page counts, and the memmap at the time it's failing.

Link to comment
Share on other sites

. What really is needed is the error message with the addresses and sizes/page counts, and the memmap at the time it's failing.

It can be done with DumpUefiCall if compile it for this purpose. I remember dmazar did this.

Link to comment
Share on other sites

Yes, I remember that too, oh, projectosx, but that was different. He needed to know exactly how boot.efi was allocating memory and moving run time regions. This has to do with the memory map regions that have already been allocated before boot.efi. So the memory map needs to be dumped when this error happens, but DumpUefiCalls does not dump the memory map.

Link to comment
Share on other sites

Yeah that just reinforces that it's a matter of luck where nothing happens to get allocated in the region boot.efi decides is the place the kernel should load. Has become a more prevalent error as it seems that firmware vendors changed the way that they allocate memory, seems to fragment more than previously. Also the kernel cache is becoming larger and larger.

It should be entirely possible to log to file, obviously this is an allocation so boot services are still available. In fact AptioFix itself intercepts the exit boot services call and performs some stuff before calling exit boot services, so I see no reason why not (unless boot.efi has done something crazy and unloaded everything, that's doubtful though). There's also this and this. However I doubt those will be particularly useful since it's getting to the end and printing out the error message anyway and that's what's useful. What really is needed is the error message with the addresses and sizes/page counts, and the memmap at the time it's failing.

 

i tested all today

i mentioned this

------------------------------------

i tested many times. seems to get no memory error now.

but i can't pass kernel log with -v

post-980913-0-69552000-1495303718_thumb. 

Ram 8(4x2) dual channel 2. And dimm0,2 but onboard ram

------> i used only OsxAptioFix2Drv-free2000.efi. no problem, -x, -v boot

also my laptop has similar issue. i used aptiofixv2

here

normal boot no problem. just can't boot if i use -x boot arg

 

------> i used only OsxAptioFix2Drv-free2000.efi. i can boot -x and -v boot.

 

------------------------------------

 

@apianti

 

added. 

randomly can't boot with error like screenshot above

 

i saw many discussion.

https://sourceforge.net/p/cloverefiboot/tickets/125

https://sourceforge.net/p/cloverefiboot/tickets/125/?limit=25&page=4#e39d

 

i also have a issue like them.

 

i tried to calculate slide value

https://github.com/wmchris/DellXPS15-9550-OSX/blob/master/Additional/slide_calc.md

 

can boot normal boot. but can't boot -x(safe mode)

 

thanks in advance

 

last added.

my best way

to use -v boot or -x boot

---->OsxAptioFix2Drv-free2000.efi.

 

to avoid random failed boot

---->calculate slide value from memmap

 

 

as result, by using OsxAptioFix2Drv-free2000.efi + slide option, i can fix all issue on my case.

  • Like 1
Link to comment
Share on other sites

@apianti

 

I found something about safe mode.

I used only OsxAptioFix2Drv-free2000.efi.

To avoid 1/10 failed boot and use safe mode.

 

But safe mode is same like -v.

Just message "safe mode" when enter AptiFix.

After boot, mascos still same normal boot.

 

So I have to use slide calculate. Approximately slide=160.

 

Boot arg slide 160 + OsxAptioFix2Drv-free2000.efi.

 

Can use

Normal boot

Safe mode(in macos), perform disk repair when booting.

Avoid randomly failed boot.

 

Thanks in advance

 

brief summary

1. OsxAptioFixDrv

-v boot - works

-x boot - works(but normal boot same in macos)

2. OsxAptioFixDrv + slide 160 or 170

-v boot - failed

-x boot - works(perform disk check at boot and safe mode in macos)

 

1. OsxAptioFix2Drv

-v boot - works

-x boot - failed

2. OsxAptioFix2Drv + slide 160 or 170

-v boot - works

-x boot - failed

 

1. OsxAptioFix2Drv-free2000

-v boot - works

-x boot - works(but normal boot same in macos)

2. OsxAptioFix2Drv-free2000 + slide 160 or 170

-v boot - works

-x boot - works(perform disk check at boot and safe mode in macos)

 

Add.

I want to know

In recovery, can we use -x? If use -x, get error message, it is not relate memmap

 

나의 LG-F410S 의 Tapatalk에서 보냄

  • Like 4
Link to comment
Share on other sites

×
×
  • Create New...