Jump to content
vit9696

VirtualSMC — SMC Emulator

394 posts in this topic

Recommended Posts

I have been getting constant reboots (kernel panics i believe) lately just as i select my Mojave installation which has never had an issue booting.

Sometimes i can boot with using verbose flag but not always.

Attached is ioreg if needed, Clover folder. Preboot log in clover folder.

Anything else needed to identify the issue just let me know and ill be happy to provide.

CLOVER.zip

Shane’s iMac.ioreg.zip

18 hours ago, Trung_Nguyen said:

Hello, I'm using Mojave with the latest VirtualSMC from github acidanthera.

How to disable VirtualSMC verbose printing? Thanks

 

VirtualSMC does not cause any verbose boot, are you using apfs.efi still? or moved to the preferred ApfsDriverLoader-64.efi?

Share this post


Link to post
Share on other sites
Advertisement
On 11/4/2018 at 4:30 PM, SavageAUS said:

I have been getting constant reboots (kernel panics i believe) lately just as i select my Mojave installation which has never had an issue booting.

Sometimes i can boot with using verbose flag but not always.

Attached is ioreg if needed, Clover folder. Preboot log in clover folder.

Anything else needed to identify the issue just let me know and ill be happy to provide.

CLOVER.zip

Shane’s iMac.ioreg.zip

VirtualSMC does not cause any verbose boot, are you using apfs.efi still? or moved to the preferred ApfsDriverLoader-64.efi?

 

Same here,, At Lenovo 330S-14IKB.

Just boot with verbose and it's ok. If boot without Verbose then it will be kernel panic

 

My mistake, it's related to VoodooI2C.kext and plugin :)

 

Edited by Andres ZeroCross

Share this post


Link to post
Share on other sites
6 hours ago, SavageAUS said:

I have been getting constant reboots (kernel panics i believe) lately just as i select my Mojave installation which has never had an issue booting.

Sometimes i can boot with using verbose flag but not always.

Attached is ioreg if needed, Clover folder. Preboot log in clover folder.

Anything else needed to identify the issue just let me know and ill be happy to provide.

CLOVER.zip

Shane’s iMac.ioreg.zip

VirtualSMC does not cause any verbose boot, are you using apfs.efi still? or moved to the preferred ApfsDriverLoader-64.efi?

Sorry for my stupidity, I forgot to remove the boot args from config.plist

facepalm

Edited by Trung_Nguyen

Share this post


Link to post
Share on other sites

Just learned of VirtualSMC and it works perfectly on my Haswell HP Laptop running High Sierra/Mojave: many thanks for this. I thought SMCBatteryManager might be the answer to my battery update issues but sadly not, however. I was previously using a DSDT patch with ACPIBatteryManager and at some point a problem which seemingly affects a lot of HP machines cropped up whereby the battery level won't update until the battery is physically removed and reinserted while the machine is running on the charger. You have to do this after each OS boot, and since it's also affected Windows, I believe it's a firmware issue of some kind (found this thread today which seems to describe the exact same problem, which has also been described on other Hackintosh forums and even on the HP support boards).

 

Anyway: great stuff, and thanks again.

Share this post


Link to post
Share on other sites
55 minutes ago, flashjazzcat said:
Just learned of VirtualSMC and it works perfectly on my Haswell HP Laptop running High Sierra/Mojave: many thanks for this. I thought SMCBatteryManager might be the answer to my battery update issues but sadly not, however. I was previously using a DSDT patch with ACPIBatteryManager and at some point a problem which seemingly affects a lot of HP machines cropped up whereby the battery level won't update until the battery is physically removed and reinserted while the machine is running on the charger. You have to do this after each OS boot, and since it's also affected Windows, I believe it's a firmware issue of some kind (found this thread today which seems to describe the exact same problem, which has also been described on other Hackintosh forums and even on the HP support boards).
 
Anyway: great stuff, and thanks again.


Yes apologies for OT but I had the same issue with that kext, I had to disable showing battery percentage then enable and it would update but SMCBattery doesn’t have this problem.
 

