Jump to content
vit9696

VirtualSMC — SMC Emulator

437 posts in this topic

Recommended Posts

On 10/29/2018 at 3:37 PM, gujiangjiang said:

 

Thansk for your help.

Here are my screenshots and ioregs from ACPIBatteryManager and SMCbattery.

AppleSmartBatteryManager.thumb.png.4e33a94d1a49cfa75320609e27f02a92.png

Here are using ACPIBatteryManager with Rehabman.

AppleSmartBatteryManager.ioreg.zip

 

SMC.thumb.png.4f9e9fa501b9c30bc9576f40ca8b9e41.png

Here are using SMCBattery.

SMC.ioreg.zip

 

 

 

Try to use IOREG version 2.1, not the new ones.

Take a look at ACC20?? It looks like ADAPTER DEVICE,, there is no kext loaded into it. You must implemented these patch

 

#Maintained by: RehabMan for: Laptop Patches
#system_ADP1.txt

# Note: if AppleACPIACAdapter is already loading (look at your ioreg), then
#  this patch is not necessary for you.

# Note: Old patch used to rename AC or ACAD to ADP1 to be more "Apple" like
# Turns out, this is not needed.

# Replace all instances of AC with ADP1
#into_all all code_regex \.AC, replaceall_matched begin .ADP1, end;
#into_all all code_regex \(AC, replaceall_matched begin (ADP1, end;
#into all label AC set_label begin ADP1 end;

# Replace all instances of ACAD with ADP1
#into_all all code_regex \.ACAD, replaceall_matched begin .ADP1, end;
#into_all all code_regex \(ACAD, replaceall_matched begin (ADP1, end;
#into all label ACAD set_label begin ADP1 end;

# Power fix - cause AppleACPIACAdapter to be loaded
into device name_hid ACPI0003 code_regex Name\s+\(_PRW,[\s\S]*\}\) remove_matched;
into device name_hid ACPI0003 insert
begin
Name (_PRW, Package() { 0x18, 0x03 })
end;

Credit to Rehabman,, then try to use VirtualSMC.kext and SMCBatteryManager.kext again.

The patchs will make your AppleACPIAdapter device (ACPI0003) to be loaded :)

or open your DSDT.aml with maciASL and search for ACPI0003,, then take a look at _STA method. make sure it's not "RETURN Zero" :D

I am not sure ACC2 is the ACAdapter device :D

Without ACAdapter device, then there is no battery :D


See this image below,, the ACAdapter device is "AC" with HID ACPI0003,, you must search device with HID = ACPI0003. it's your AC Adapter.  

image.png

Edited by Andres ZeroCross

Share this post


Link to post
Share on other sites
Advertisement
On 8/26/2018 at 12:31 PM, KGP-iMacPro said:

 

Thanks for the fix, @vit9696! Appreciated! 

 

My Skylake-X/X299 i9-7980XE (18 core)/ASUS Prime X299 Deluxe system now successfully boots without boot flag dart=0 and with all 3 sensor kexts included (no further KPs)...

 

However, still there seems to exist an issue with the sensor kext information or with the interface to iStat Menus... 

 

Let's just focus on the CPU sensor information, as there are anyway no sensor kexts yet for providing e.g. GPU and X299 onboard information:  

 

All I see under sensors.. 

 

  1309222997_Screenshot2018-08-26at05_56_28.png.fdd1e62afd662beedddc01c5a68a88a6.png

 

..is the average CPU Frequency, while the "average" CPU Temp always remains 0.. There is no information about CPU cores and heatsink temps, CPU cores and package frequencies , CPU cores and package multipliers or CPU Package power consumption, when compared with @interferenc 's perfectly working FakeSMC and HWSensor kext distribution. 

 

iStatMenues.thumb.png.c1f03543142964c11ed4387ffb44573b.png

 

Evidently, as yet there are no kexts for displaying GPU, onboard, memory or PSU properties, I am also missing information on CPU, RAM and PSU voltage and power consumption, fan rotation or GPU and mainboard temps.. 

 

Only thing currently working in iStat Menus is the delivered information on CPU thread utilisation, which is properly displayed for all 36 threads..  

 

1020143802_Screenshot2018-08-26at05_55_44.png.640c372165a35947957aedf85fe4fa4d.png     

 

