Jump to content

Clover General discussion


ErmaC
29,866 posts in this topic

Recommended Posts

I got really tired of having to set "nv_disable=1" in my boot-args when updating to a new OS version on my Maxwell GPU, so I figured out a way to patch the stock NVDAStartup.kext to avoid the panic.  There's one byte different between the 10.11/10.11.1 version and the 10.11.2 version, not sure if there's a better way of handling this other than just having two patch entries.

<dict>
<key>Comment</key>
<string>Maxwell panic fix 10.11</string>
<key>Find</key>
<string>898d14ffffff418d46ef83f80273094c8d3514090000eb34</string>
<key>Name</key>
<string>NVDAStartup</string>
<key>Replace</key>
<string>898d14ffffff418d46ef9090909090909090909090909090</string>
</dict>
<dict>
<key>Comment</key>
<string>Maxwell panic fix 10.11.2</string>
<key>Find</key>
<string>418d46ef83f80273094c8d35f1090000eb34</string>
<key>Name</key>
<string>NVDAStartup</string>
<key>Replace</key>
<string>418d46ef9090909090909090909090909090</string>
</dict>

It basically NOP's out the 4 instructions in the middle of this block so that NVDAStartup doesn't try to match a Maxwell GPU.  As far as I can tell, the panic comes from the fact NVDAStartup is incorrectly matching a Maxwell GPU but the stock Apple drivers don't support it, so skipping this avoids the panic.

00000000000015ad 418D46EF                        lea        eax, dword [ds:r14-0x11] ; XREF=__ZN11NVDAStartup5probeEP9IOServicePi+406
00000000000015b1 83F802                          cmp        eax, 0x2
00000000000015b4 7309                            jae        0x15bf
00000000000015b6 4C8D35F1090000                  lea        r14, qword [ds:0x1fae] ; "GM100"
00000000000015bd EB34                            jmp        0x15f3
00000000000015bf 488D3DEE090000                  lea        rdi, qword [ds:0x1fb4] ; "Architecture couldn't be recognized! PMC_BOOT_0 = %p, PMC_BOOT_42 = 0x%08x\\n", argument "format" for method _kprintf, XREF=__ZN11NVDAStartup5probeEP9IOServicePi+424

I would've preferred to match more stuff around the code in question, but there were significant differences in the instruction stream between 10.11.1 and 10.11.2 so I just settled for the instruction(s) directly before the CMP.

 

I thought I had the 10.11.2 patch working yesterday but I just tried it again and I'm still seeing a panic, will see if I can make that work.  Definitely works for 10.11 and 10.11.1 though.

  • Like 1
Link to comment
Share on other sites

 

First of all I like to thank all contributors of creating the clover bootloader for this fantastic master peace of software.

 

I was reading the clover instructions written by Slice to do a combination of FakeID together with Kext To Patch.

The situation. I have an Intel Nic which is working with the FakeID LAN option but I need to strip off this section in the info.plist 

<key>IOPCISecondaryMatch</key>
<string>0x00008086 0x00000000</string>
of kext IONetworkingFamily\Plugins\Intel82574L.kext to get FakeID working.
I was wondering if its possible to patch this kext on the fly and how to do it. I also read that you need to do Text to hex to coded text but i don't have a clue how to do this and which conversation tools are needed.
At this moment this kext is the only kext which needs modification every time osx gets updated.
 
Any help really appreciated!

 

 

Just rename the key name to something random with the same length

  • Like 2
Link to comment
Share on other sites

I have a Asus x99 Deluxe + 5820K with a GTX 970. I am trying to change the resolution of the bootloader GUI but no luck. Any idea?

When the bootloader load Yosemite the screen goes black, I have to disconnect and connect the monitor to get a video signal, any fix?

Link to comment
Share on other sites

Just rename the key name to something random with the same length

 

Thank you for your tip but it's not working. This is the clover config section I use.

<dict>
  <key>Name</key>
  <string>Intel82574L</string>
  <key>Comment</key>
  <string>Patch_to_remove_IOPCISecondaryMatch</string>
  <key>InfoPlistPatch</key>
  <true/>
  <key>Find</key>
  <string>IOPCISecondaryMatch</string>
  <key>Replace</key>
  <string>Replacetext12345678</string>
</dict>

Is this correct ?

Link to comment
Share on other sites

You can write a DXE driver to load and launch it from a Firmware Volume. Good luck with porting Clover's file loading to the Firmware Volume File System though. ;)

 

