Jump to content

Clover General discussion


ErmaC
29,818 posts in this topic

Recommended Posts

It is not Clover related. I know that bus speed can't be >=400 since first hackintosh with chameleon.

thank you slice,it will be clover related,i know p45 q9650 bus speed can be = 400.

I am try to let GA-H61M-DS2 i3-3240, Radeon HD6850, ALC887(by VoodooHDA) with Razer Cynosa and Deathadder work together with Clover.can you give me suggest?

Link to comment
Share on other sites

We can use SMM for such purpose

Just a dream far-far away.

 

 

thank you slice,it will be clover related,i know p45 q9650 bus speed can be = 400.

I am try to let GA-H61M-DS2 i3-3240, Radeon HD6850, ALC887(by VoodooHDA) with Razer Cynosa and Deathadder work together with Clover.can you give me suggest?

Suggest about what? My comp #1 is very similar and works with Clover defaults.

  • Like 1
Link to comment
Share on other sites

 

Hello Slice,

 

you proposed to write the "nvram.plist" into the EFI partition of the boot volume, since It is not encrypted with filevault2.

At least for the legacy clover with the change of the function "findFirstAppleBootDevice" from the file "rc.shutdown.d/80.save_nvram_plist.local" the content of the nvram will be saved to the EFI partition of the boot device (core storage):

function findFirstAppleBootDevice {
    local rootDevice=$(LC_ALL=C diskutil info /|awk '{ if ($1 == "Device" && $2 == "Node:") {print $3}}')
    recoveryDisk=$(LC_ALL=C diskutil info /|awk '{ if ($1 == "Recovery" && $2 == "Disk:") {print $3}}')
    device=$(LC_ALL=C diskutil info $recoveryDisk|awk '{ if ($1 == "Part" && $2 == "of" && $3 == "Whole:") {print $4}}')
        # Find EFI partition signature
        index=$(LC_ALL=C /usr/sbin/gpt -r show "$device" 2>/dev/null | \
         awk 'toupper($7) == "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" {print $3; exit}')
        if [[ ! $index =~ ^[0-9]+$ ]];then
            index=
        fi
    # If index found return the device and partition (like diskXsY)
    [[ -n "$index" ]] && echo "${device##*/}s$index"
}

Cheers,

Smolderas

 

 

Edit:

Here is the diff:

41,44c41,44
<     local devices=$(LC_ALL=C ls /dev/disk* | sed -n '/\/dev\/disk[0-9]*$/p')
<     # Iterate over all devices
<     for device in $devices; do
<         # Find first partition with Apple Boot partition signature
---
>     local rootDevice=$(LC_ALL=C diskutil info /|awk '{ if ($1 == "Device" && $2 == "Node:") {print $3}}') 
>     recoveryDisk=$(LC_ALL=C diskutil info /|awk '{ if ($1 == "Recovery" && $2 == "Disk:") {print $3}}')
>     device=$(LC_ALL=C diskutil info $recoveryDisk|awk '{ if ($1 == "Part" && $2 == "of" && $3 == "Whole:") {print $4}}')
>         # Find EFI partition signature
46,49c46,47
<          awk 'toupper($7) == "426F6F74-0000-11AA-AA11-00306543ECAC" {print $3; exit}')
<         if [[ $index =~ ^[0-9]+$ ]];then
<             break
<         else
---
>          awk 'toupper($7) == "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" {print $3; exit}')
>         if [[ ! $index =~ ^[0-9]+$ ]];then
52d49
<     done

