Andrey1970 Posted September 8, 2019 Share Posted September 8, 2019 12 minutes ago, fabiosun said: Hi @devs I have this problem with new 0.05 feature PollAppleHotKey with my system in signature, if I set it to true my system hangs in boot menu as you can see in my picture (I can't select anything else of ctrl/alt/del to reboot after error message) setting it to false system starts fine as usual I have same problem using or not UsbKbDxe.efi driver and AllowNvramReset to to true or to false Any help? Thank you https://github.com/acidanthera/bugtracker/issues/476 Link to comment Share on other sites More sharing options...
mhaeuser Posted September 8, 2019 Share Posted September 8, 2019 @fabiosun What is "EFI"? It looks like it's just OC's BOOTx64 entry and what you see is perfectly expected behaviour in that case. Which entry is booted without the option? Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2019 Share Posted September 8, 2019 (edited) @Andrey1970 I have an X299 system @Download-Fritz Usually I boot typing 5 in High Sierra or typing 2 to boot windows I have two disk with 2 different OC EFI (one on 0.04 other one with 0.05. In bios I have 0.0.5 disk as booting disk Edited September 8, 2019 by Guest typo Link to comment Share on other sites More sharing options...
mhaeuser Posted September 8, 2019 Share Posted September 8, 2019 @fabiosun You should have said that you are unable to input and not that booting is borked. You need AppleGenericInput for the time being. Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2019 Share Posted September 8, 2019 (edited) 20 minutes ago, Download-Fritz said: @fabiosun You should have said that you are unable to input and not that booting is borked. You need AppleGenericInput for the time being. Thank you with this driver system starts fine with PollAppleHotKey enabled pressing numeric as 2 or 5 or similar I have in my boot menu Not working hot keys and also arrows (up/down left/right) Edited September 8, 2019 by Guest Link to comment Share on other sites More sharing options...
Andrey1970 Posted September 8, 2019 Share Posted September 8, 2019 22 minutes ago, fabiosun said: arrows (up/down left/right) It is not present. Link to comment Share on other sites More sharing options...
Guest Posted September 8, 2019 Share Posted September 8, 2019 6 minutes ago, Andrey1970 said: It is not present. sorry @Andrey1970 I do not understand well I explain better usually with arrow keys of my keyboard I stop timeout countdown for automatic booting on preferred selection. now arrows do nothing, in my case also Hotkeys are not working cmd opt +p+r and so on... Not important for me but I have this behaviour Link to comment Share on other sites More sharing options...
canyondust Posted September 8, 2019 Share Posted September 8, 2019 Future feature request: With ShowPicker = False and PollAppleHotKeys = True Would it be possible to have no boot delay when option hotkey press is absent (immediately boot previously selected disk (startup disk)), and have no timeout when the option key is used to show picker (user must enter a choice for boot to continue)? Thx Link to comment Share on other sites More sharing options...
ameenjuz Posted September 8, 2019 Share Posted September 8, 2019 I have no brightness slide in display I put ssdt-pnlf.aml in ACPI but didn't show slider I running Mojave 10.14.6 with OpenCore-0.5.0 in clover is working fine brightness slider backlight keys any help me to appreciate sorry for my weak English Link to comment Share on other sites More sharing options...
gndzer0 Posted September 8, 2019 Share Posted September 8, 2019 12 hours ago, vit9696 said: Hmmm, this is strange. I did not have any issues with XNU and OC at the same time as long as the cable length was fine. You should note, however, that OpenCore currently does not do serial initialisation. https://github.com/acidanthera/bugtracker/issues/482 As for connection, this is strange. Classical null-modem connection (as you described) is what you normally need, but I am pretty sure it did not work with my adapter. I heard that many boards mislabel UART pins, and it may well be the case that mine did it too. I should ask someone to recheck and probably update with a note that on some boards the pins are swapped. Thanks vit9696 I only read about some USB to serial adapters requiring signal swap at higher baud rates. I think onboard to onboard connection should just work. Especially since it works for XNU. Thanks for logging https://github.com/acidanthera/bugtracker/issues/482. I will test things once the changes are in. In the mean time, I tried the following change: @@ -521,6 +521,8 @@ WrapSetVariable ( BOOLEAN Ints; BOOLEAN Wp; + DEBUG ((DEBUG_INFO, "XXX: WrapSetVariable\n")); + // // Abort access when running with read-only NVRAM. // It resulted in the following boot failure: ... 22:767 00:015 XXX: WrapSetVariable 22:782 00:015 XXX: WrapSetVariable 22:798 00:015 XXX: WrapSetVariable 22:813 00:015 OCC: Setting cc mode 0 -> 1 32:840 10:026 OC: Boot failed - Aborted 32:856 00:016 OCC: Configuring behaviour 0 32:872 00:015 OCB: StartImage failed - Aborted Would you have any idea why? Thanks! Link to comment Share on other sites More sharing options...
vit9696 Posted September 10, 2019 Share Posted September 10, 2019 @gndzer0, I updated the manual with regarding the connection. This was not a typo, but rather a specialty of select hardware pieces we had. You cannot call DEBUG in runtime mode (i.e. after ExitBootServices or basically when OS starts up), because select memory addresses are no longer valid at that step, and you cannot use e.g. files you opened previously. To workaround it we have a dedicated RUNTIME_DEBUG macro. Currently RUNTIME_DEBUG is empty, but you are supposed to add SerialPortWrite (or similar) calls at that place. Properly speaking, you need to create RuntimeDebugPrint function in OcDebugLogLib, and implement RUNTIME_DEBUG just as normal DEBUG but call RuntimeDebugPrint. Within that function you need to call SerialPortWrite after the necessary ASCII → Unicode text conversion (note, that you cannot use heap). Given that serial port I/O requires some basic writing it may make good sense to somehow synchronise OcLog protocol and local runtime debug printing library (it must be local to FwRuntimeServices to not get its memory discarded after ExitBootServices). Perhaps, it would make sense to have one more function, named RuntimeDebugConfigure (with no arguments), which will locate OcLog protocol and let you enable RuntimeDebug in case OcLog protocol has serial port debugging enabled. It will be appreciated if you could submit a patch on that =) Link to comment Share on other sites More sharing options...
FredWst Posted September 10, 2019 Share Posted September 10, 2019 (edited) @vit9696 With last OC just build with git pull just now. I got error at boot with IvyBridge : 00:000 00:000 OC: OpenCore is now loading (Vault: 0/0, Sign 0/0)... 00:000 00:000 OC: Boot timestamp - 2019.09.10 11:14:19 00:003 00:002 OCCPU: Found Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz 00:004 00:000 OCCPU: Signature 306A9 Stepping 9 Model 3A Family 6 Type 0 ExtModel 3 ExtFamily 0 00:004 00:000 OCCPU: Detected Apple Processor Type: 06 -> 0604 00:005 00:000 OCCPU: Ratio Min 16 Max 34 Current 34 Turbo 38 38 38 38 00:005 00:000 OCCPU: Timer address is 408 from LPC Boot stop at this line Fred Edited September 10, 2019 by FredWst Link to comment Share on other sites More sharing options...
Andrey1970 Posted September 10, 2019 Share Posted September 10, 2019 6 hours ago, FredWst said: @vit9696 With last OC just build with git pull just now. I got error at boot with IvyBridge : 00:000 00:000 OC: OpenCore is now loading (Vault: 0/0, Sign 0/0)... 00:000 00:000 OC: Boot timestamp - 2019.09.10 11:14:19 00:003 00:002 OCCPU: Found Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz 00:004 00:000 OCCPU: Signature 306A9 Stepping 9 Model 3A Family 6 Type 0 ExtModel 3 ExtFamily 0 00:004 00:000 OCCPU: Detected Apple Processor Type: 06 -> 0604 00:005 00:000 OCCPU: Ratio Min 16 Max 34 Current 34 Turbo 38 38 38 38 00:005 00:000 OCCPU: Timer address is 408 from LPC Boot stop at this line Fred Confirm a bug here. Link to comment Share on other sites More sharing options...
FredWst Posted September 10, 2019 Share Posted September 10, 2019 (edited) @Andrey1970 Thanks to report in bug tracker. Sorry, I always forgot this nice report bug tool. Fred Edited September 10, 2019 by FredWst Link to comment Share on other sites More sharing options...
droples Posted September 10, 2019 Share Posted September 10, 2019 I have the same problems with sandy 00:000 00:000 OC: OpenCore is now loading (Vault: 0/0, Sign 0/0)... 00:001 00:001 OC: Boot timestamp - 2019.09.10 13:33:08 00:004 00:003 OCCPU: Found Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz 00:005 00:001 OCCPU: Signature 206A7 Stepping 7 Model 2A Family 6 Type 0 ExtModel 2 ExtFamily 0 00:006 00:001 OCCPU: Detected Apple Processor Type: 07 -> 0703 00:007 00:001 OCCPU: Ratio Min 8 Max 20 Current 20 Turbo 29 28 26 26 00:008 00:001 OCCPU: Timer address is 408 from LPC Link to comment Share on other sites More sharing options...
gndzer0 Posted September 11, 2019 Share Posted September 11, 2019 21 hours ago, vit9696 said: @gndzer0, I updated the manual with regarding the connection. This was not a typo, but rather a specialty of select hardware pieces we had. You cannot call DEBUG in runtime mode (i.e. after ExitBootServices or basically when OS starts up), because select memory addresses are no longer valid at that step, and you cannot use e.g. files you opened previously. To workaround it we have a dedicated RUNTIME_DEBUG macro. Currently RUNTIME_DEBUG is empty, but you are supposed to add SerialPortWrite (or similar) calls at that place. Properly speaking, you need to create RuntimeDebugPrint function in OcDebugLogLib, and implement RUNTIME_DEBUG just as normal DEBUG but call RuntimeDebugPrint. Within that function you need to call SerialPortWrite after the necessary ASCII → Unicode text conversion (note, that you cannot use heap). Given that serial port I/O requires some basic writing it may make good sense to somehow synchronise OcLog protocol and local runtime debug printing library (it must be local to FwRuntimeServices to not get its memory discarded after ExitBootServices). Perhaps, it would make sense to have one more function, named RuntimeDebugConfigure (with no arguments), which will locate OcLog protocol and let you enable RuntimeDebug in case OcLog protocol has serial port debugging enabled. It will be appreciated if you could submit a patch on that =) Hi vit9696 Thank you for detailed explanation! I think I roughly understand what needs doing, however I am currently not capable of implementing what you are suggesting. My C skills are very limited. Sorry about that. Last night I was able to get serial port working. The trick was to lower baud rate to 57600 in MdeModulePkg/MdeModulePkg.dec and on receiving end. 38400 baud rate, which I have tried first, worked as well. $ git diff diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 19935c88fa..554a72bea1 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -1165,7 +1165,7 @@ ## Baud rate for the 16550 serial port. Default is 115200 baud. # @Prompt Baud rate for serial port. # @ValidList 0x80000001 | 921600, 460800, 230400, 115200, 57600, 38400, 19200, 9600, 7200, 4800, 3600, 2400, 2000, 1800, 1200, 600, 300, 150, 134, 110, 75, 50 - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|115200|UINT32|0x00020003 + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate|57600|UINT32|0x00020003^M ## Line Control Register (LCR) for the 16550 serial port. This encodes data bits, parity, and stop bits.<BR><BR> # BIT1..BIT0 - Data bits. 00b = 5 bits, 01b = 6 bits, 10b = 7 bits, 11b = 8 bits<BR> I took shortcut and added some fixed code to AppleSupportPkg/Platform/FwRuntimeServices/UefiRuntimeServices.c: $ git diff diff --git a/Platform/FwRuntimeServices/UefiRuntimeServices.c b/Platform/FwRuntimeServices/UefiRuntimeServices.c index e3e712b..22b0d1b 100644 --- a/Platform/FwRuntimeServices/UefiRuntimeServices.c +++ b/Platform/FwRuntimeServices/UefiRuntimeServices.c @@ -23,6 +23,7 @@ #include <Library/OcStringLib.h> #include <Library/UefiBootServicesTableLib.h> #include <Library/UefiRuntimeServicesTableLib.h> +#include <Library/SerialPortLib.h> /** Runtime accessible variables (all read only). @@ -521,6 +522,9 @@ WrapSetVariable ( BOOLEAN Ints; BOOLEAN Wp; + CHAR8 *Buffer_before = "XXX WrapSetVariable before mStoredSetVariable\r\n"; + CHAR8 *Buffer_after = "XXX WrapSetVariable after mStoredSetVariable\r\n"; + // // Abort access when running with read-only NVRAM. // @@ -545,6 +549,8 @@ WrapSetVariable ( WriteUnprotectorPrologue (&Ints, &Wp); + SerialPortInitialize (); + SerialPortWrite ((UINT8 *)Buffer_before, AsciiStrLen (Buffer_before)); Status = mStoredSetVariable ( VariableName, VendorGuid, @@ -552,6 +558,7 @@ WrapSetVariable ( DataSize, Data ); + SerialPortWrite ((UINT8 *)Buffer_after, AsciiStrLen (Buffer_after)); WriteUnprotectorEpilogue (Ints, Wp); And am getting "XXX WrapSetVariable before/after mStoredSetVariable" messages on serial console at runtime before and after mStoredSetVariable call now (before sleep and after wake). I have removed Apple's serial adapter kext to prevent it from attaching to the device. I am not 100% sure if that's required. I have tried number of sleep/wake cycles with the changes in and was not able to get the machine to freeze. Tried putting machine to sleep after cold and warm boot but it doesn't want to freeze anymore. I also left the box sleeping/waking up in a loop every 3mins overnight. It was still operational in the morning. I will try things out again later tonight with and without my changes and report back. Link to comment Share on other sites More sharing options...
droples Posted September 11, 2019 Share Posted September 11, 2019 On 9/11/2019 at 1:53 AM, droples said: I have the same problems with sandy 00:000 00:000 OC: OpenCore is now loading (Vault: 0/0, Sign 0/0)... 00:001 00:001 OC: Boot timestamp - 2019.09.10 13:33:08 00:004 00:003 OCCPU: Found Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz 00:005 00:001 OCCPU: Signature 206A7 Stepping 7 Model 2A Family 6 Type 0 ExtModel 2 ExtFamily 0 00:006 00:001 OCCPU: Detected Apple Processor Type: 07 -> 0703 00:007 00:001 OCCPU: Ratio Min 8 Max 20 Current 20 Turbo 29 28 26 26 00:008 00:001 OCCPU: Timer address is 408 from LPC https://github.com/acidanthera/OcSupportPkg/tree/6d104f5927d7765386a0e25350a304de96f29d6c Sandy Bridge and Ivy Bridge everything works. Thanks! Link to comment Share on other sites More sharing options...
FredWst Posted September 11, 2019 Share Posted September 11, 2019 1 hour ago, droples said: https://github.com/acidanthera/OcSupportPkg/tree/6d104f5927d7765386a0e25350a304de96f29d6c Sandy Bridge and Ivy Bridge everything works. Thanks! Nice, me too on IvyBridge. Fred 3 Link to comment Share on other sites More sharing options...
lottenow Posted September 11, 2019 Share Posted September 11, 2019 (edited) Wonderful job guys! I am very happy to see new development on OpenCore on a weekly basis. I have been trying to move from Clover 5070 to OpenCore 0.5.0 with macOS Catalina 10.15 Beta 8 (19A558d) on HP Gaming Pavilion (15-cx0012nlx). I have not been extremely successful so far, as you can probably tell from the message below: Quote OCB: Failed to match a default boot option OC: Nested ReRun is not supported BS: Failed to start OpenCore image - Already started BS: Failed to load OpenCore from disk - Already started OC: Boot failed - Not Found OCB: StartImage failed - Not Found Halting on critical error ACPI (disabled, using patching instead): SSDT-EC-USBX, SSDT-PLUG, SSDT-RTC0 Drivers: ApfsDriverLoader, AppleGenericInput, FwRuntimeServices, VBoxHfs, VirtualSmc Kexts: AppleALC, Lilu, RealtekRTL8111, VirtualSMC, VoodooPS2Controller, WhateverGreen Clover works without problems, i.e. UHD 630, Audio, Ethernet, Keyboard/Trackpad. Please find attached my config.plist from OpenCore. I have also attached my config.plist from Clover for comparison only, to see where the problem lies. I hope you will be able to help me in working out the issue! Thank you so much!! config.plist config-clover.plist Edited September 11, 2019 by lottenow Link to comment Share on other sites More sharing options...
canyondust Posted September 12, 2019 Share Posted September 12, 2019 55 minutes ago, lottenow said: I hope you will be able to help me in working out the issue! Thank you so much!! Try this guide here, using the fullsample plist provided in the OC release download, and just copy/paste your smbios, sn, mlb, etc from your clover config to your OC config. Take your time and triple check it all https://khronokernel-2.gitbook.io/opencore-vanilla-desktop-guide/ Link to comment Share on other sites More sharing options...
gndzer0 Posted September 12, 2019 Share Posted September 12, 2019 23 hours ago, gndzer0 said: I have tried number of sleep/wake cycles with the changes in and was not able to get the machine to freeze. Tried putting machine to sleep after cold and warm boot but it doesn't want to freeze anymore. I also left the box sleeping/waking up in a loop every 3mins overnight. It was still operational in the morning. I will try things out again later tonight with and without my changes and report back. I was not able to get my machine to freeze after sleep/wake with my SerialPortWrite changes in and I tried hard. On the other hand, I was able to consistently freeze it using unmodified FwRuntimeServices.efi after just few sleep/wake cycles. The only difference that SerialPortWrite changes bring in that I can think of is slight delay between each mStoredSetVariable call. I have removed all my changes and added the following code in to add some delay before mStoredSetVariable() call: $ git diff diff --git a/Platform/FwRuntimeServices/UefiRuntimeServices.c b/Platform/FwRuntimeServices/UefiRuntimeServices.c index e3e712b..25dffe2 100644 --- a/Platform/FwRuntimeServices/UefiRuntimeServices.c +++ b/Platform/FwRuntimeServices/UefiRuntimeServices.c @@ -520,6 +520,7 @@ WrapSetVariable ( EFI_STATUS Status; BOOLEAN Ints; BOOLEAN Wp; + UINT64 Ticks; // // Abort access when running with read-only NVRAM. @@ -545,6 +546,11 @@ WrapSetVariable ( WriteUnprotectorPrologue (&Ints, &Wp); + Ticks = AsmReadTsc () + 20000000; + while (AsmReadTsc () <= Ticks) { + CpuPause (); + } + Status = mStoredSetVariable ( VariableName, VendorGuid, I am seeing the same good behaviour as with SerialPortWrite changes. No freezes after cold or warm boot. I left the machine sleeping/waking up in the loop every 40s overnight. I was still operational after hundreds of cycles in the morning, which is great. There must be an issue with how OEM firmware is handling NVRAM writes. Race condition of some sorts? Or maybe NVRAM misbehaves (sometimes) when it is updated multiple times in a row. My SerialPortWrite changes suggest that NVRAM is being updated ~8 times before going to sleep and right after wake in quick succession. I will run more tests with "delay before NVRAM write" changes in and report back. Link to comment Share on other sites More sharing options...
lottenow Posted September 12, 2019 Share Posted September 12, 2019 8 hours ago, canyondust said: Try this guide here, using the fullsample plist provided in the OC release download, and just copy/paste your smbios, sn, mlb, etc from your clover config to your OC config. Take your time and triple check it all https://khronokernel-2.gitbook.io/opencore-vanilla-desktop-guide/ Hi, thanks for your help. I indeed followed the guide and used the SampleFull.plist format. I have also updated my PlatformInfo accordingly, but I do not think it is related to my problem above. I believe the OpenCore bootloader does not load properly or perhaps it cannot read the boot options for whatever reasons. I am using the following boot-args: Quote -v dart=0 nv_disable=1 keepsyms=1 debug=0x100 -lilubetaall -cdfon -wegnoegpu -alcbeta alcid=13 I believe these are compatible with OpenCore. I hope you guys can help me work out there the problem actually lies. Thanks! config.plist Link to comment Share on other sites More sharing options...
hardcorehenry Posted September 12, 2019 Share Posted September 12, 2019 42 minutes ago, lottenow said: Hi, thanks for your help. I indeed followed the guide and used the SampleFull.plist format. I have also updated my PlatformInfo accordingly, but I do not think it is related to my problem above. I believe the OpenCore bootloader does not load properly or perhaps it cannot read the boot options for whatever reasons. I am using the following boot-args: I believe these are compatible with OpenCore. I hope you guys can help me work out there the problem actually lies. Thanks! config.plist Have you noticed you have in your config ACPI SSDT add-ons with .dsl extensions. Should be ACPI Maschine Language Binary with .aml extensions. Don't you need UEFI quirks like RequestBootVarRouting and probably others. You really have to read about quirks in Configuration.pdf Link to comment Share on other sites More sharing options...
matgeo Posted September 12, 2019 Share Posted September 12, 2019 Is something in OC like forcekextstoload in clover ? Link to comment Share on other sites More sharing options...
lottenow Posted September 12, 2019 Share Posted September 12, 2019 1 hour ago, hardcorehenry said: Have you noticed you have in your config ACPI SSDT add-ons with .dsl extensions. Should be ACPI Maschine Language Binary with .aml extensions. Don't you need UEFI quirks like RequestBootVarRouting and probably others. You really have to read about quirks in Configuration.pdf Yes, I am aware that they have a .dsl extension. Nonetheless, they are disabled ATM as I am using patching as per my previous post, hence will not need any .aml files. I have taken a look already at the Configuration.pdf file as well as the Vanilla guide, and I do not need them enabled for my machine, as far as I can tell. I am not an expert, but from what the message tells me, it cannot load the "boot options". So perhaps, it does not recognise my HFS+ and APFS partitions? Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts