Jump to content
30960 posts in this topic

Recommended Posts

Thank you @Slice for your time on this issue, appreciate it.

 

Inside the binary of CLOVERX64.efi this DisabledAML exists as reference.

 

I promise you it has been there in older versions of Clover because I had checked each tag. Anyway please see a reference found:

https://githubmemory.com/repo/LeeBinder/Asus-Vivobook-S510UA-Hackintosh/issues/1

 

Do you not confirm it in the Clover code-base? In any case, I removed it from the config for testing and the error is the same.

Thanks

Edited by MacKonsti
1 hour ago, MacKonsti said:

Thank you @Slice for your time on this issue, appreciate it.

 

Inside the binary of CLOVERX64.efi this DisabledAML exists as reference.

 

I promise you it has been there in older versions of Clover because I had checked each tag. Anyway please see a reference found:

https://githubmemory.com/repo/LeeBinder/Asus-Vivobook-S510UA-Hackintosh/issues/1

 

Do you not confirm it in the Clover code-base? In any case, I removed it from the config for testing and the error is the same.

Thanks

Yes the key is present. I just don't know who invented it. And I see no reason for "Tag :4... bla-bla...". Waiting for @Jief_Machak. May be he can explain.

 

On 11/6/2021 at 12:48 AM, Zenith432 said:

 

 

BTW: Is there a way to set the Boot->Debug configuration option via the Clover GUI instead of config.sys?

No, the debug should work before Clover GUI will run.

You may start Clover GUI, call Shell.efi and edit config.plist. Then return to Clover and reboot "R".

 

$ fs0:

$ cd efi\clover

$ edit config.plist

F4 (find "Boot")

F3 (save and exit)

$ exit

  • Like 2
  • Thanks 1
6 hours ago, MacKonsti said:

 

 

What is ":4" representing here, the 4th setting tag in the config.plist ? A structure? The 4th tag in my Config is <key>FixHeaders</key> under section <key>Fixes</key>
Is this FixHeaders finally inside "Fixes" or just under "ACPI" ?

Thanks for your feedback.

config-removed-serials.plist 11.25 kB · 9 downloads

Yes, FixHeaders must be under ACPI and not inside Fixes.

  • Like 2

Feature request:

now that Clover is on OC 0.7.4 or greater, can you implement ForceOcWriteFlash quirk as a config variable?

I see WriteFlash is hardcoded (which is ok i guess)

$ grep WriteFlash ./rEFIt_UEFI/refit/main.cpp

    mOpenCoreConfiguration.Nvram.WriteFlash = true;

 

But I also need Uefi.Quirks.ForceOcWriteFlash (=true)
in Library/OcVariable/OcVariableLib.c