Also

@vit9696

I don't know if this is possible but can SMCBattery be reworked as a Lilu plugin? Instead of dependant of VirtualSMC? (i think it is) as with VirtualSMC both my machines (and other peoples on this forum) KP 8/10 times on boot/reboot even with verbose flag (sometimes helps). Or can we provide any information to help with debugging this issue as when VirtualSMC does boot it is much quicker (for me at least) to boot to the OS.

Edited by SavageAUS
Added more info

Share this post


Link to post
Share on other sites
21 hours ago, SavageAUS said:


Yes apologies for OT but I had the same issue with that kext, I had to disable showing battery percentage then enable and it would update but SMCBattery doesn’t have this problem.
 

 

Thanks for the reply. To be clear: the issue I described persists with SMCBattery, but I'm hoping to fiddle with it a bit more to see what can be done. I actually spoke too soon about the kext working well on my system, too: a little later on, I rebooted High Sierra and the system kept sticking polling for ACPICPU.kext or similar. Went back to FakeSMC for now but am going to try building the latest SMCBattery from source and see how that goes.

 

EDIT: Built VirtualSMC from the repo sources with the latest Lilu debug kext and got over the booting issue. This was my first time building kexts from the sources in XCode (I program, but on other platforms), and I'm quite surprised by how easy it was.

 

Battery percentage still doesn't seem to be decreasing but at least I have a working system to fiddle with now. :) It's clear that making sure the same Lilu revision is employed throughout is very important to a stable system.

Edited by flashjazzcat
Update

Share this post


Link to post
Share on other sites

Thank you for VirtualSMC! I have probably a bug or something similar with SMCBattery... Kext itself works perfect and everything is shown correctly, but I have 35% CPU idle after changing state (either plugging-in or unplugging AC Adapter) It's the kernel process, so something serious, I think. Of course Laptop is getting slower. What should I submit for debugging? (Please a bit easier, since I am a beginner) 

 

EDIT: I would even say it happens, when AC Adapter is or was plugged in

Edited by KristFlex

Share this post


Link to post
Share on other sites
15 hours ago, flashjazzcat said:

 

Thanks for the reply. To be clear: the issue I described persists with SMCBattery, but I'm hoping to fiddle with it a bit more to see what can be done. I actually spoke too soon about the kext working well on my system, too: a little later on, I rebooted High Sierra and the system kept sticking polling for ACPICPU.kext or similar. Went back to FakeSMC for now but am going to try building the latest SMCBattery from source and see how that goes.

 

EDIT: Built VirtualSMC from the repo sources with the latest Lilu debug kext and got over the booting issue. This was my first time building kexts from the sources in XCode (I program, but on other platforms), and I'm quite surprised by how easy it was.

 

Battery percentage still doesn't seem to be decreasing but at least I have a working system to fiddle with now. :) It's clear that making sure the same Lilu revision is employed throughout is very important to a stable system.

Can you please describe how did you do it ? This might help other people , too.

Thanks in advance.

Share this post


Link to post
Share on other sites
 
Thanks for the reply. To be clear: the issue I described persists with SMCBattery, but I'm hoping to fiddle with it a bit more to see what can be done. I actually spoke too soon about the kext working well on my system, too: a little later on, I rebooted High Sierra and the system kept sticking polling for ACPICPU.kext or similar. Went back to FakeSMC for now but am going to try building the latest SMCBattery from source and see how that goes.
 
EDIT: Built VirtualSMC from the repo sources with the latest Lilu debug kext and got over the booting issue. This was my first time building kexts from the sources in XCode (I program, but on other platforms), and I'm quite surprised by how easy it was.
 
Battery percentage still doesn't seem to be decreasing but at least I have a working system to fiddle with now.  It's clear that making sure the same Lilu revision is employed throughout is very important to a stable system.
With ACPIBatteryManger.kext for some device will have some issue too. Need to set ACPIPoolDelay. But i don't know how to set it at SMCBatteryManager.kext.