EDIT: After a bit of debugging I found that the new findFirstAppleBootDevice function does not return anything on my system when shutting down (I even tried extending diskutil to it's full path).

 

I tried to implement an extension to this commit, allowing us to choose if the nvram.plist should be saved to EFI or macOS partition, but I'm having some problems with it not saving to EFI.

 

When I run it manually:

cd /etc/rc.shutdown.d
sudo ./80.save_nvram_plist.local

I works fine and saves to the EFI partition, but when I shut down, it will still save it to the macOS partition.

 

Here are the lines I added (I did add the nvram variable Clover.SaveNVRAMToEFI=Yes):

# Should we save to EFI?
SaveToEFI=$(GetNVRamKey 'Clover.SaveNVRAMToEFI')

if [[ ! "$NVRAMDevice" =~ ^disk[0-9]*s[0-9]*$ ]] || [[ "$SaveToEFI" == Yes ]]; then

Diff here:

145c145,148
<     if [[ ! "$NVRAMDevice" =~ ^disk[0-9]*s[0-9]*$ ]]; then
---
>     # Should we save to EFI?
>     SaveToEFI=$(GetNVRamKey 'Clover.SaveNVRAMToEFI')
>
>     if [[ ! "$NVRAMDevice" =~ ^disk[0-9]*s[0-9]*$ ]] || [[ "$SaveToEFI" == Yes ]]; then

Anyone have any idea about why it correctly saves to EFI partition when run manually, but saves to macOS partition when I shut down?

Link to comment
Share on other sites

I'm having an issue with C3 Latency settings on an older Bloomfield CPU (i7 950). I set the C3 Latency to 0x3E8 and speed step started working, which at first was great. Unfortunately my CPU temps started rising, all cores running over 90. I then tried 0x3E9 (speed step off) and also tried just deleting all the SSDT settings in the Clover config.plist, but speed step is still on and my CPU is still running super hot. I also tried 0x00FA, didn't help the situation.

 

Prior to this I was getting simply the 12x and 24x multipliers and temps around 60.

 

Beyond those settings I'm not sure how to switch it back off.

Link to comment
Share on other sites

EDIT: After a bit of debugging I found that the new findFirstAppleBootDevice function does not return anything on my system when shutting down (I even tried extending diskutil to it's full path).

 

I tried to implement an extension to this commit, allowing us to choose if the nvram.plist should be saved to EFI or macOS partition, but I'm having some problems with it not saving to EFI.

 

When I run it manually:

cd /etc/rc.shutdown.d
sudo ./80.save_nvram_plist.local

I works fine and saves to the EFI partition, but when I shut down, it will still save it to the macOS partition.

 

Here are the lines I added (I did add the nvram variable Clover.SaveNVRAMToEFI=Yes):

# Should we save to EFI?
SaveToEFI=$(GetNVRamKey 'Clover.SaveNVRAMToEFI')

if [[ ! "$NVRAMDevice" =~ ^disk[0-9]*s[0-9]*$ ]] || [[ "$SaveToEFI" == Yes ]]; then

Diff here:

145c145,148
<     if [[ ! "$NVRAMDevice" =~ ^disk[0-9]*s[0-9]*$ ]]; then
---
>     # Should we save to EFI?
>     SaveToEFI=$(GetNVRamKey 'Clover.SaveNVRAMToEFI')
>
>     if [[ ! "$NVRAMDevice" =~ ^disk[0-9]*s[0-9]*$ ]] || [[ "$SaveToEFI" == Yes ]]; then

Anyone have any idea about why it correctly saves to EFI partition when run manually, but saves to macOS partition when I shut down?

I'm more than happy to help you debug that issue. Let me get back to you tomorrow evening...

 

 

Edit:

Current/old version of the script writes to first available partition, be it a HFS, FAT (EFI) or even Apple Boot OSX partition. So in your case I would go through every partition by mounting them (sudo mount -t {msdos,hfs}* /dev/disk**   *respectively) and remove the nvram.plist from root of that partition. After that run the script manually, it would save the nvram.plist to the efi partition of the boot volume and after every restart, it will use that partition.

Link to comment
Share on other sites

I'm more than happy to help you debug that issue. Let me get back to you tomorrow evening...

 

 

Edit:

Current/old version of the script writes to first available partition, be it a HFS, FAT (EFI) or even Apple Boot OSX partition. So in your case I would go through every partition by mounting them (sudo mount -t {msdos,hfs}* /dev/disk**   *respectively) and remove the nvram.plist from root of that partition. After that run the script manually, it would save the nvram.plist to the efi partition of the boot volume and after every restart, it will use that partition.

I'm starting to think that I may be editing the wrong script.

 

I'm editing the script in "/etc/rc.shutdown.d/80.save_nvram_plist.local"

 

As I tried doing this (Hardcoding disk0s1 if SaveToEFI is set):

function findFirstAppleBootDevice {
	if [[ $SaveToEFI == Yes ]]; then
		device=disk0
		index=1
	else
	    local devices=$(LC_ALL=C ls /dev/disk* | sed -n '/\/dev\/disk[0-9]*$/p')
	    # Iterate over all devices
	    for device in $devices; do
	        # Find first partition with Apple Boot partition signature
	        index=$(LC_ALL=C /usr/sbin/gpt -r show "$device" 2>/dev/null | \
	         awk 'toupper($7) == "426F6F74-0000-11AA-AA11-00306543ECAC" {print $3; exit}')
	        if [[ $index =~ ^[0-9]+$ ]];then
	            break
	        else
	            index=
	        fi
	    done
	fi
    # If index found return the device and partition (like diskXsY)
    [[ -n "$index" ]] && echo "${device##*/}s$index"
}

And added SaveToEFI as a global variable to the script.

 

This also works, when running it manually, but when shutting down, it still saves to disk0s2 (macOS partition).

 

EDIT: After a lot of debugging, I found that macOS does not like to put the nvram.plist into EFI unless it is mounted before shutdown. (It does not mount it correctly if mounting is done by the script while the system is shutting down).

 

This works (but is a bit ugly):

 

in 80.save_nvram_plist.local (diff):

< NVRAMMountPoint=/tmp/NVRAM
29a29,35
> # Should we save nvram to EFI partition?
> SaveToEFI=$(GetNVRamKey 'Clover.SaveNVRAMToEFI')
> if [[ $SaveToEFI == Yes ]]; then
> 	NVRAMMountPoint=/Volumes/EFI
> else
> 	NVRAMMountPoint=/tmp/NVRAM
> fi
108c114,118
<     local mntpt=$(mountNVRAMDisk "$device" "$NVRAMMountPoint")
---
>     if [[ $SaveToEFI == Yes ]]; then
>     	local mntpt=$NVRAMMountPoint
>     else
>     	local mntpt=$(mountNVRAMDisk "$device" "$NVRAMMountPoint")
>     fi
145c155
<     if [[ ! "$NVRAMDevice" =~ ^disk[0-9]*s[0-9]*$ ]]; then
---
>     if [[ ! "$NVRAMDevice" =~ ^disk[0-9]*s[0-9]*$ || $SaveToEFI == Yes ]]; then

in 20.mount_ESP.local (diff):

> SaveToEFI=$(GetNVRamKey 'Clover.SaveNVRAMToEFI')
> if [[ $SaveToEFI == Yes ]]; then
>     mountEFIValue='Yes'
> fi
Link to comment
Share on other sites

hello @Slice

 

i added macbook, macbookpro, macbookair, macmini about missing info in platformdata.c

 

complete list

AppleFirmwareVersion

AppleBoardID

AppleReleaseDate

AppleProductName

AppleFamilies

AppleSystemVersion

AppleSerialNumber

AppleChassisAsset

SmcRevision

 

not complete list

SmcPlatform

SmcConfig

 

 

- i dont know exactly value. especially SmcRevision, SmcConfig

 

 

- i dont know SetDMISettingsForModel’s code properly works each models

 

i made data from google search, everymac, ebay, geekbench browser

 

thanks in advance

platformdata.c.zip

Link to comment
Share on other sites

hello @Slice

 

i added macbook, macbookpro, macbookair, macmini about missing info in platformdata.c

 

complete list

AppleFirmwareVersion

AppleBoardID

AppleReleaseDate

AppleProductName

AppleFamilies

AppleSystemVersion

AppleSerialNumber

AppleChassisAsset

 

not complete list

SmcPlatform

SmcRevision

SmcConfig

 

 

- i dont know exactly value. especially SmcRevision, SmcConfig

 

 

- i dont know SetDMISettingsForModel’s code properly works each models

 

i made data from google search, everymac, ebay, geekbench browser

 

thanks in advance

 

completed SmcRevision

 

UINT8 SmcRevision[][6] =

{
  { 0x01, 0x04, 0x0F, 0, 0, 0x12 },   // MacBook1,1,
  { 0x01, 0x13, 0x0F, 0, 0, 0x03 },   // MacBook2,1,
  { 0x01, 0x31, 0x0F, 0, 0, 0x01 },   // MacBook4,1,
  { 0x01, 0x32, 0x0F, 0, 0, 0x08 },   // MacBook5,2,
  { 0x01, 0x51, 0x0F, 0, 0, 0x53 },   // MacBook6,1,
  { 0x01, 0x60, 0x0F, 0, 0, 0x06 },   // MacBook7,1,
  { 0x02, 0x25, 0x0F, 0, 0, 0x87 },   // MacBook8,1,
  { 0x02, 0x35, 0x0F, 0, 1, 0x01 },   // MacBook9,1,
  { 0x01, 0x33, 0x0F, 0, 0, 0x08 },   // MacBookPro5,1,
  { 0x01, 0x58, 0x0F, 0, 0, 0x17 },   // MacBookPro6,2,
  { 0x01, 0x68, 0x0F, 0, 0, 0x99 },   // MacBookPro8,1,
  { 0x01, 0x70, 0x0F, 0, 0, 0x05 },   // MacBookPro8,3,
  { 0x02, 0x02, 0x0F, 0, 0, 0x44 },   // MacBookPro9,2,  2.03f36 for 10,1
  { 0x02, 0x03, 0x0F, 0, 0, 0x36 },   // MacBookPro10,1,
  { 0x02, 0x16, 0x0F, 0, 0, 0x58 },   // MacBookPro11,1,
  { 0x02, 0x28, 0x0F, 0, 0, 0x07 },   // MacBookPro12,1,
  { 0x02, 0x36, 0x0F, 0, 0, 0x93 },   // MacBookPro13,1
  { 0x01, 0x67, 0x0F, 0, 0, 0x10 },   // MacBookAir3,1,
  { 0x02, 0x05, 0x0F, 0, 0, 0x09 },   // MacBookAir5,2,
  { 0x02, 0x13, 0x0F, 0, 0, 0x09 },   // MacBookAir6,2,
  { 0x02, 0x27, 0x0F, 0, 0, 0x02 },   // MacBookAir7,1,
  { 0x01, 0x19, 0x0F, 0, 0, 0x02 },   // Macmini2,1,
  { 0x01, 0x30, 0x0F, 0, 0, 0x03 },   // Macmini5,1,
  { 0x02, 0x08, 0x0F, 0, 0, 0x00 },   // Macmini6,2,
  { 0x02, 0x24, 0x0F, 0, 0, 0x32 },   // Macmini7,1,
  { 0x01, 0x30, 0x0F, 0, 0, 0x01 },   // iMac8,1,
  { 0x01, 0x53, 0x0F, 0, 0, 0x13 },   // iMac10,1,
  { 0x01, 0x54, 0x0F, 0, 0, 0x36 },   // iMac11,1,
  { 0x01, 0x64, 0x0F, 0, 0, 0x05 },   // iMac11,2,
  { 0x01, 0x59, 0x0F, 0, 0, 0x02 },   // iMac11,3,
  { 0x01, 0x71, 0x0F, 0, 0, 0x22 },   // iMac12,1,
  { 0x01, 0x72, 0x0F, 0, 0, 0x02 },   // iMac12,2,
  { 0x02, 0x11, 0x0F, 0, 0, 0x14 },   // iMac13,1,
  { 0x02, 0x11, 0x0F, 0, 0, 0x14 },   // iMac13,2
  { 0x02, 0x14, 0x0F, 0, 0, 0x19 },   // iMac14,1
  { 0x02, 0x15, 0x0F, 0, 0, 0x07 },   // iMac14,2
  { 0x02, 0x22, 0x0F, 0, 0, 0x16 },   // iMac15,1
  { 0x02, 0x33, 0x0F, 0, 0, 0x10 },   // iMac17,1
  { 0x01, 0x30, 0x0F, 0, 0, 0x03 },   // MacPro3,1,
  { 0x01, 0x39, 0x0F, 0, 0, 0x05 },   // MacPro4,1,
  { 0x01, 0x39, 0x0F, 0, 0, 0x11 },   // MacPro5,1
  { 0x02, 0x20, 0x0F, 0, 0, 0x18 },   // MacPro6,1 :2.20f18
};

 

 

MacBook9,1 shown 2.35f101

i'm not sure this "  { 0x02, 0x35, 0x0F, 0, 1, 0x01 },   // MacBook9,1,"

 

not complete list

SmcPlatform

SmcConfig

 

@Slice, where can i find smcplatform data and smcconfig? if you give me tips, i will try

 

thanks

Link to comment
Share on other sites

SmcConfig is EPCI key in reverse order (LittleEndian)

EPCI  [ui32]  0 (bytes 04 f0 07 00)  => 0x7f004

 

SmcPlatform is RPlt key in string from

RPlt  [ch8*]  (bytes 6b 37 34 00 00 00 00 00)   => "k74"

Link to comment
Share on other sites

SmcConfig is EPCI key in reverse order (LittleEndian)

EPCI  [ui32]  0 (bytes 04 f0 07 00)  => 0x7f004

 

SmcPlatform is RPlt key in string from

RPlt  [ch8*]  (bytes 6b 37 34 00 00 00 00 00)   => "k74"

 

really thanks :)

 

here is final platformdata.c. i did clean up and i express value that i can't get EPCI and RPlt. if i get it in the future, i will report you

 

thanks in advance. have a nice day

platformdata-Final.zip

  • Like 2
Link to comment
Share on other sites

really thanks :)

 