I tested by overriding (ie set to True)
 

  IN BOOLEAN  ForceOcWriteFlash
  )
{
  // mForceOcWriteFlash = ForceOcWriteFlash;
  mForceOcWriteFlash = TRUE;

  DEBUG_CODE_BEGIN ();
  mDebugInitialized = TRUE;
 

----

  1. ForceOcWriteFlash
    Type: plist boolean
    Failsafe: false
    Description: Enables writing to flash memory for all OpenCore-managed NVRAM system variables.

    Note: This value should be disabled on most types of firmware but is left configurable to account for firmware that may have issues with volatile variable storage overflows or similar. Boot issues across multiple OSes can be observed on e.g. Lenovo Thinkpad T430 and T530 without this quirk. Apple variables related to Secure Boot and hibernation are exempt from this for security reasons. Furthermore, some OpenCore variables are exempt for different reasons, such as the boot log due to an available user option, and the TSC frequency due to timing issues. When toggling this option, a NVRAM reset may be required to ensure full functionality.

 

Edited by tluck
  • Like 4
  • Thanks 1
19 hours ago, tluck said:

Feature request:

now that Clover is on OC 0.7.4 or greater, can you implement ForceOcWriteFlash quirk as a config variable?

I see WriteFlash is hardcoded (which is ok i guess)

$ grep WriteFlash ./rEFIt_UEFI/refit/main.cpp

    mOpenCoreConfiguration.Nvram.WriteFlash = true;

 

But I also need Uefi.Quirks.ForceOcWriteFlash (=true)
in Library/OcVariable/OcVariableLib.c

I tested by overriding (ie set to True)
 

  IN BOOLEAN  ForceOcWriteFlash
  )
{
  // mForceOcWriteFlash = ForceOcWriteFlash;
  mForceOcWriteFlash = TRUE;

  DEBUG_CODE_BEGIN ();
  mDebugInitialized = TRUE;
 

----

  1. ForceOcWriteFlash
    Type: plist boolean
    Failsafe: false
    Description: Enables writing to flash memory for all OpenCore-managed NVRAM system variables.

    Note: This value should be disabled on most types of firmware but is left configurable to account for firmware that may have issues with volatile variable storage overflows or similar. Boot issues across multiple OSes can be observed on e.g. Lenovo Thinkpad T430 and T530 without this quirk. Apple variables related to Secure Boot and hibernation are exempt from this for security reasons. Furthermore, some OpenCore variables are exempt for different reasons, such as the boot log due to an available user option, and the TSC frequency due to timing issues. When toggling this option, a NVRAM reset may be required to ensure full functionality.

 

Test, please. Commit 1ba1ba6d6

  • Like 4
2 hours ago, Slice said:

Test, please. Commit 1ba1ba6d6

worked. thank you sir! 

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

DATE: 2021-11-11 TIME: 14:21:49

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

0:100  0:100  MemLog inited, TSC freq: 2491902397

0:100  0:000  CPU was calibrated with ACPI PM Timer

0:100  0:000  CloverX64 : Image base = 0xD6DE8000

0:100  0:000  Clover ImageHandle = d8157c18

0:107  0:007  === [ Starting Clover ] =========================

0:107  0:000  Now is 11.11.2021,  22:21:27 (GMT)

0:107  0:000  Starting Clover revision: 5142 (master, commit 1ba1ba6d6) on Lenovo EFI

0:107  0:000  Build id: 20211111215828-1ba1ba6

0:107  0:000  Build with: [Args: -D NO_GRUB_DRIVERS_EMBEDDED -D USE_APPLE_HFSPLUS_DRIVER -t XCODE8 | --cmd-len=50000 -D NO_GRUB_DRIVERS_EMBEDDED -D USE_APPLE_HFSPLUS_DRIVER -D USE_LOW_EBDA -a X64 -b RELEASE -t XCODE8 -n 13 | OS: 11.6.1]

  • Like 2
worked. thank you sir! 

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

DATE: 2021-11-11 TIME: 14:21:49

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

0:100  0:100  MemLog inited, TSC freq: 2491902397

0:100  0:000  CPU was calibrated with ACPI PM Timer

0:100  0:000  CloverX64 : Image base = 0xD6DE8000

0:100  0:000  Clover ImageHandle = d8157c18

0:107  0:007  === [ Starting Clover ] =========================

0:107  0:000  Now is 11.11.2021,  22:21:27 (GMT)

0:107  0:000  Starting Clover revision: 5142 (master, commit 1ba1ba6d6) on Lenovo EFI

0:107  0:000  Build id: 20211111215828-1ba1ba6

0:107  0:000  Build with: [Args: -D NO_GRUB_DRIVERS_EMBEDDED -D USE_APPLE_HFSPLUS_DRIVER -t XCODE8 | --cmd-len=50000 -D NO_GRUB_DRIVERS_EMBEDDED -D USE_APPLE_HFSPLUS_DRIVER -D USE_LOW_EBDA -a X64 -b RELEASE -t XCODE8 -n 13 | OS: 11.6.1]

hi tluck, can you saved brightness value when reboot with nvram script?

Sent from my SM-N960N using Tapatalk


  • Like 1
17 hours ago, Sherlocks said:

what is your boot type? UEFI or legacy?
do you have max brightness when booting without nvram script?

 

1) I use UEFI
2) yes backlight level is preserved after reboot.

if set to level 1 (almost dark) it reboots to level 1. Note: level 0 is black.

reboot if set to level 16 (max brightness), it stays at max after reboot.
Note: i use whatevergreen.kext for HD3000 on Catalina for this box.

from the log:
10:924  0:000  AddNvramVariable (backlight-level, guid, 0x7, 2): -> already exists, abort

 

ConfigValidator its a command Line script for verifying config.plist

 

Tools to check the config.plist, always using the latest release of CloverConfigPlistValidator from Jief_Machak.

This is a simple script, no fancy app

Command:

cd ConfigValidator

make

 

How to use it ☞  see video

 

 

Edited by chris1111
  • Like 2
  • Thanks 1
 
1) I use UEFI
2) yes backlight level is preserved after reboot.
if set to level 1 (almost dark) it reboots to level 1. Note: level 0 is black.
reboot if set to level 16 (max brightness), it stays at max after reboot.
Note: i use whatevergreen.kext for HD3000 on Catalina for this box.

from the log:
10:924  0:000  AddNvramVariable (backlight-level, guid, 0x7, 2): -> already exists, abort
 
therefore does your t420 laptop have native nvram support?
my hp 4230 sandybridge laptop support UEFI. but i can't save brightness level after reboot.
i have been used Aptiofix+nvramscript for long time with old clover.

if i want to write nvram, ForceOcWriteFlash that you requested is useful?

Sent from my SM-N960N using Tapatalk