Well that worked like a charm. Was wondering though how do you correct checksums after the ffs file is created? Sonix on Winraid was able to optimise the ffs driver and give it a volume name. I would like to know how to do the same?

 

Thanks.

Link to comment
Share on other sites

Thank you for your tip but it's not working. This is the clover config section I use.

<dict>
  <key>Name</key>
  <string>Intel82574L</string>
  <key>Comment</key>
  <string>Patch_to_remove_IOPCISecondaryMatch</string>
  <key>InfoPlistPatch</key>
  <true/>
  <key>Find</key>
  <string>IOPCISecondaryMatch</string>
  <key>Replace</key>
  <string>Replacetext12345678</string>
</dict>

Is this correct ?

Good trick!

Link to comment
Share on other sites

Good trick!

Slice thanks for the compliment ;-) however its not working. If I manipulate the kext this way manual and try it to load with kextload / unload its working but it is not patched in advance when clover loads. It's not a big deal however sorting this out enables me to make installers etc which have network working while installing OSX.

Link to comment
Share on other sites

The kext will not be patched if it is not loaded. But it is not loaded until it is patched. This is the contradiction.

You may force load the kext while I am not sure if it helps.

Or better first install the system and after that patch the kext. Yes, you will not have network during installation. Do you really need this? This is a hackintosh anyway!

  • Like 1
Link to comment
Share on other sites

hello clover team

i confim to not load kext 10.11 folder in 10.11.2

 

clover load kexts in other folder

 

maybe clover cant recognize 10.11 version in 10.11.2

 

i use latest clover r3330. i'm sorry my english. thanks in advance

 

 

3:653  0:001  MSR 0x1B0   set to        00000000

3:653  0:000    Force kext: System\Library\Extensions\IONetworkingFamily.kext
3:681  0:028      Force PlugIn kext: System\Library\Extensions\IONetworkingFamily.kext\Contents\PlugIns\AppleBCM5701Ethernet.kext
3:719  0:037      Force PlugIn kext: System\Library\Extensions\IONetworkingFamily.kext\Contents\PlugIns\AppleIntel8254XEthernet.kext
3:743  0:024      Force PlugIn kext: System\Library\Extensions\IONetworkingFamily.kext\Contents\PlugIns\AppleIntelI210Ethernet.kext
3:773  0:029      Force PlugIn kext: System\Library\Extensions\IONetworkingFamily.kext\Contents\PlugIns\AppleVmxnet3Ethernet.kext
3:795  0:022      Force PlugIn kext: System\Library\Extensions\IONetworkingFamily.kext\Contents\PlugIns\AppleYukon2.kext
3:829  0:033      Force PlugIn kext: System\Library\Extensions\IONetworkingFamily.kext\Contents\PlugIns\Intel82574L.kext
3:855  0:025      Force PlugIn kext: System\Library\Extensions\IONetworkingFamily.kext\Contents\PlugIns\IOEthernetAVBController.kext
3:876  0:020      Force PlugIn kext: System\Library\Extensions\IONetworkingFamily.kext\Contents\PlugIns\mDNSOffloadUserClient.kext
3:897  0:021      Force PlugIn kext: System\Library\Extensions\IONetworkingFamily.kext\Contents\PlugIns\nvenet.kext
3:923  0:026  Preparing kexts injection for arch=x86_64 from EFI\CLOVER\kexts\Other
3:924  0:000    Extra kext: EFI\CLOVER\kexts\Other\ACPIBatteryManager.kext
3:929  0:005    Extra kext: EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext
3:933  0:003      Extra PlugIn kext: EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext\Contents\PlugIns\VoodooPS2Keyboard.kext
3:938  0:005      Extra PlugIn kext: EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext\Contents\PlugIns\VoodooPS2Mouse.kext
3:941  0:002      Extra PlugIn kext: EFI\CLOVER\kexts\Other\VoodooPS2Controller.kext\Contents\PlugIns\VoodooPS2Trackpad.kext
Link to comment
Share on other sites

The kext will not be patched if it is not loaded. But it is not loaded until it is patched. This is the contradiction.

You may force load the kext while I am not sure if it helps.

Or better first install the system and after that patch the kext. Yes, you will not have network during installation. Do you really need this? This is a hackintosh anyway!

Lol indeed I understand it now. Sure it's a Hackintosh but using clover in between makes the difference smaller between a hack and a real mac seen from the OSX side.

Solving patches done by Clover will simplify every installation.

 

Last question how do I accomplish to force that kext to load ? I will post the results of that back.

Link to comment
Share on other sites