here is final platformdata.c. i did clean up and i express value that i can't get EPCI and RPlt. if i get it in the future, i will report you

 

thanks in advance. have a nice day

Thank you for all data and for cosmetics as well!

Link to comment
Share on other sites

Hi Slice.

I just changed something minor in kext_inject.c to avoid confusions. And could you check it for further confirmations? Thanks.  :)

Here it is:

https://drive.google.com/open?id=0B9CSJfhMgxfWaE5CMWNneGZrcVk

 

BTW, I'm new here and how to upload attachments? Thanks in advance. :-)

 

PMheart

First "More reply options"

Screen Shot 2016-11-23 at 16.22.21.png

Then "Choose file", "Attach", "Add to post"

Screen Shot 2016-11-23 at 16.22.32.png

Link to comment
Share on other sites

@Slice

 

i finished more update platformdata.c and clean up, i will update platformdata.c if i get it about missing data

 

contain all macpro, all macbook, all macbookpro(from 1.1 to 13,3 15inch touchbar), macmini, imac(since 8,1)

 

i tested clover build(base 3943), good working:)

 

i spent many time for this. but i'm really happy to help clover team.

 

i hope that my nickname Sherlocks, but shown sherlocks in menu.c, can you change like Sherlocks?

 

 

have a nice day :)