On 11/17/2021 at 1:12 PM, Sherlocks said:

therefore does your t420 laptop have native nvram support?
my hp 4230 sandybridge laptop support UEFI. but i can't save brightness level after reboot.
i have been used Aptiofix+nvramscript for long time with old clover.

if i want to write nvram, ForceOcWriteFlash that you requested is useful?

yes the T420 has native nvram.  (i dont need this driver EmuVariableUefi)
Note: I moved from Aptiofix to OpenRuntime.efi

ForceOcWriteFlash=True (+ WriteFlash=True) was added since an extra attribute was needed to boot on some BIOS
T420 needs OPEN_CORE_NVRAM_NV_ATTR

#define OPEN_CORE_NVRAM_NV_ATTR    (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE)
#define OPEN_CORE_NVRAM_ATTR       (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS)

clover (or OC) is able to write to the nvram - see examples below
 

tluck@Toms-Mac ~
$ nvram -p|sort
Clover.BackupDirOnDestVol	No
Clover.KeepBackupLimit	2
Clover.LogEveryBoot	10
Clover.LogLineCount	2000
Clover.SoundDevice	%02%01%0c%00%d0A%03%0a%00%00%00%00%01%01%06%00%00%1b%03%0a%18%00%eb?%00%a9%06%d8%dbA%a4%91T%05%fe%efF%c3%00%00%00%00%7f%ff%04%00
Clover.SoundIndex	%01
Clover.SoundVolume	F
Clover.Theme	ThinkPad
IONVRAM-SYNCNOW-PROPERTY	IONVRAM-SYNCNOW-PROPERTY
LocationServicesEnabled	%01
SystemAudioVolume	@
SystemAudioVolumeDB	%f6
backlight-level	%0b%07

 

Hello @MifJpnAlphaPlus,

Clover can set a NVRAM variable and then finished giving control to boot.efi. At this moment Clover existed and can't do anything else.

Boot.efi reads the variable and uses it to start macOS.

So Clover has not a time to erase this variable. It is out of control.

Not sure about OpenCore but I imagine the process is exactly the same.

  • Like 1
  • Thanks 1

Clover writes something into NVRAM once per computer start.

MacOS writes something into NVRAM once when shutdown.

If you will use sleep-wake mode 0 cycle then you may increase flash memory life.

Clover is the best bootloader ever existing which provides sleep-wake capabilities.

  • Like 5
On 11/19/2021 at 11:38 AM, Slice said:

Clover is the best bootloader ever existing which provides sleep-wake capabilities.

To me Clover is also the best for booting Windows natively even in Legacy and UEFI

  • Like 3
12 minutes ago, chris1111 said:

To me Clover is also the best for booting Windows natively even in Legacy and UEFI

 

Because Clover doesn't inject ACPI and binary renames system wide into any OS. Definitely a plus when using 2 Systems on one physical disk

 

@AndyYa I think this error appears if BIOS Version and Release Date set in the SMBIOS are identical to what is the default which clover uses. Try to delete these fields from the config and the errors should disappear.

1 hour ago, 5T33Z0 said:

@AndyYa I think this error appears if BIOS Version and Release Date set in the SMBIOS are identical to what is the default which clover uses. Try to delete these fields from the config and the errors should disappear.

These fields are missing in my config files

screenshot3.png

2 hours ago, 5T33Z0 said:

....

@AndyYa I think this error appears if BIOS Version and Release Date set in the SMBIOS are identical to what is the default which clover uses. Try to delete these fields from the config and the errors should disappear.

 

Hi.

 

No this Warning isn't related to Bios Version and Release Date from SMBIOS

Bios Version and Release Date (and Efi Version) Warnings were fixed with commits 07b993b and e036b3d in r5141.

 

 "Warning : 'Tag 4' was already defined. Previous value ignored."  results from ACPI DSDT Fixes check in  rEFIt_UEFI/Settings/ConfigPlist/Config_ACPI_DSDT.cpp lines 31 or 46

        rEFIt_UEFI/Settings/ConfigPlist/Config_ACPI_DSDT.cpp:31:          xmlLiteParser->addWarning(true, S8Printf("Tag '%s:%d' was already defined. Previous value ignored.", xmlPath.c_str(), keyPos.getLine()));
        
rEFIt_UEFI/Settings/ConfigPlist/Config_ACPI_DSDT.cpp:46:          xmlLiteParser->addWarning(true, S8Printf("Tag '%s:%d' was already defined. Previous value ignored.", xmlPath.c_str(), keyPos.getLine()));
 

This Warning is displayed ONLY when you try to change, select another config file than the default one "config.plist".

 

Regards

Spoiler