Lol indeed I understand it now. Sure it's a Hackintosh but using clover in between makes the difference smaller between a hack and a real mac seen from the OSX side.

Solving patches done by Clover will simplify every installation.

 

Last question how do I accomplish to force that kext to load ? I will post the results of that back.

Something like this:

	<key>KernelAndKextPatches</key>
	<dict>
		<key>ForceKextsToLoad</key>
		<array>
			<string>IONetworkingFamily</string>
			<string>AMDFramebuffer</string>
			<string>IOAudioFamily</string>
		</array>

But sorry, this is not my invention.

  • Like 2
Link to comment
Share on other sites

I think you need to provide the full identifier, so, e.g. with "com.apple.'-prefix. Should find it in the kext's Info.plist

 

EDIT: @davidm71 post #363: "After having done several tests with my ASUS P8Z68-V system, I found out, that the other 3 NVMe modules named Nvme, NvmeSmm and NvmeInt13, which I am currently still offering within the start post, are maybe not even required!". That's what I have said from the very beginning. ;)

post #366: "Some minor hex code incompatibilities have been corrected." What are "hex code incompatibilities"? Would be nice if he shared what he did. Otherwise might just need to compare the files, but I don't have the nerves right now.

Link to comment
Share on other sites

I think you need to provide the full identifier, so, e.g. with "com.apple.'-prefix. Should find it in the kext's Info.plist

 

EDIT: @davidm71 post #363: "After having done several tests with my ASUS P8Z68-V system, I found out, that the other 3 NVMe modules named Nvme, NvmeSmm and NvmeInt13, which I am currently still offering within the start post, are maybe not even required!". That's what I have said from the very beginning. ;)

post #366: "Some minor hex code incompatibilities have been corrected." What are "hex code incompatibilities"? Would be nice if he shared what he did. Otherwise might just need to compare the files, but I don't have the nerves right now.

 

 

No harm leaving those three files I wonder except maybe eating memory. I'll get rid of them in my next bios edit. Anyhow the guy that optimized the file isn't sharing how he did it. I asked him nice and I'm very curious how he did it.

 

Thanks.

Link to comment
Share on other sites

Something like this:

	<key>KernelAndKextPatches</key>
	<dict>
		<key>ForceKextsToLoad</key>
		<array>
			<string>IONetworkingFamily</string>
			<string>AMDFramebuffer</string>
			<string>IOAudioFamily</string>
		</array>

But sorry, this is not my invention.

This wasn't working either.

 

I solved it by using a much easier trick. 

I made an Ubuntu Live USB boot stick. Booted from that and used the ethtool which enables eeprom reprogramming.

Ifconfig gives the interface name and that name is different from most examples you see on the internet. The interface was called "enp2s0"instead of "eth0"

I wrote new values for SubSYSID's

sudo ethtool -E enp2s0 magic 0x10d38086 offset 0x16 value 0x00
sudo ethtool -E enp2s0 magic 0x10d38086 offset 0x17 value 0x00
sudo ethtool -E enp2s0 magic 0x10d38086 offset 0x18 value 0x86
sudo ethtool -E enp2s0 magic 0x10d38086 offset 0x19 value 0x80

This will match values for IOPCISecondaryMatch values in Intel82574L.kext so now together with FakeID -> LAN = 0x10f68086 the kext is loaded.

You can even decide to change devid of your Hack Card to match a real mac card but I decided to leave it this way. I found the trick partly in this topic.

So now evertime I install a new hack i don't have to worry about en0 witch is not there during installation etc.

  • Like 1
Link to comment
Share on other sites

hello clover team

i confim to not load kext 10.11 folder in 10.11.2

 

clover load kexts in other folder

 

maybe clover cant recognize 10.11 version in 10.11.2

 

i use latest clover r3330. i'm sorry my english. thanks in advance

No problem here,, it still load from 10.11  :thumbsup_anim: 

Same as you,, i use Clover R3330

Link to comment
Share on other sites

I'm sure somebody out there has run into the same problem as me, so here goes....

Clover is working 99.8% perfectly except for when I try to boot Linux off of it. When I reach the GRUB menu I can't use my mouse or keyboard (which are Logitech wireless/USB). DOES ANYBODY KNOW HOW TO FIX THIS??? Mouse/Keyboard work fine on Clover, after booting into MAC, after booting into Windows 10, after booting into Linux. It's just selecting something on the GRUB screen is my problem.

If anybody can help... THAT WOULD BE GREAT AND APPRECIATED!!!

Link to comment
Share on other sites

×
×
  • Create New...