RehabMan Posted December 15, 2016 Share Posted December 15, 2016 The Clover install USB flash drive has an EFI partition. If you connect that to your computer, then you technically have two EFI partitions. I think Mac OS X knows how to convert to and from device-paths. At least the bless command has to use device path to save nvram variables "BootCampHD" and "eft-boot-device-data". The source code for bless is at opensource.apple.com "BootCampHD" points to a hard disk device that has MBR with boot code (on Macs that use BIOS MBR boot code to boot Windows instead of UEFI). "eft-boot-device-data" contains a device path for a partition, and maybe a file path for a efi app (although for HFS partitions, the EFI app could be stored in the HFS file system information). Check the contents of those variables using one of: nvram -p ioreg -w 0 -n AppleEFINVRAM | sed -n -E "/^[ \|]+[ ]+(\".*)$/s//\1/p;" They change when you use System Preferences to change the startup disk (click the Show All button of the System Preferences window to save a change. Here's what they look like on my 2008 MacPro: "BootCampHD" = <02010c00d041030a0000000001010600021f03120a000100000000007fff0400> "efi-boot-device-data" = <02010c00d041030a0000000001010600000501010600000003120a0000000000000004012a000200000028400600000000000000c81200000000ab7414e0d6931e44af0d7d8e2b49e78902027fff0400> I don't know what kind of device they point to. Maybe GfxUtil can parse the device-path but I don't think GfxUtil has a full implementation of the EFI_DEVICE_PATH_PROTOCOL. Maybe Clover or another EFI app could use EFI_DEVICE_PATH_TO_TEXT_PROTOCOL to display the device-path. rc.shutdown is executed at SIGTERM by CloverDaemon which is setup using com.projectosx.clover.daemon.plist according to https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html#//apple_ref/doc/uid/10000172i-SW7-BCIEDDBJ Maybe it's possible to find what command is using Disk Arbitration, then decide if the command is necessary, and if so, then see if there's an alternative. If the problem is the mount command, then there probably won't be an alternative. In that case, the daemon needs a different method other than SIGTERM to know when shutdown is occurring. Maybe there's a LaunchEvent that can be used, but I don't know where to get a good list of those events... I don't know if this helps you guys, but the device that Clover was started from is available from the Clover bootlog. The Clover bootlog is available from ioreg. Note: SPEEDY-NUC:~ rehabman$ bdmesg|grep SelfDevicePath 0:100 0:000 SelfDevicePath=PciRoot(0x0)\Pci(0x1D,0x0)\Pci(0x0,0x0)\Sata(0x0,0xFFFF,0x0)\HD(1,GPT,720CCE1B-927B-4261-9ED9-4126654A36CA,0x28,0x64000) @84486018 Link to comment Share on other sites More sharing options...
cnrd Posted December 15, 2016 Share Posted December 15, 2016 The Clover install USB flash drive has an EFI partition. If you connect that to your computer, then you technically have two EFI partitions. I think Mac OS X knows how to convert to and from device-paths. At least the bless command has to use device path to save nvram variables "BootCampHD" and "eft-boot-device-data". The source code for bless is at opensource.apple.com "BootCampHD" points to a hard disk device that has MBR with boot code (on Macs that use BIOS MBR boot code to boot Windows instead of UEFI). "eft-boot-device-data" contains a device path for a partition, and maybe a file path for a efi app (although for HFS partitions, the EFI app could be stored in the HFS file system information). Check the contents of those variables using one of: nvram -p ioreg -w 0 -n AppleEFINVRAM | sed -n -E "/^[ \|]+[ ]+(\".*)$/s//\1/p;" They change when you use System Preferences to change the startup disk (click the Show All button of the System Preferences window to save a change. Here's what they look like on my 2008 MacPro: "BootCampHD" = <02010c00d041030a0000000001010600021f03120a000100000000007fff0400> "efi-boot-device-data" = <02010c00d041030a0000000001010600000501010600000003120a0000000000000004012a000200000028400600000000000000c81200000000ab7414e0d6931e44af0d7d8e2b49e78902027fff0400> I don't know what kind of device they point to. Maybe GfxUtil can parse the device-path but I don't think GfxUtil has a full implementation of the EFI_DEVICE_PATH_PROTOCOL. Maybe Clover or another EFI app could use EFI_DEVICE_PATH_TO_TEXT_PROTOCOL to display the device-path. rc.shutdown is executed at SIGTERM by CloverDaemon which is setup using com.projectosx.clover.daemon.plist according to https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html#//apple_ref/doc/uid/10000172i-SW7-BCIEDDBJ Maybe it's possible to find what command is using Disk Arbitration, then decide if the command is necessary, and if so, then see if there's an alternative. If the problem is the mount command, then there probably won't be an alternative. In that case, the daemon needs a different method other than SIGTERM to know when shutdown is occurring. Maybe there's a LaunchEvent that can be used, but I don't know where to get a good list of those events... I was experimenting with saving to EFI partition about 2 months ago, and I came to the conclusion, that in the current implementation, we also need "Clover.MountEFI=Yes" as the script is unable to mount the EFI partition on shutdown. I have attached my implementation, which uses a new EFI flag: Clover.SaveNVRAMToEFI=Yes, which uses both "20.mount_ESP.local" and "80.save_nvram_plist.local" (Remove .txt extension) I have the feeling that the reason, the scripts are working for you, is that (at least this is my habit) you enable the EFI partition to auto mount on boot while developing. 20.mount_ESP.local.txt 80.save_nvram_plist.local.txt Link to comment Share on other sites More sharing options...
Slice Posted December 16, 2016 Share Posted December 16, 2016 The script save_nvram... should automount ESP if not mounted. I was experimenting with saving to EFI partition about 2 months ago, and I came to the conclusion, that in the current implementation, we also need "Clover.MountEFI=Yes" as the script is unable to mount the EFI partition on shutdown. I have attached my implementation, which uses a new EFI flag: Clover.SaveNVRAMToEFI=Yes, which uses both "20.mount_ESP.local" and "80.save_nvram_plist.local" (Remove .txt extension) I have the feeling that the reason, the scripts are working for you, is that (at least this is my habit) you enable the EFI partition to auto mount on boot while developing. In your script there is particular name NVRAMMountPoint=/Volumes/EFI But it is not the common case. It may be, for example, /Volumes/ESP. slice$ ls /Volumes/ Data ESP Macintosh Win7Pro EFI MacHD QEFI Windows Link to comment Share on other sites More sharing options...
PMheart Posted December 16, 2016 Share Posted December 16, 2016 I checked smbios dump. You can see my reply. Some model has date format difference. We need to follow apple's format. If its not important, Slice is not mention date format to me. It's your choice. 나의 LG-F410S 의 Tapatalk에서 보냄 But actually this affects nothing... I think this can be any text? Not confirmed. Link to comment Share on other sites More sharing options...
arsradu Posted December 16, 2016 Share Posted December 16, 2016 Guys, my computer still wakes up after an hour, even with the RC script for "disable sleep proxy client". It's kind of annoying, cause the PC wakes up, I lose sound when it does that (it doesn't if I wake it up from sleep myself) and it doesn't go to sleep back again. It just cycles there... Any idea how to disable this "feature"? Is it an issue with the implementation/compatibility in 10.12.2 maybe? Using Clover 3961, if that makes a difference. Link to comment Share on other sites More sharing options...
cnrd Posted December 16, 2016 Share Posted December 16, 2016 The script save_nvram... should automount ESP if not mounted. In your script there is particular name NVRAMMountPoint=/Volumes/EFI But it is not the common case. It may be, for example, /Volumes/ESP. slice$ ls /Volumes/ Data ESP Macintosh Win7Pro EFI MacHD QEFI Windows I only added that, as that is the path used by "20.mount_ESP.local" to mount the partition on my system. I can use every proposed script if: 1. I run the script manually BEFORE shutting down (Script mounts partition just fine in this case) 2. I mount the EFI partition manually BEFORE shutting down (Script does not mount the partition, but just saves the nvram.plist) 3. I use both "20.mount_ESP.local" and "80.save_nvram_plist.local" (Which is really the same as 2.) (All I did in my scripts is adding a new flag that gives more control, could just as well have used your script and "Clover.MountEFI=Yes"). Bottom line, the "80.save_nvram_plist.local" script won't mount the EFI partition when initiated on SIGTERM. (Which is probably the problem seen in #11981). So I'm pretty sure that we need to do something before SIGTERM as joevt is saying in #11984. What I found is that we can't actually mount on SIGTERM, which is why it's bugging out. Link to comment Share on other sites More sharing options...
TheRacerMaster Posted December 16, 2016 Share Posted December 16, 2016 But actually this affects nothing... I think this can be any text? Not confirmed. Not sure if the release date matters. But IMO there's no need to store it - it can be retrieved from the ROM version: IM171.88Z.0105.B05.1511031741 = November 03 2015. 2 Link to comment Share on other sites More sharing options...
Sherlocks Posted December 16, 2016 Share Posted December 16, 2016 But actually this affects nothing... I think this can be any text? Not confirmed.Yeah. There is no affect date format actually. I said that followed apple bios dump. Slice mentioned apple use xx/xx/xx in old bios. This is point. Clover follow apple's original format. Its not important Whether Affect or no affect system. Date format is free if you want any format. At least follow apple format is best Thanks 나의 LG-F410S 의 Tapatalk에서 보냄 1 Link to comment Share on other sites More sharing options...
Slice Posted December 16, 2016 Share Posted December 16, 2016 I only added that, as that is the path used by "20.mount_ESP.local" to mount the partition on my system. I can use every proposed script if: 1. I run the script manually BEFORE shutting down (Script mounts partition just fine in this case) 2. I mount the EFI partition manually BEFORE shutting down (Script does not mount the partition, but just saves the nvram.plist) 3. I use both "20.mount_ESP.local" and "80.save_nvram_plist.local" (Which is really the same as 2.) (All I did in my scripts is adding a new flag that gives more control, could just as well have used your script and "Clover.MountEFI=Yes"). Bottom line, the "80.save_nvram_plist.local" script won't mount the EFI partition when initiated on SIGTERM. (Which is probably the problem seen in #11981). So I'm pretty sure that we need to do something before SIGTERM as joevt is saying in #11984. What I found is that we can't actually mount on SIGTERM, which is why it's bugging out. Agree. In the case EFI partition is not mounted the file will be saved into main partition? Link to comment Share on other sites More sharing options...
PMheart Posted December 16, 2016 Share Posted December 16, 2016 Yeah. There is no affect date format actually. I said that followed apple bios dump. Slice mentioned apple use xx/xx/xx in old bios. This is point. Clover follow apple's original format. Its not important Whether Affect or no affect system. Date format is free if you want any format. At least follow apple format is best Thanks 나의 LG-F410S 의 Tapatalk에서 보냄 Not absolute. Some cases used xx/xx/xx and others used xx/xx/xxxx. 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted December 16, 2016 Share Posted December 16, 2016 Not absolute. Some cases used xx/xx/xx and others used xx/xx/xxxx.Sorry my english. Like you said, i already checked bios dump and did it in latest commit. Have a nice day 나의 LG-F410S 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
PMheart Posted December 16, 2016 Share Posted December 16, 2016 Sorry my english. Like you said, i already checked bios dump and did it in latest commit. Have a nice day 나의 LG-F410S 의 Tapatalk에서 보냄 Alright. But how to check this in OS X/macOS? Link to comment Share on other sites More sharing options...
smolderas Posted December 16, 2016 Share Posted December 16, 2016 I'm assuming that there is no need to add a directory check for "EFI/CLOVER", since that version is committed, or ? Link to comment Share on other sites More sharing options...
Micky1979 Posted December 16, 2016 Share Posted December 16, 2016 Not absolute. Some cases used xx/xx/xx and others used xx/xx/xxxx.Apple use UTC and en_US_posix almost always, and a date should be adjusted to display the local time zone. Icu library....(later i'll post a link) 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted December 16, 2016 Share Posted December 16, 2016 Alright. But how to check this in OS X/macOS?What do you want? You can search darwin dump files in web sites. And find smbios.txt and you can see true that i said. Anyway bios format of latest apple products is XX/XX/XXXX. I want no more answer. I did answer enough. 나의 LG-F410S 의 Tapatalk에서 보냄 2 Link to comment Share on other sites More sharing options...
Tusskan Posted December 16, 2016 Share Posted December 16, 2016 How to unload Efi gop from shell? and continue booting? without resetting. also can we have bash implementation to clover, that would be nice to have as a feature. Link to comment Share on other sites More sharing options...
Sherlocks Posted December 16, 2016 Share Posted December 16, 2016 @Slice Some is miss when add commit. "10/20/2015", // IM132 "10/20/2015", // IM161 "10/20/2015", // IM162 Change "10/20/2016", // IM132 "10/20/2016", // IM161 "10/20/2016", // IM162 When you will add other commit, hope to reflect with this change. Thanks 나의 LG-F410S 의 Tapatalk에서 보냄 Link to comment Share on other sites More sharing options...
cecekpawon Posted December 16, 2016 Share Posted December 16, 2016 (edited) Compile MTOC.NEW ** Always get newest cctools & LLVM Edited December 18, 2016 by cecekpawon 3 Link to comment Share on other sites More sharing options...
camillionario Posted December 16, 2016 Share Posted December 16, 2016 The default logo is a white Apple on black background, and there is a progress bar below it. I'd like to have the gray Apple on white background, and with a progress bar. If I switch to "Apple" for CustomLogo in Clover Configurator->Boot, while I get the gray Apple on white background, but it doesn't come with a progress bar. Is there anyway to get the progress bar? Link to comment Share on other sites More sharing options...
cnrd Posted December 16, 2016 Share Posted December 16, 2016 Agree. In the case EFI partition is not mounted the file will be saved into main partition? Yes that is correct, but if nvram.plist is avaliable in EFI clover will still use that even after the fallback to save it into main partition, meaning that the nvram will not be up to date on the next boot. In my case it will always use the nvram.plist from EFI partition even if the one in main partition is "newer". Link to comment Share on other sites More sharing options...
PMheart Posted December 16, 2016 Share Posted December 16, 2016 What do you want? You can search darwin dump files in web sites. And find smbios.txt and you can see true that i said. Anyway bios format of latest apple products is XX/XX/XXXX. I want no more answer. I did answer enough. 나의 LG-F410S 의 Tapatalk에서 보냄 Whoops. I'd like to know how to check without the help of Internet... For example check this via a bash command? Link to comment Share on other sites More sharing options...
Sherlocks Posted December 17, 2016 Share Posted December 17, 2016 i tested install clover pkg. first i remove christmas and new year theme. then, install clover pkg. clover automately install christmas and new year theme. checked this folder. christmas theme is empty. new year theme has theme files. here is clover log. 0:102 0:000 === [ GetListOfThemes ] =================================== 0:103 0:001 - [00]: bootcamp 0:104 0:001 - [01]: embedded 0:106 0:001 - [01]: random 0:107 0:001 - [01]: christmas - bad theme because theme.plist can't be load 0:107 0:000 - [01]: newyear doesn't exist christmas theme files in latest clover pkg? add, change theme name bootcamp to christmas in GUI for test, christmas theme is not working. maybe we will can't see christmas theme at 25 december of this year. 1 Link to comment Share on other sites More sharing options...
Mr MagOO Posted December 17, 2016 Share Posted December 17, 2016 Hi, tried the new nvram script with 3964, legacy boot. first reboot writes nvram in EFI partition but it falls back to root at the second reboot. Back to 3960 for me ... Link to comment Share on other sites More sharing options...
cecekpawon Posted December 17, 2016 Share Posted December 17, 2016 @Sherlocks >>> 1 Link to comment Share on other sites More sharing options...
FrDakota Posted December 17, 2016 Share Posted December 17, 2016 I submited that question page 584 but got no answer then I found the solution. It is not a Clover bug, but an Apple way of working which inserts a boot entry at startup. You have to delete the hidden folder .IABootFiles at the root of your macOS drive. I am trying to remove an entry from the Clover boot menu, or at least make it no longer the default choice. I have my config set to boot Macintosh HD by default, but instead it boots "Install from Macintosh HD" each time and promptly KPs. It is a remnant of an old El Capitan Installer which does not link to any actual files and is not bootable. So far I have deleted the Install Data, cleared NVRAM, and entered the UEFI Shell so I could use bcfg, but it comes back every time (and Clover defaults to it instead of Macintosh HD). I am not trying to upgrade to El Cap, I already have El Cap installed. Attached is my bcfg boot dump info, to which I then typed "bcfg boot rm 00" and followed with another dump. The entry showed as gone, but upon restart it was back again. Why does this keep coming back? How can I remove it permanently? The is an X99 Deluxe with Clover 3961. ... Thanks! 1 Link to comment Share on other sites More sharing options...
Recommended Posts