Jump to content

VirtualSMC — SMC Emulator


vit9696
760 posts in this topic

Recommended Posts

24 minutes ago, Dr. Hurt said:

@vit9696

 

I wonder if its also possible to create a lilu based VirtualNVRAM kext.... 

 

The current method of using a script on shutdown to save a plist on the EFI partition could use an update. 

It already exists as EFI driver. Use AptioMemoryFix instead of OsxAptioFix* and EmuVariableUEFI and delete clover's RC-scripts from /etc/rc.shutdown.d/ folder.

 

If BIOS is legacy, you will have to put up with the implementation via nvam.plist.

Edited by nikitenich
  • Like 2
Link to comment
Share on other sites

12 minutes ago, nikitenich said:

If BIOS is legacy, you will have to put up with the implementation via nvam.plist.

 

I'm using legacy boot.

 

I still think there's a better way to do it. Without touching System partition is what I was hoping for...

Link to comment
Share on other sites

12 minutes ago, Andrey1970 said:

API Intel Power Gadget

Just I've take a look here: https://software.intel.com/en-us/blogs/2012/12/13/using-the-intel-power-gadget-api-on-mac-os-x, and looks easy..I guess. For VSMC I guess you mean VirtualSMC? Well, I can detect if VirtualSMC.kext is loaded and then ...write a new SMC parser ...mac like I guess?

  • Like 1
Link to comment
Share on other sites

44 minutes ago, vector sigma said:

Just I've take a look here: https://software.intel.com/en-us/blogs/2012/12/13/using-the-intel-power-gadget-api-on-mac-os-x, and looks easy..I guess. For VSMC I guess you mean VirtualSMC? Well, I can detect if VirtualSMC.kext is loaded and then ...write a new SMC parser ...mac like I guess?

In the current HWMonitorSMC2 version almost everything works with VirtualSMC, except frequencies. Frequencies need to be received from API IPG.

In more detail you need to ask at @vit9696.

Link to comment
Share on other sites

1 hour ago, Andrey1970 said:

In the current HWMonitorSMC2 version almost everything works with VirtualSMC, except frequencies. Frequencies need to be received from API IPG.

In more detail you need to ask at @vit9696.

Ok, next weekend I'll start working on it.

Edited by vector sigma
typo, weeked to weekend
  • Like 4
  • Thanks 1
Link to comment
Share on other sites

2 minutes ago, Andrey1970 said:

@vector sigma

https://sourceforge.net/p/cloverefiboot/code/4690/

It is impossible to do SMCHelper as mandatory driver.

SMCHelper.efi is not compatible to VirtualSMC.efi

Done just one minute ago. SMCHelper.efi will be deleted if VirtualSMC is selected. Also Clover can now checkout and build it with the --ext-co argument (at the moment using only the XCODE5 toolchain since for XCODE8 require a small correction).

  • Like 2
Link to comment
Share on other sites

6 hours ago, ellaosx said:

Are you using emuvariable+rc script on a legacy?

 

No, just Clover and the RC script.

 

But again, I think Lilu could be used to make a better virtual NVRAM implementation.

  • Like 1
Link to comment
Share on other sites

Hey, just my 5 cents :-)

 

THX!!! The new Fakesmc works great here on z170 with  cabbylake cpu (Boots 2wice fast as with normal fakesmc)

Didnt seen till now any sideeffects :-)

 

Thx for you work!!!

 

Cheers :-)

Link to comment
Share on other sites

@vector sigma, I should have fixed VirtualSmc.efi compilation with XCODE8. But please note, that I will make other packages depend on https://github.com/acidanthera/OcSupportPkg, which will contain support libraries, very soon. I am not positive of this as of yet, but VirtualSmcPkg may also get moved to a separate repository or become part of some other repository.

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, vit9696 said:

@vector sigma, I should have fixed VirtualSmc.efi compilation with XCODE8.

Thanks.

 

4 hours ago, vit9696 said:

But please note, that I will make other packages depend on https://github.com/acidanthera/OcSupportPkg, which will contain support libraries, very soon

Not really a problem since ebuild.sh doesn't use those drivers by default and you have to pass a specific argument,  plus the code in it is really ready to add dependencies in few seconds.

 

4 hours ago, vit9696 said:

I am not positive of this as of yet, but VirtualSmcPkg may also get moved to a separate repository or become part of some other repository.

Same as above and for me is even better if VirtualSmcPkg will be a single repo and if the reposytory has always the name of the Pkg and the Pkg is in the root is just easy.

 

P.S. if you think that this is really premature, I'll be happy to remove any trace of VirtualSMC from Clover by just comenting the relative code until everythings is in place. Just tell me, not a problem.

 

EDIT:

Spoiler


Sorry if this isn't the right place but now I have this error compiling AppleSupportPkg:


/Users/vectorsigma/src/EXT_PACKAGES/AppleSupportPkg/Platform/ApfsDriverLoader/ApfsDriverLoader.c:579:26: error: incompatible pointer types passing 'UINT8 (*)[16]' to parameter of type 'const GUID *' [-Werror,-Wincompatible-pointer-types]
        if (CompareGuid (&ApplePartitionInfo->PartitionType,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vectorsigma/src/UDK2018/MdePkg/Include/Library/BaseMemoryLib.h:412:19: note: passing argument to parameter 'Guid1' here
  IN CONST GUID  *Guid1,
                  ^


 

 

Edited by vector sigma
  • Like 2
Link to comment
Share on other sites

I don't know,, my notebook now can sleep in charge mode,, and i can wake it with USB device (mouse), before of it it will instant wake with ACPIBatteryManager.kext and i Need to remove PRW method from GLAN, EHC1, EHC2 and XHC to avoid instant wake when notebook in charge mode. Now,, with VirtualSMC.kext, i don't need to remove _PRW method from those device. System can sleep well in Charge and uncharge condition, and system can wake from USB device (_PRW method is still there).

Thanks @vit9696

  • Thanks 1
Link to comment
Share on other sites

On 10/3/2018 at 9:44 AM, vit9696 said:

Just I already explained the ill-formed idea of building stuff yourself and consider using prebuilt binaries to be the only practical solution.

 

We fixed the guid issue yesterday.

Ok, I'll give the possibility to use precompiled binaries as a "standard way", and I'll made a separate script for me to checkout the source code as really I don't want to use them as I've done until now.

Thanks for the fix.

  • Like 2
Link to comment
Share on other sites

On 10/3/2018 at 6:55 PM, Andres ZeroCross said:

I don't know,, my notebook now can sleep in charge mode,, and i can wake it with USB device (mouse), before of it it will instant wake with ACPIBatteryManager.kext and i Need to remove PRW method from GLAN, EHC1, EHC2 and XHC to avoid instant wake when notebook in charge mode. Now,, with VirtualSMC.kext, i don't need to remove _PRW method from those device. System can sleep well in Charge and uncharge condition, and system can wake from USB device (_PRW method is still there).

Thanks @vit9696

 

Just tried this and it does indeed work!!! :D

 

No more instant wake. And I can use the USB mouse to wake the system just like I do on Windows. 

 

THANK YOU!!!

Link to comment
Share on other sites

 

30 minutes ago, Dr. Hurt said:

 

Just tried this and it does indeed work!!! :D

 

No more instant wake. And I can use the USB mouse to wake the system just like I do on Windows. 

 

THANK YOU!!!

But if you have working bluetooth device to XHC, then you need to set its USB Connector type to "0xff" / "255" as built-in device. If you didn't do it, your system can't sleep :)

Edited by Andres ZeroCross
Duplicate Quote
Link to comment
Share on other sites

×
×
  • Create New...