For some Real Macbook device have same issue too.

Sent from my Mi Note 2 using Tapatalk

Share this post


Link to post
Share on other sites
8 hours ago, matgeo said:

Can you please describe how did you do it ? This might help other people , too.

Thanks in advance.

 

Sure. I basically followed the HackinDoge's brief instructions in this Reddit thread, after first cloning the project using the Git URL in XCode's opening wizard. Once I had done all that, I was able to build VirtualSMC simply by clicking 'Build' in XCode's Project menu. The resulting kexts were buried in the file system, but I found them via a search. :) I was kind of following my nose with all this stuff, so I realise I may not have explained things too well. If you get stuck, please shout up. :)

 

8 hours ago, Andres ZeroCross said:

With ACPIBatteryManger.kext for some device will have some issue too. Need to set ACPIPoolDelay. But i don't know how to set it at SMCBatteryManager.kext.

For some Real Macbook device have same issue too.
 

 

Well, not wanting to go OT (apologies in advance) but in total exasperation I booted my old Sierra install from an external USB drive last night and sure enough battery levels work just fine there, so there's nothing wrong with the underlying hardware or EFI firmware per se. It's about a year since I installed Sierra on this machine and clearly in the process of upgrading the OS I failed to notice exactly when battery monitoring got broken. But this Sierra installation is unusual. It doesn't use ACPIBatteryManager, but instead a version of AppleSmartBatteryManager.kext modified for ACPI. I don't know where I got it, but it's by Rehabman and it works perfectly in Sierra when installed in S/L/E. Unfortunately, if I install the same kext in S/L/E under High Sierra, it does not fix the battery issue there at all. Likewise, using the current version of ACPIBatteryManager in Sierra results in the same issue. So there's something unique about the custom AppleSmartBatteryManager kext and Sierra which hits the spot on this machine. Not terribly keen to downgrade the OS by two generations, though. :)

If anyone is interested, I can post the mystery working kext here.

Thanks so much for the tip regarding ACPIPollDelay, anyway. I'm really grasping at straws now to get the battery notifications working in the way I know they can (having observed proper behaviour in Sierra) in HS and Mojave. I know these things often require a lot of painstaking work, but man: this problem is driving me right up the wall.

 

Edited by flashjazzcat
Added Reddit link

Share this post


Link to post
Share on other sites
15 minutes ago, flashjazzcat said:

 

Sure. I basically followed the HackinDoge's brief instructions in this Reddit thread, after first cloning the project using the Git URL in XCode's opening wizard. Once I had done all that, I was able to build VirtualSMC simply by clicking 'Build' in XCode's Project menu. The resulting kexts were buried in the file system, but I found them via a search. :) I was kind of following my nose with all this stuff, so I realise I may not have explained things too well. If you get stuck, please shout up. :)

 

 

Well, not wanting to go OT (apologies in advance) but in total exasperation I booted my old Sierra install from an external USB drive last night and sure enough battery levels work just fine there, so there's nothing wrong with the underlying hardware or EFI firmware per se. It's about a year since I installed Sierra on this machine and clearly in the process of upgrading the OS I failed to notice exactly when battery monitoring got broken. But this Sierra installation is unusual. It doesn't use ACPIBatteryManager, but instead a version of AppleSmartBatteryManager.kext modified for ACPI. I don't know where I got it, but it's by Rehabman and it works perfectly in Sierra when installed in S/L/E. Unfortunately, if I install the same kext in S/L/E under High Sierra, it does not fix the battery issue there at all. Likewise, using the current version of ACPIBatteryManager in Sierra results in the same issue. So there's something unique about the custom AppleSmartBatteryManager kext and Sierra which hits the spot on this machine. Not terribly keen to downgrade the OS by two generations, though. :)

If anyone is interested, I can post the mystery working kext here.

Thanks so much for the tip regarding ACPIPollDelay, anyway. I'm really grasping at straws now to get the battery notifications working in the way I know they can (having observed proper behaviour in Sierra) in HS and Mojave. I know these things often require a lot of painstaking work, but man: this problem is driving me right up the wall.

 

 

 