769825963_Screenshot2018-08-26at05_56_12.png.027542dc20c1787637eaf3ff2461c5b1.png

 

although the latter also might be provided without adding any CPU sensor kext distribution.. 

 

I really hope that @interferenc's FakeSMC and HWSensor kext distribution linked in post 

 

might be of help for providing complete and correct sensor information also with your current and novel VirtualSMC distribution..  

Here are my DSDT and we can see ADP1 but it STA show return zero.QQ20181031-013507@2x.thumb.png.276d4b3d4a78a8b4548d595b9eb9d72a.png

 

So I need to delete the return zero?

Edited by gujiangjiang

Share this post


Link to post
Share on other sites
If ((ECON == One))
{
  Return (0xf)
}
Return (Zero)

Replace code above with this

 

Return (0xf)



Don't forget to add this patch with maciALS

 

# Power fix - cause AppleACPIACAdapter to be loaded
into device name_hid ACPI0003 code_regex Name\s+\(_PRW,[\s\S]*\}\) remove_matched;
into device name_hid ACPI0003 insert
begin
Name (_PRW, Package() { 0x18, 0x03 })
end;

Or just add (check below) inside device ADP1

 

Name (_PRW, Package() { 0x18, 0x03 })

 

Edited by Andres ZeroCross

Share this post


Link to post
Share on other sites
2 minutes ago, Andres ZeroCross said:

If ((ECON == One))
{
  Return (0xf)
}
Return (Zero)

Replace code above with this

 


Return (0xf)

 

 

OK i try  it now and thanks for your help. 

Share this post


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


Don't forget to add PRW Name to your device,, check my comment above. I edited it

Successfully and it's amazing!

 

I wrote a hotpatch to solve this problem and work well.

5176852B60D739B4E79FEB61B2AA87FD.thumb.jpg.0d41fef77c69c9e3fd3d2481440e19dd.jpg

 

59CB4BB2100B80C08618ED44751309F8.thumb.jpg.dc293688557730c28ccfd85b079c3b6a.jpg

 

0E4B629A3893E01257B360C417DEF812.thumb.jpg.4d3b2adbfe546f4160ee02d07b60f719.jpg

 

Thanks again and have a good day!

Edited by gujiangjiang

Share this post


Link to post
Share on other sites
4 minutes ago, gujiangjiang said:
Successfully and it's amazing!
 
I wrote a hotpatch to solve this problem and work well.
5176852B60D739B4E79FEB61B2AA87FD.thumb.jpg.0d41fef77c69c9e3fd3d2481440e19dd.jpg
 
59CB4BB2100B80C08618ED44751309F8.thumb.jpg.dc293688557730c28ccfd85b079c3b6a.jpg
 
0E4B629A3893E01257B360C417DEF812.thumb.jpg.4d3b2adbfe546f4160ee02d07b60f719.jpg
 
Thanks again and have a good day!

Why should rename ADP1 to ADPX??? It's not needed. And how about battery indicator???? Is it shown??

Sent from my Mi Note 2 using Tapatalk
 

Edited by Andres ZeroCross

Share this post


Link to post
Share on other sites
4 minutes ago, Andres ZeroCross said:

Why should rename ADP1 to ADPX??? It's not needed

Sent from my Mi Note 2 using Tapatalk
 

 

Because it has ADP1 in DSDT so we need to rename ADP1 to ADPX than to match SSDT-ADP1.aml.

Edited by gujiangjiang

Share this post


Link to post
Share on other sites
1 minute ago, gujiangjiang said:

 

Because it has ADP1 in DSDT so we need to rename ADP1 to ADPX than to match SSDT-ADP1.aml.

 

Why should you use SSDT-ADP1.aml????

Your ADPX is not loaded, you can see at IOREG. There is no ADPX device. SSDT-ADP1.aml just to make new adapter device with ZEROING original Adapter device at DSDT. But,,, that's the problem. Your SSDT-ADP1.aml is not function normally. You can see it at IOREG. I don't know what's code at SSDT-ADP1.aml. But you can check it, what device name is written as AC Adapter device :D

Sorry for bad english

Share this post


Link to post
Share on other sites
2 minutes ago, Andres ZeroCross said:

Why should you use SSDT-ADP1.aml????