Settings/ConfigPlist/Config_ACPI_DSDT.cpp:31:          xmlLiteParser->addWarning(true, S8Printf("Tag '%s:%d' was already defined. Previous value ignored.", xmlPath.c_str(), keyPos.getLine()));
Settings/ConfigPlist/Config_ACPI_DSDT.cpp:46:          xmlLiteParser->addWarning(true, S8Printf("Tag '%s:%d' was already defined. Previous value ignored.", xmlPath.c_str(), keyPos.getLine()));

...
begin :  line 15 
XmlAbstractType& ConfigPlistClass::ACPI_Class::DSDT_Class::ACPI_DSDT_Fixes_Class::parseValueFromXmlLite(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, XBool generateErrors, const XmlParserPosition &keyPos, const char *keyValue, size_t keyValueLength, XBool* keyFound)
{
#ifdef JIEF_DEBUG
  if ( strncmp(keyValue, "FixHeaders", strlen("FixHeaders")) == 0 ) {
    NOP;
  }
#endif
    for ( size_t idx = 0 ; idx < sizeof(ACPI_DSDT_Fixe_Array)/sizeof(ACPI_DSDT_Fixe_Array[0]) ; idx++ )
    {
      if ( ACPI_DSDT_Fixe_Array[idx].getNewName() && strnIsEqualIC(keyValue, keyValueLength, ACPI_DSDT_Fixe_Array[idx].getNewName()) ) {
        // new name
        if ( ACPI_DSDT_Fixe_Array[idx].oldEnabled.isDefined() ) {
          xmlLiteParser->addWarning(true, S8Printf("Tag '%s:%d' was already defined with the old name '%s'. Previous value ignored.", xmlPath.c_str(), keyPos.getLine(), ACPI_DSDT_Fixe_Array[idx].m_oldName));
          ACPI_DSDT_Fixe_Array[idx].oldEnabled.reset();
        }
        if ( ACPI_DSDT_Fixe_Array[idx].newEnabled.isDefined() ) {
          xmlLiteParser->addWarning(true, S8Printf("Tag '%s:%d' was already defined. Previous value ignored.", xmlPath.c_str(), keyPos.getLine()));
          ACPI_DSDT_Fixe_Array[idx].newEnabled.reset();
        }
        ACPI_DSDT_Fixe_Array[idx].newEnabled.parseFromXmlLite(xmlLiteParser, xmlPath, true);
        ACPI_DSDT_Fixe_Array[idx].setDefined();
        *keyFound = true;
        return ACPI_DSDT_Fixe_Array[idx].newEnabled;
      }else
      if ( ACPI_DSDT_Fixe_Array[idx].m_oldName && strnIsEqualIC(keyValue, keyValueLength, ACPI_DSDT_Fixe_Array[idx].m_oldName) ) {
        // old name
        if ( ACPI_DSDT_Fixe_Array[idx].newEnabled.isDefined() ) {
          xmlLiteParser->addWarning(true, S8Printf("Tag '%s:%d' was already defined with the new name '%s'. Previous value ignored.", xmlPath.c_str(), keyPos.getLine(), ACPI_DSDT_Fixe_Array[idx].getNewName()));
          ACPI_DSDT_Fixe_Array[idx].newEnabled.reset();
        }
        if ( ACPI_DSDT_Fixe_Array[idx].oldEnabled.isDefined() ) {
          xmlLiteParser->addWarning(true, S8Printf("Tag '%s:%d' was already defined. Previous value ignored.", xmlPath.c_str(), keyPos.getLine()));
          ACPI_DSDT_Fixe_Array[idx].oldEnabled.reset();
        }
        ACPI_DSDT_Fixe_Array[idx].oldEnabled.parseFromXmlLite(xmlLiteParser, xmlPath, true);
        ACPI_DSDT_Fixe_Array[idx].setDefined();
        *keyFound = true;
        return ACPI_DSDT_Fixe_Array[idx].oldEnabled;
      }
    }
    *keyFound = false;
    return nullXmlType;
}
end : line 57
...

 

  • Like 3
9 hours ago, AndyYa said:

I noticed such a bug. If I select another config file in the Clover menu, a debug message appears and the interface freezes for 4 seconds. Then everything returns to normal.  The clover validator does not find any errors in the config file.

Hello, I reported this a few pages ago, I have this tag:4 error whenever I change to another valid configuration. @Slice or @Jief_Machak could provide some deeper insight, as this doesn't seem to be coming from the config.plist itself. Something else is wrong...

3 hours ago, Slice said:

There was initially wrong idea to change config.plist from Clover. I am thinking to disable this possibility.

 

I don't think, it was wrong idea. On the contrary, it is very convenient for users. This tag:4 error is just a warning after all. 😊

  • Like 1
  • Thanks 2
×
×
  • Create New...