Send me the IOREG Output (use IOREG versi 2.1),, remove SMCBatteryManager.kext (VirtualSMC plugin kext) or another battery related kext from CLOVER, L/E or S/L/E. Then use ACPIBatteryManager.kext,, last, upload your CLOVER/ACPI/Patched folder.

Share this post


Link to post
Share on other sites
5 hours ago, Andres ZeroCross said:

 

 

Send me the IOREG Output (use IOREG versi 2.1),, remove SMCBatteryManager.kext (VirtualSMC plugin kext) or another battery related kext from CLOVER, L/E or S/L/E. Then use ACPIBatteryManager.kext,, last, upload your CLOVER/ACPI/Patched folder.

 

Sincerest thanks for your interest. I have PM'd you the requested files (hopefully everything you need: if not, please let me know). It would be enough to perhaps have some clues on where I'm going wrong so that I can put them right and hopefully learn by doing so. :)
 

Anything else you need: please shout up. I'm testing SMCBattery again on High Sierra here and carefully observing results, meanwhile.

Share this post


Link to post
Share on other sites
27 minutes ago, flashjazzcat said:

 

Sincerest thanks for your interest. I have PM'd you the requested files (hopefully everything you need: if not, please let me know). It would be enough to perhaps have some clues on where I'm going wrong so that I can put them right and hopefully learn by doing so. :)
 

Anything else you need: please shout up. I'm testing SMCBattery again on High Sierra here and carefully observing results, meanwhile.

 

Use this,, and check the problem about battery percentage is continues change or not. Let me know for the result

CLOVER.zip

Share this post


Link to post
Share on other sites

@SavageAUS, could you please remind me what the kernel panics are? Are you sure they are VSMC related? I do not think SMCBatteryManager could be reworked as a Lilu plugin, as modern MacBooks expose battery information via SMC, and this is what SMCBatteryManager does.

Share this post


Link to post
Share on other sites
[mention=1083558]SavageAUS[/mention], could you please remind me what the kernel panics are? Are you sure they are VSMC related? I do not think SMCBatteryManager could be reworked as a Lilu plugin, as modern MacBooks expose battery information via SMC, and this is what SMCBatteryManager does.

I was fairly certain at one point they were VSMC related but now I’m unsure, when I test more I’ll let you know.
Yeah as I said I had no idea about SMCBatt but didn’t hurt to ask and now I know.
P.S really appreciate your work.


Sent from my iPhone using Tapatalk

Share this post


Link to post
Share on other sites
16 hours ago, Andres ZeroCross said:

 

Use this,, and check the problem about battery percentage is continues change or not. Let me know for the result

CLOVER.zip

 

Many thanks for this. It took all night to thoroughly test this, but sadly it has not improved matters. I have PM'd you with detailed results. Meanwhile, Sierra (using the old patched SmartBattery kext in S/L/E) works just fine.

 