post-980913-0-42919100-1479907516_thumb.png

r3943 platformdata update.zip

  • Like 2
Link to comment
Share on other sites

OK  :wink_anim:


Hi Slice.

I just changed something minor in kext_inject.c to avoid confusions. And could you check it for further confirmations? Thanks.  :)

Here it is:

https://drive.google.com/open?id=0B9CSJfhMgxfWaE5CMWNneGZrcVk

 

BTW, I'm new here and how to upload attachments? Thanks in advance. :-)

 

PMheart

Thanks,

your patch I also committed. Hope it will be helpful for next macOS releases.

  • Like 2
Link to comment
Share on other sites

So why with the lastest installer of clover it only allows you to install it to the booted drive and not any other?

I wanted to update clover on the cloned drive. It is partitioned the same as my boot drive.

post-67982-0-97076100-1479918077_thumb.jpg

/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         512.1 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS OS X                    511.1 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:                  Apple_HFS Clone                   499.1 GB   disk1s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk1s3

It has always worked before.

Link to comment
Share on other sites

I replaced my FakeSMC info.plist with an unedited one to see.

 

It displays the default (wrong) SMC version in System Profiler (and IOReg), but bdmesg shows the correct SMC version is being injected.

 

nthyLa4.jpg

What is your FakeSMC? It means Slice version or HWSensor.

 

I use Slice version. I unedit smc rev.

Correctly shown smc version from clover bootloader. Clover override rev value on my laptop

 

here is

post-980913-0-79053000-1479923816_thumb.png

 

 

나의 LG-F410S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

×
×
  • Create New...