Your ADPX is not loaded, you can see at IOREG. There is no ADPX device. SSDT-ADP1.aml just to make new adapter device with ZEROING original Adapter device at DSDT. But,,, that's the problem. Your SSDT-ADP1.aml is not function normally. You can see it at IOREG. I don't know what's code at SSDT-ADP1.aml. But you can check it, what device name is written as AC Adapter device :D

Sorry for bad english

 

i want to disable ADP1 in DSDT so i rename it to ADPX to avoid it to load and make a SSDT-ADP1 to load.

 

Here are my SSDT-ADP1.

 

59CB4BB2100B80C08618ED44751309F8.thumb.jpg.1c8b2f968c7dd352945069d245cc0f3c.jpg

 

And i test more and found we dont need PRW patch,

It just need remove RETURN ZERO then it works.

 

Need more test.

Edited by gujiangjiang

Share this post


Link to post
Share on other sites
4 minutes ago, gujiangjiang said:

 

i want to disable ADP1 in DSDT so i rename it to ADPX to avoid it to load and make a SSDT-ADP1 to load.

 

Here are my SSDT-ADP1.

 

59CB4BB2100B80C08618ED44751309F8.thumb.jpg.1c8b2f968c7dd352945069d245cc0f3c.jpg

 

 

LOL, why you make it too difficult.

You make it strange :D

Just edit _STA method of your ADP1 at DSDT.aml,, and add NAME PRW at ADP1 device too at your DSDT. Then remove SSDT-ADP1.aml. You don't need this aml :D

image.png

 

And don't forget to delete Hotpatch ADP1 to ADPX,, you don't need this. It's like throw good ice cream then buy same ice cream. It's useless bro :)

Edited by Andres ZeroCross

Share this post


Link to post
Share on other sites
Just now, Andres ZeroCross said:

 

 

LOL, why you make it too difficult.

You make it strange :D

Just edit _STA method of your ADP1 at DSDT.aml,, and add NAME PRW at ADP1 device too at your DSDT. Then remove SSDT-ADP1.aml. You don't need this aml :D

image.png

 

Yes but i dont touch DSDT so i use hotpatch to replace it.

Just like here.

https://www.tonymacx86.com/threads/guide-using-clover-to-hotpatch-acpi.200137/

Share this post


Link to post
Share on other sites
5 minutes ago, gujiangjiang said:

 

Yes but i dont touch DSDT so i use hotpatch to replace it.

Just like here.

https://www.tonymacx86.com/threads/guide-using-clover-to-hotpatch-acpi.200137/


if you 

 

5 minutes ago, gujiangjiang said:

 

Yes but i dont touch DSDT so i use hotpatch to replace it.

Just like here.

https://www.tonymacx86.com/threads/guide-using-clover-to-hotpatch-acpi.200137/

 

 

I know,,

But for me it's strange. It's like kill old ones, and make new ones with same device. You make clover to patch your DSDT, then load your SSDT. How about just "LOAD" your DSDT + SSDT configuration with less use of clover patch / hot patch. 

But, as long as your device has good perfomance then good luck :thumbsup_anim:

Edited by Andres ZeroCross

Share this post


Link to post
Share on other sites
Just now, Andres ZeroCross said:


if you 

 

 

 

I know,,

But for me it's strange. It's like kill old ones, and make new ones with same device. You make clover to patch your DSDT, then load your SSDT. How about just "LOAD" your DSDT + SSDT configuration with less use of clover patch / hot patch. 

 

In my opinion the hotpatch can reduce the error when update bios or some hardware change and easy to maintain such as when we change HDA we just need to change the SSDT-HDA and dont touch any DSDT.

It dont need DSDT.aml in patched folder.

 

another example was disable dGPU.To change DSDT was  too complex but when hotpatch we just need add SSDT-dGPU and it will be OK.

 

It just my own opinion and you can try it.

https://github.com/RehabMan/OS-X-Clover-Laptop-Config/tree/master/hotpatch

Share this post


Link to post
Share on other sites
1 minute ago, gujiangjiang said:

 

In my opinion the hotpatch can reduce the error when update bios or some hardware change and easy to maintain such as when we change HDA we just need to change the SSDT-HDA and dont touch any DSDT.

It dont need DSDT.aml in patched folder.

 

another example was disable dGPU.To change DSDT was  too complex but when hotpatch we just need add SSDT-dGPU and it will be OK.

 

It just my own opinion and you can try it.