Update: At length, I have discovered that the HS ACPI files work just fine in Sierra, and that it seems to be 'Drop OEM SSDTs' in Clover which was causing the battery issue. At least, I'm testing this theory in High Sierra at the moment. Have PM'd again (I'm conscious of cluttering the thread up). I feel there may be some information which might be of interest to others, though. Will test Mojave this evening. It's great to be getting somewhere with this, and Andres' help as been very motivating here.

Edited by flashjazzcat
Update

Share this post


Link to post
Share on other sites
On 11/4/2018 at 11:30 AM, SavageAUS said:

I have been getting constant reboots (kernel panics i believe) lately just as i select my Mojave installation which has never had an issue booting.

Sometimes i can boot with using verbose flag but not always.

Attached is ioreg if needed, Clover folder. Preboot log in clover folder.

Anything else needed to identify the issue just let me know and ill be happy to provide.

CLOVER.zip

Shane’s iMac.ioreg.zip

VirtualSMC does not cause any verbose boot, are you using apfs.efi still? or moved to the preferred ApfsDriverLoader-64.efi?

 

I sometimes get reboot too as soon as the boot progress bar appears.

Booting in verbose works. Alternatively, keepsyms=1 also works.

I'm not sure what's causing it but glad I'm not the only one.

 

This doesn't always happen. Can't seem to find a way to reproduce it.

Share this post


Link to post
Share on other sites
 
I sometimes get reboot too as soon as the boot progress bar appears.
Booting in verbose works. Alternatively, keepsyms=1 also works.
I'm not sure what's causing it but glad I'm not the only one.
 
This doesn't always happen. Can't seem to find a way to reproduce it.

Mine was happening just after you see the apple logo the first time. Bam instant reboot.


Sent from my iPhone using Tapatalk

Share this post


Link to post
Share on other sites

From what I read this will work down to Penryn but will it work if on non UEFI Bios (Legacy Bios) any reasons it may not work?  I am not using FileVault2 but if I were to decide to use it for Legacy Bios, isn't VirtualSMC.efi meant for UEFI bios only, unless FileVault2 is not meant to use only on Legacy Bios then it won't matter.

 

I answered my own question works great on Legacy Bios for Notebook Asus G51JX i7-720QM, updated processor to i7-940XM smbios MacBookPro6,2.  Unsure about the second part of my question regarding FIleVault2 and VirtualSMC.efi for Legacy Bios.

Edited by oSxFr33k

Share this post


Link to post
Share on other sites
2 hours ago, oSxFr33k said:

From what I read this will work down to Penryn but will it work if on non UEFI Bios (Legacy Bios) any reasons it may not work?  I am not using FileVault2 but if I were to decide to use it for Legacy Bios, isn't VirtualSMC.efi meant for UEFI bios only, unless FileVault2 is not meant to use only on Legacy Bios then it won't matter.

 

I answered my own question works great on Legacy Bios for Notebook Asus G51JX i7-720QM, updated processor to i7-940XM smbios MacBookPro6,2.  Unsure about the second part of my question regarding FIleVault2 and VirtualSMC.efi for Legacy Bios.

FV2 works in Legacy BIOS too.

Share this post


Link to post
Share on other sites
52 minutes ago, Andrey1970 said:

FV2 works in Legacy BIOS too.

So I would need Drivers64EFI folder or Drivers64 folder with VirtualSMC.efi inside if I use FV2 in Legacy Bios?

Share this post


Link to post
Share on other sites
14 hours ago, oSxFr33k said:

So I would need Drivers64EFI folder or Drivers64 folder with VirtualSMC.efi inside if I use FV2 in Legacy Bios?

Drivers64 folder with VirtualSMC.efi and with other drivers necessary for FV2.

(AptioMemoryFix.efi is not required for Legacy Bios)

 

Edited by Andrey1970

Share this post


Link to post
Share on other sites

I have the same issue with instant reboot suddenly if i not use -v. I thing it is something other because with my first setup (ProBook 450 G4, 10.14.1) i use rehabmans acpi hotpatch guide and there he is using FakeSMC.

I use always latest Clover and in my opinion clover was the problem. Therefore i used rehabmans fork of clover but same issue.

 

Maybe it is Lilu or an plugin.

 

Edit:

 

If i dont use -v and set keep symbols on panic (keepsyms=1) boot seems to be working.

Edited by Quipper

Share this post


Link to post
Share on other sites
I have the same issue with instant reboot suddenly if i not use -v. I thing it is something other because with my first setup (ProBook 450 G4, 10.14.1) i use rehabmans acpi hotpatch guide and there he is using FakeSMC.
I use always latest Clover and in my opinion clover was the problem. Therefore i used rehabmans fork of clover but same issue.
 
Maybe it is Lilu or an plugin.
 
Edit:
 
If i dont use -v and set keep symbols on panic (keepsyms=1) boot seems to be working.

I’ve been trying to catch an image of the kp but if I boot -v it boots fine.


Sent from my iPhone using Tapatalk

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×