https://github.com/RehabMan/OS-X-Clover-Laptop-Config/tree/master/hotpatch

 

I already use DSDT + SSDT-0.aml.

my SSDT-0.aml is include all patch and cosmetic.

Take a look at my SSDT-0.aml
image.thumb.png.4903951bc04e784e68a39554fd61e89a.png

 

And take a look at my "clean acpi patch of config.plist" :D
image.thumb.png.069ca40f4421236c49d56527c76eba9b.png
 

Share this post


Link to post
Share on other sites
13 minutes ago, Andres ZeroCross said:

 

I already use DSDT + SSDT-0.aml.

my SSDT-0.aml is include all patch and cosmetic.

Take a look at my SSDT-0.aml
image.thumb.png.4903951bc04e784e68a39554fd61e89a.png

 

And take a look at my "clean acpi patch of config.plist" :D
image.thumb.png.069ca40f4421236c49d56527c76eba9b.png
 

 

Yes it was same as Hotpatch and you merge all patched SSDT to single SSDT-0.aml and i use individual SSDT to make it work.

But i dont have DSDT.aml in my patched folder and i dont touch DSDT file and using a fly-patch way to make it work and it can make DSDT origin and can avoid some problem when update BIOS or change some hardware which may could DSDT file change.

 

PS:

I have a new hotpatch with the ADP1 and i only rename _STA to XSTA in ADP1 and wrote a new SST-ADPi and only with correct _STA and tested fine.

It dont need PRW patch anymore in my laptop.

D44ADE634128B092F5EE5B0DA39BD84F.thumb.jpg.87316b2b951dacaa2a479d0cf9fd0e93.jpg

Share this post


Link to post
Share on other sites
7 minutes ago, gujiangjiang said:

 

Yes it was same as Hotpatch and you merge all patched SSDT to single SSDT-0.aml and i use individual SSDT to make it work.

But i dont have DSDT.aml in my patched folder and i dont touch DSDT file and using a fly-patch way to make it work and it can make DSDT origin and can avoid some problem when update BIOS or change some hardware which may could DSDT file change.

 

PS:

I have a new hotpatch with the ADP1 and i only rename _STA to XSTA in ADP1 and wrote a new SST-ADPi and only with correct _STA and tested fine.

It dont need PRW patch anymore in my laptop.

D44ADE634128B092F5EE5B0DA39BD84F.thumb.jpg.87316b2b951dacaa2a479d0cf9fd0e93.jpg



Just for information

1. Not every update of bios use same name of device and same code
2. Your method can't be used for all device,, Example : Notebook with I2C device need DSDT patch (you cannot rename it, because many dependency), and asus, some lenovo notebook use diferent patch related to battery (need to patch byte field more then 8),, 

But everybody has different ways,,, as long as good, then keep it :D

Share this post


Link to post
Share on other sites
11 minutes ago, Andres ZeroCross said:



Just for information

1. Not every update of bios use same name of device and same code
2. Your method can't be used for all device,, Example : Notebook with I2C device need DSDT patch (you cannot rename it, because many dependency), and asus, some lenovo notebook use diferent patch related to battery (need to patch byte field more then 8),, 

But everybody has different ways,,, as long as good, then keep it :D

 

Thanks for your help.

Good night.

ahhhh

:D

Share this post


Link to post
Share on other sites

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

How to disable VirtualSMC verbose printing? Thanks

 

Edited by Trung_Nguyen

Share this post


Link to post
Share on other sites

Kernel Panics are back with the latest release. Now they happen on every boot. Funny thing: Once I boot verbose it does boot without any panic. So I use this as a workaround for now.

Share this post


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

Should I use one or some kexts in particular or just detect them and can we see them in HWmonitor?
Thank you.

 

You will need these the kexts for you desktop.

1536794352_2018-11-0318_51_19.png.df8f2540f53bde3546f457cd68a8b0ee.png

 

Use HWMonitorSMC2 or iStat Menus.

Install Intel® Power Gadget too.

 

747419260_2018-11-0319_00_07.thumb.png.8e16f92aaac0b28888450faa23a6aca5.png802910990_2018-11-0319_05_12.png.04cce4fe9637c31ce08fc9a669b8da0e.png

 

 

 

Edited by Andrey1970

Share this post


Link to post
Share on other sites

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
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

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.

×