seerge / g-helper

Lightweight Armoury Crate alternative for Asus laptops and ROG Ally. Control tool for ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, TUF, Strix, Scar and other models
https://g-helper.com
GNU General Public License v3.0
7.92k stars 276 forks source link

Endpoint discovery for different laptop models #38

Open seerge opened 1 year ago

seerge commented 1 year ago

Hello, recently I have discovered endpoints that let you set Total PPT and CPU PPT on 2022 models. Armory seem to use them as well.

I did that by running own app-script that literally sent DSTS (asus'es "get device status") command to all possible DeviceID's in asus ACPI and checking which one's would respond at least somehow :)

Then by just trying to set a new value (with DEVS "set device status") command to a few discovered DeviceIDs correct endpoints were found.

0x001200A0 - sPPT / PL2 almost everywhere ( Total Platform limit  on all AMD platforms )
0x001200A1 - EDC_LIMIT_VDD
0x001200A2 - TDC_LIMIT_VDD
0x001200A3 - SPL / PL1 

0x001200B0 - CPU limit on all AMD platforms
0x001200B1 -  sPPT / PL2

0x001200C0 - NVIDIA GPU dynamic boost 5W ... 25W
0x001200C1 - fPPT
0x001200C2 - NVIDIA GPU temp limit 75C ... 87C

It could be that on other models (non G14) this endpoints could adjust different settings.

Discover endpoints Method 1

Run this ps1 scan-atkacpi.zip as admin in powershell and post output here

Discover endpoints Method 2

Crate a dump and upload it here (as suggested by @vddCore )

  1. Download ACPICA tools. Extract into some folder.

  2. Open that folder in powershell and run ./acpidump.exe -b to dump them all to .dat files. They'll be placed in the location you ran the tool from.

  3. Then run ./iasl.exe dsdt.dat and the decompiled ACPI table will be created as dsdt.dsl. Zip it and upload here.

How to test what discovered endpoints do

Run following command in powershell as admin:

Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -ClassName AsusAtkWmi_WMNB) -MethodName DEVS -Arguments @{Device_ID=0x1200C1; Control_status=25}

Where DeviceID is ID from the list (for example 0x1200B0, 0x1200B1, 0x1200C0, 0x1200C1, 0x1200C2)

And Control_status is the "value" , try something like 25 or 50 or 100 ... :) (on your own risk, but most probably bios will just hardcap some potentially high values)

Then you can just run some CPU / GPU intensive task and check in HWinfo if it has any effect on PPTs / clocks / etc

hkaancaliskan commented 1 year ago

Nah SPPT was set to 24W and cpu run at 24W as expected and after 2 minutes of boost it went back to SPL wattage which is 16W. All these changes happened for CPU PPT, no relevant change at APU.

hkaancaliskan commented 1 year ago

As you can see A3 is APU

resim resim

seerge commented 1 year ago

Ok, well then I will just rename Total slider to CPU (or SPPT) in next build for 2021 model, that should be it :)

hkaancaliskan commented 1 year ago

@seerge btw as we're setting just cpu for 2021 models, maybe we can reduce min value for A0 to 5w because i can use my laptop at 5w without problem, below 5 hardcore stutters start. WDYT?

seerge commented 1 year ago

yes, i can lower slider to 5w, np

seerge commented 1 year ago

Ok, it's live https://github.com/seerge/g-helper/releases/tag/v0.28 @hkaancaliskan

TomBonnot commented 1 year ago

Just to try with the GPU thingy. I think it could be possibly : 1200a0 CPU PPT 1200a1 : ? 1200a2 : ? 1200a3 : APU as @hkaancaliskan said 130021 : Possibly GPU Base Clock Offset 130022 : Possibly GPU Memory Clock Offset

If it’s offset then setting like 100 could be right. But if it is overall Base Clock and Memory Clock, setting it at 100 could be fatal

Do you think we could try it ?

TomBonnot commented 1 year ago

Well 130021 doesn’t work anyway, but 130022 works

seerge commented 1 year ago

@TomBonnot cool, how do you test that ? (it doesn't seem to work for 2022 tho)

TomBonnot commented 1 year ago

Well when I say that it works is that 130021 returns 42xxxxxx but 130022 returns 1 But Seriously, I am trying with heavy 3D games and it doesn’t seem to change anything. This is weird At least I am only checking the dGPU

TomBonnot commented 1 year ago

Fuck knows what but my best way to test highest Memory clock and Base Clock settings is having minecraft with shaders on background (not focused, but background, even Heaven doesn’t burn it, nor Furkmark) so here we go, I will try various settings

TomBonnot commented 1 year ago

Wait, 120075, each time I do apply something I have a micro freeze (like half a second, even less) that I can hear because the music stops and restart right after it.

120095 DOENS’T appear in the results, but when I apply 150 it does return 1

Is there in any way something we are missing about those results of your scripts ?

seerge commented 1 year ago

Yeah, some IDs may not answer something normal (and therefore not appear in a script), but still exist ofc

TomBonnot commented 1 year ago

I can’t find anything, I’ve tried various 130021 : 42 130022 : Works but need to figure what it is 120057 : Works but need to figure what it is 120061 : 42 12006c : 42 120075 : Works but need to figure what it is 120079 : 42 12007a : 42 120093 : 42 120095 : Works but need to figure what it is 120096 : 42 120097 : 42 110013 : Error Generic Failure

seerge commented 1 year ago

@ramius86 you have a full package on your rog-strix

1200a0 : 0 (0)
1200a3 : 0 (0)
1200b0 : 0 (0)
1200c0 : 0 (0)
1200c1 : 0 (0)
1200c2 : 0 (0)

So PPTs limits should work for you.

Also there something new (may be GPU clock offsets?)

130031 : ffff0000 (-65536)
130041 : ffffffffffff0000 (-65536)

If you are feeling adventurous (and on your risk!) - you can try to set some values here with running

Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -ClassName AsusAtkWmi_WMNB) -MethodName DEVS -Arguments @{Device_ID=0x130031; Control_status=SOMTETHING}

Where SOMTETHING- is desired offset value.

ramius86 commented 1 year ago

Asus G15 2022 g513rw-hq098w ( amd 6900HX & nvidia 3070ti )

60024 : 8c308086 (2351988870) 60061 : ffffffffffff0000 (-65536) 60094 : 3 (3) 60095 : 1 (1) 60096 : ffff0000 (-65536) 80041 : ffffffffffff0000 (-65536) 80042 : 0 (0) 80043 : ffffffffffff0000 (-65536) 90014 : 0 (0)
90016 : 1 (1) 90020 : 0 (0) 90030 : 50 (80) 100031 : ffff0000 (-65536) 100051 : 1 (1) 100054 : 0 (0) 100055 : 4 (4) 100058 : 310 (784) 110013 : 0 (0) 110014 : 0 (0) 110015 : ffffffffffff0000 (-65536) 110022 : ffff0000 (-65536) 110023 : ffff0000 (-65536) 110024 : ffff0000 (-65536) 110025 : ffff0000 (-65536) 110026 : ffffffffffff0000 (-65536) 110027 : ffffffffffff0000 (-65536) 120057 : 80000 (524288) 120061 : 20001 (131073) 12006c : 1 (1) 12006d : 0 (0) 120072 : fffeffff (4294901759) 120075 : ffff0000 (-65536) 120076 : ffffffffffff0000 (-65536) 120077 : ffffffffffff0000 (-65536) 120079 : ffff0000 (-65536) 12007a : 0 (0) 120093 : 82 (130) 120094 : 3a (58) 120095 : 0 (0) 120097 : 0 (0) 1200a0 : 0 (0) 1200a3 : 0 (0) 1200b0 : 0 (0) 1200c0 : 0 (0) 1200c1 : 0 (0) 1200c2 : 0 (0) 130021 : 2 (2) 130022 : 0 (0) 130026 : 1 (1) 130031 : ffff0000 (-65536) 130041 : ffffffffffff0000 (-65536)

ramius86 commented 1 year ago

Ok I've tried set a value of 100 Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -ClassName AsusAtkWmi_WMNB) -MethodName DEVS -Arguments @{Device_ID=0x130031; Control_status=100}

result ReturnValue PSComputerName


4294967294 True

but running again the scan made no difference, value for 130031 is always the same as up here, will try test some stuff later

seerge commented 1 year ago

@ramius86 big number like 4294967294 True means that it doesn't work :) but thanks for trying

As for running the scan, it's always returns same value (even for endpoints that work). I can only send hello to asus bios here :D

luckyth13teen commented 1 year ago

output:

60023 : ffffffffffff0004 (-65532)
60024 : a36c8086 (2741796998) 
60026 : 0 (0)
60061 : ffffffffffff0000 (-65536)
60094 : 6 (6)
80041 : ffffffffffff0000 (-65536)
80042 : ffffffffffff0000 (-65536)
80043 : ffffffffffff0000 (-65536)                                  
80044 : ffffffffffff0000 (-65536)                                                                                       
90020 : 0 (0)                                                                                                          
90030 : cc (204)                                                                                                        
100051 : 1 (1)                                                                                                          
110013 : 24 (36)                                                                                                        
110014 : 1d (29)                                                                                                        
110015 : ffffffffffff0000 (-65536)                                                                                     
 110016 : ffffffffffff0000 (-65536)                                                                                      
110022 : a7 (167)                                                                                                       
110023 : b6 (182)                                                                                                       
Invoke-CimMethod : Generic failure                                                                                      At line:5 char:20                                                                                                       + ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...                                         +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                 + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimExc     eption                                                                                                                   + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand                                                                                                                          110024 : ffff0000 (-65536)                                                                                              Invoke-CimMethod : Generic failure                                                                                      At line:5 char:20                                                                                                       + ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...                                         +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                 + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimExc     eption
    + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand

110025 : ffff0000 (-65536)
110026 : ffffffffffff0000 (-65536)
110027 : ffffffffffff0000 (-65536)
120057 : 80000 (524288)
120061 : 1 (1)
12006c : 1 (1)
120075 : 3 (3)
120079 : 578 (1400)
12007a : 0 (0)
120093 : 50 (80)
120094 : 4a (74)
120095 : 0 (0)
120096 : 0 (0)
120097 : 30 (48)
1200a0 : 0 (0)
1200a1 : 0 (0)
1200a2 : 0 (0)
1200a3 : 0 (0)
130021 : 2 (2)
130022 : 0 (0)

environment edited for security:

Host Name:                 
OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22621 N/A Build 22621
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          
Registered Organization:  
Product ID:               
Original Install Date:     12/7/2022, 3:06:13 PM
System Boot Time:          3/22/2023, 6:53:04 PM
System Manufacturer:       ASUSTeK COMPUTER INC.
System Model:              ROG Zephyrus G15 GA503QR_GA503QR
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: AMD64 Family 25 Model 80 Stepping 0 AuthenticAMD ~3301 Mhz
BIOS Version:              American Megatrends International, LLC. GA503QR.413, 11/3/2021

System Locale:             en-us;English (United States)
Input Locale:              en-us;English (United States)

Total Physical Memory:     23,968 MB
Available Physical Memory: 12,207 MB
Virtual Memory: Max Size:  39,328 MB
Virtual Memory: Available: 19,540 MB
Virtual Memory: In Use:    19,788 MB

Hotfix(s):                 5 Hotfix(s) Installed.
                           [01]: KB5022497
                           [02]: KB5012170
                           [03]: KB5023706
                           [04]: KB5022610
                           [05]: KB5022948
Network Card(s):           3 NIC(s) Installed.
                           [01]: Realtek Gaming GbE Family Controller
                                 Connection Name: Ethernet
                                 DHCP Enabled:    Yes
                                 DHCP Server:     192.168.0.1
                                 IP address(es)

                           [02]: Intel(R) Wi-Fi 6E AX210 160MHz
                                 Connection Name: Wi-Fi 2
                                 Status:          Media disconnected
                           [03]: Bluetooth Device (Personal Area Network)
                                 Connection Name: Bluetooth Network Connection 2
                                 Status:          Media disconnected
Hyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.
marcelomijas commented 1 year ago

Wait, 120075, each time I do apply something I have a micro freeze (like half a second, even less) that I can hear because the music stops and restart right after it.

120095 DOENS’T appear in the results, but when I apply 150 it does return 1.

Is there in any way something we are missing about those results of your scripts ?

@TomBonnot , 120075 could be the thermal throttle of the CPU (I think). I tried values from 0 to 3 (default on my G14 2020) and the only thing I noted is that the fans changed speed, spinning notably faster when the value is set to 1. Found the clue here: https://github.com/zllovesuki/G14Manager/blob/main/system/atkacpi/wmi.go, as is reffered with "DevsThrottleCtrl".

About the GPU memory and base clocks, I installed AC and changed the OC settings to see if they have an effect on 130021 or 130022, but no change.

Also, @seerge , I checked the fans speed at 100% with AC, it is 7800RPM for the CPU fan and 7800RPM (sometimes 7700RPM) for the GPU fan. (I also have screenshots if you want to corroborate)

So far, in my G14 2020 model GA401IV-HE003 (Ryzen 7 and RTX2060), I have:

60023 : ffffffffffff0004 (-65532)
60024 : a36c8086 (2741796998)
60026 : 0 (0)
60061 : ffffffffffff0000 (-65536)
80041 : ffffffffffff0000 (-65536)
80042 : ffffffffffff0000 (-65536)
80043 : ffffffffffff0000 (-65536)
80044 : ffffffffffff0000 (-65536)
100051 : 1 (1)
110013 : 1a (26)                    # CPU_Fan
110014 : 1e (30)                    # GPU_Fan
110015 : ffffffffffff0000 (-65536)
110016 : ffffffffffff0000 (-65536)
110022 : 99 (153)
110023 : ac (172)
110024 : ffff0000 (-65536)          # DevsCPUFanCurve
110025 : ffff0000 (-65536)          # DevsGPUFanCurve
110026 : ffffffffffff0000 (-65536)
110027 : ffffffffffff0000 (-65536)
120057 : 80000 (524288)             # BatteryLimit
120061 : 1 (1)
12006c : 1 (1)                      # DstsCheckCharger
120075 : 3 (3)                      # DevsThrottleCtrl (??? Thermal throttle)
130021 : 2 (2)                      # ??? NOT GPU Base clock offset (TRIED WITH ARMOURY)
130022 : 0 (0)                      # ??? NOT GPU Memory clock offset (TRIED WITH ARMOURY)
seerge commented 1 year ago

@marcelomijas 120075 is the main endpoint of the whole app. It's how performance mode (balanced - 0 /turbo - 1/silent 2) is set :) (i.e. it's already known) As for the fan speeds - i can adjust Y-scale on chart with your values. How is your model called ?

marcelomijas commented 1 year ago

@seerge Oh, sorry XD. I had a little bit of time today and I am discovering a new world here.

My model is called GA401IV. If you need more specifics, the subvariant: GA401IV-HE003 (Asus ROG Zephyrus G14 2020 AMD Ryzen 7 4800HS and NVIDIA RTX 2060 Max-Q)

Thanks! :)

mrjmg commented 1 year ago

My GA503QS (G15 2021 white model so w/o Animatrix stuff, 5900HS + 3080), Freshly re-installed Win11 today with g-helper instead of AC - I'm so happy with it! Here is the output of the script:

60023 : ffffffffffff0004 (-65532)
60024 : a36c8086 (2741796998)
60026 : 0 (0)
60061 : ffffffffffff0000 (-65536)
60094 : 6 (6)
80041 : ffffffffffff0000 (-65536)
80042 : ffffffffffff0000 (-65536)
80043 : ffffffffffff0000 (-65536)
80044 : ffffffffffff0000 (-65536)
90020 : 1 (1)
90030 : c0 (192)
100051 : 1 (1)
110013 : 0 (0)
110014 : 0 (0)
110015 : ffffffffffff0000 (-65536)
110016 : ffffffffffff0000 (-65536)
110022 : a7 (167)
110023 : b6 (182)
Invoke-CimMethod : Generic failure
At C:\apps\scan-atkacpi.ps1:5 char:20
+ ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand

110024 : ffff0000 (-65536)
Invoke-CimMethod : Generic failure
At C:\apps\scan-atkacpi.ps1:5 char:20
+ ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand

110025 : ffff0000 (-65536)
110026 : ffffffffffff0000 (-65536)
110027 : ffffffffffff0000 (-65536)
120057 : 80000 (524288)
120061 : 0 (0)
12006c : 0 (0)
120075 : 3 (3)
120079 : 2ce (718)
12007a : 0 (0)
120093 : 50 (80)
120094 : 2b (43)
120095 : 0 (0)
120096 : 0 (0)
120097 : 25 (37)
1200a0 : 0 (0)
1200a1 : 0 (0)
1200a2 : 0 (0)
1200a3 : 0 (0)
130021 : 2 (2)
130022 : 0 (0)
manciuszz commented 1 year ago

Ran into some issues launching the script, but found a fix.

The error was:

Write-Progress : Win32 internal error "Access is denied" 0x5 occurred while reading the console output buffer. Contact Microsoft Customer Support Services.out-lineoutput : Win32 internal error "Access is denied" 0x5 occurred while reading the console output buffer. Contact Microsoft Customer Support Services.
    + CategoryInfo          : ReadError: (:) [out-lineoutput], HostException
    + FullyQualifiedErrorId : ReadConsoleOutput,Microsoft.PowerShell.Commands.OutLineOutputCommand

The fix:

$ProgressPreference = "SilentlyContinue"
for ($i = 0x60000; $i -le 0x160000; $i+=0x10000 ) {
    for ($j = 0x00; $j -le 0xFF; $j++) {
        $device_id = $i+$j;

        $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -ClassName AsusAtkWmi_WMNB) -MethodName DSTS -Arguments @{Device_ID=$device_id} | Select-Object -ExpandProperty device_status) - 65536
        if ($result -ne 4294901758) {
            Write-Output "$([System.Convert]::ToString($device_id,16)) : $([System.Convert]::ToString($result,16)) ($([System.Convert]::ToString($result)))";      
        } else {
            Write-Progress -Activity "Checking ID: $([System.Convert]::ToString($device_id,16))"
        }

    }
}

ASUS ROG SCAR 17 G732LXS (i7-10875H & RTX 2080 SUPER 150W)

60023 : ffffffffffff0004 (-65532)
60024 : a36c8086 (2741796998)
60026 : 0 (0)
60061 : ffffffffffff0000 (-65536)
80041 : ffffffffffff0000 (-65536)
80042 : 0 (0)
80043 : ffffffffffff0000 (-65536)
80044 : ffffffffffff0000 (-65536)
100051 : 1 (1)
100054 : ffffffffffff0000 (-65536)
100055 : 0 (0)
110013 : 18 (24)
110014 : 17 (23)
110015 : 0 (0)
110016 : ffffffffffff0000 (-65536)
110022 : 8a (138)
110023 : a2 (162)
Invoke-CimMethod : Generic failure
At line:5 char:20
+ ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand

110024 : ffff0000 (-65536)
Invoke-CimMethod : Generic failure
At line:5 char:20
+ ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand

110025 : ffff0000 (-65536)
110026 : ffffffffffff0000 (-65536)
110027 : ffffffffffff0000 (-65536)
120057 : 80000 (524288)
120061 : 1 (1)
12006c : ffffffffffff0000 (-65536)
120075 : 3 (3)
120091 : 0 (0)
120092 : 0 (0)
120093 : 96 (150)
130021 : 2 (2)
130022 : 0 (0)
130031 : 1 (1)

Would love to see the power sliders for this model on this great Armoury Crate alternative!

vddCore commented 1 year ago

Your discovery process could be improved.

See https://github.com/vddCore/Zephyrus-Control-Center/blob/master/Slate/Infrastructure/Services/AsusHalService.cs#L207 all the way down to line 367, then dump the tables, after which you can decompile them with https://acpica.org/downloads/binary-tools. The only tables we're looking for are the DSDT and the multitude of SSDT tables.

You can then use Visual Studio Code with ACPI ASL extension to analyze the resulting files. This will help us all get a clearer picture of what each register does in detail on every laptop involved.

seerge commented 1 year ago

@vddCore cool, thanks :) my DSDT, but most probably it's same as yours on same G14 2022 DSDT.zip

All the power-limit related stuff

                    If ((IIA0 == 0x001200A0))
                    {
                        Name (PLTW, Buffer (One)
                        {
                             0x00                                             // .
                        })
                        PLTW [Zero] = IIA1 /* \_SB_.ATKD.WMNB.IIA1 */
                        Return (^^PCI0.SBRG.EC0.WEBC (0x28, One, PLTW))
                    }

                    If ((IIA0 == 0x001200A1))
                    {
                        Return (^^PCI0.SBRG.EC0.EDCV (IIA1))
                    }

                    If ((IIA0 == 0x001200A2))
                    {
                        Return (^^PCI0.SBRG.EC0.TDCV (IIA1))
                    }

                    If ((IIA0 == 0x001200A3))
                    {
                        Name (PLON, Buffer (One)
                        {
                             0x00                                             // .
                        })
                        PLON [Zero] = IIA1 /* \_SB_.ATKD.WMNB.IIA1 */
                        Return (^^PCI0.SBRG.EC0.WEBC (0x29, One, PLON))
                    }

                    If ((IIA0 == 0x001200B0))
                    {
                        Name (PLAO, Buffer (One)
                        {
                             0x00                                             // .
                        })
                        PLAO [Zero] = IIA1 /* \_SB_.ATKD.WMNB.IIA1 */
                        Return (^^PCI0.SBRG.EC0.WEBC (0x39, One, PLAO))
                    }

                    If ((IIA0 == 0x001200B1))
                    {
                        Name (PLPS, Buffer (One)
                        {
                             0x00                                             // .
                        })
                        PLPS [Zero] = IIA1 /* \_SB_.ATKD.WMNB.IIA1 */
                        Return (^^PCI0.SBRG.EC0.WEBC (0x38, One, PLPS))
                        AL20 = 0x0CCD
                        AL21 = 0x0CCD
                        AL22 = 0x2400
                        AL23 = 0x2F00
                        AL24 = 0x21
                        AL25 = 0x1999
                        AL26 = 0x2E
                        AL27 = 0x0306
                        AL28 = 0xFF78
                        AL29 = 0xFF92
                        AL2A = 0x0470
                        AL2B = 0xA0
                        AL2C = 0x06E1
                        AL2D = 0xF605
                        AL2E = 0x0001C138
                        SSZE = 0x07
                        MSID = 0x20
                        DECI = AL20 /* \_SB_.ATKD.WMNB.AL20 */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x21
                        DECI = AL21 /* \_SB_.ATKD.WMNB.AL21 */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x22
                        DECI = AL22 /* \_SB_.ATKD.WMNB.AL22 */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x23
                        DECI = AL23 /* \_SB_.ATKD.WMNB.AL23 */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x24
                        DECI = AL24 /* \_SB_.ATKD.WMNB.AL24 */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x25
                        DECI = AL25 /* \_SB_.ATKD.WMNB.AL25 */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x26
                        DECI = AL26 /* \_SB_.ATKD.WMNB.AL26 */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x27
                        DECI = AL27 /* \_SB_.ATKD.WMNB.AL27 */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x28
                        DECI = AL28 /* \_SB_.ATKD.WMNB.AL28 */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x29
                        DECI = AL29 /* \_SB_.ATKD.WMNB.AL29 */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x2A
                        DECI = AL2A /* \_SB_.ATKD.WMNB.AL2A */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x2B
                        DECI = AL2B /* \_SB_.ATKD.WMNB.AL2B */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x2C
                        DECI = AL2C /* \_SB_.ATKD.WMNB.AL2C */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x2D
                        DECI = AL2D /* \_SB_.ATKD.WMNB.AL2D */
                        ALIB (0x0C, DPTI)
                        SSZE = 0x07
                        MSID = 0x2E
                        DECI = AL2E /* \_SB_.ATKD.WMNB.AL2E */
                        ALIB (0x0C, DPTI)
                    }

                    If ((IIA0 == 0x001200C1))
                    {
                        Name (PLFW, Buffer (One)
                        {
                             0x00                                             // .
                        })
                        PLFW [Zero] = IIA1 /* \_SB_.ATKD.WMNB.IIA1 */
                        Return (^^PCI0.SBRG.EC0.WEBC (0x2D, One, PLFW))
                    }
TomBonnot commented 1 year ago

Do you need us to do the same ? It seems way more accurate, thank you @vddCore

seerge commented 1 year ago

Another cool finding that @vddCore has discovered btw is that

**120094** - is actually a CPU temp :D
**120097** - is GPU temp (even tho it seems to be absent on some older devices)

Indeed "if you want to hide something - hide it in a plain sight" is so true 😄

vddCore commented 1 year ago

I've documented and interfaced quite a few proprietary things over here: https://github.com/vddCore/Zephyrus-Control-Center/blob/master/Slate/Infrastructure/Asus/

Feel free to look around, maybe you'll find something useful. If you look at DstsMethod.cs enumeration you'll also notice you can directly drive GA402 fans independently of the fan curves. From other curious things, you can also ask the embedded controller to simulate hardware keypresses like they were pressed by the user.

Caveat, though: since both fan curves and direct fan drive use the same memory area, you cannot mix the usage of fan control registers. It's either direct control for both, or fan curve for both.

seerge commented 1 year ago

@vddCore cool, the keypresses i use to set keyboard brightness lower on battery and back when plugged already :)

vddCore commented 1 year ago

You're better off directly telling the keyboard to do that for you, as the keypress handling is reliant on AsusOptimization, which ideally we'd like to get rid of completely down the line. Plus, allows you to better control the thing. https://github.com/vddCore/Starlight/blob/master/Starlight/Asus/Aura/AuraDevice.cs#L15

The protocol seems to be consistent between devices even though the hardware device IDs for keyboards on different laptops might differ. If we look hard enough there might be a way to ask the keyboard for its current state, but as of now I do not have enough information to be helpful in that regard.

seerge commented 1 year ago

@vddCore i was referring to linux implementation and they had 0x5a, 0xba, 0xc5, 0xc4, as payload - which didn't work (5a instead of yours 5d). 5d works, just checked :) thanks

govarthenan commented 1 year ago

Run this ps1 script as admin in powershell

scan-atkacpi.zip

for ($i = 0x60000; $i -le 0x160000; $i+=0x10000 ) {
    for ($j = 0x00; $j -le 0xFF; $j++) {
        $device_id = $i+$j;

        $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -ClassName AsusAtkWmi_WMNB) -MethodName DSTS -Arguments @{Device_ID=$device_id} | Select-Object -ExpandProperty device_status) - 65536
        if ($resu
lt -ne 4294901758) {
            Write-Output "$([System.Convert]::ToString($device_id,16)) : $([System.Convert]::ToString($result,16)) ($([System.Convert]::ToString($result)))";      
        } else {
            Write-Progress -Activity "Checking ID: $([System.Convert]::ToString($device_id,16))"
        }

    }
}

Here's the output from my Strix G17 2021 (G713QR-ES96)

(base) PS C:\Windows\system32> cd ..\..\Users\govar\Downloads\                                                                                                                                                                                                                 (base) PS C:\Users\govar\Downloads> .\scan-atkacpi.ps1                                                                                                                                                                                                                         60023 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                              60024 : 8c308086 (2351988870)                                                                                                                                                                                                                                                  60026 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                              60061 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                              60091 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                              60093 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                              60094 : 3 (3)                                                                                                                                                                                                                                                                  80041 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                              80042 : 0 (0)                                                                                                                                                                                                                                                                  80043 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                              90014 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                              90016 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                              90020 : 0 (0)                                                                                                                                                                                                                                                                  90030 : 40 (64)                                                                                                                                                                                                                                                                Invoke-CimMethod : Generic failure                                                                                                                                                                                                                                             At C:\Users\govar\Downloads\scan-atkacpi.ps1:5 char:20                                                                                                                                                                                                                         + ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...                                                                                                                                                                                                +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                                        + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException                                                                                                                                                       + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand                                                                                                                                                                                                                                                                                                                                                                                                                                        100031 : ffff0000 (-65536)                                                                                                                                                                                                                                                     100051 : 1 (1)                                                                                                                                                                                                                                                                 100054 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                             100055 : 8 (8)                                                                                                                                                                                                                                                                 100056 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                             100057 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                             100058 : 310 (784)                                                                                                                                                                                                                                                             100059 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                             110011 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                             110013 : 21 (33)                                                                                                                                                                                                                                                               110014 : 1e (30)                                                                                                                                                                                                                                                               110015 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                             110016 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                             110018 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                             110021 : ffffffffffff0000 (-65536)                                                                                                                                                                                                                                             Invoke-CimMethod : Generic failure                                                                                                                                                                                                                                             At C:\Users\govar\Downloads\scan-atkacpi.ps1:5 char:20                                                                                                                                                                                                                         + ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...                                                                                                                                                                                                +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                                        + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException                                                                                                                                                       + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand                                                                                                                                                                                                                                                                                                                                                                                                                                        110022 : ffff0000 (-65536)                                                                                                                                                                                                                                                     Invoke-CimMethod : Generic failure                                                                                                                                                                                                                                             At C:\Users\govar\Downloads\scan-atkacpi.ps1:5 char:20                                                                                                                                                                                                                         + ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...                                                                                                                                                                                                +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                                        + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException                                                                                                                                                       + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand                                                                                                                                                                                                                                                                                                                                                                                                                                        110023 : ffff0000 (-65536)                                                                                                                                                                                                                                                     Invoke-CimMethod : Generic failure                                                                                                                                                                                                                                             At C:\Users\govar\Downloads\scan-atkacpi.ps1:5 char:20                                                                                                                                                                                                                         + ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...                                                                                                                                                                                                +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                                        + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException                                                                                                                                                       + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand                                                                                                                                                         
110024 : ffff0000 (-65536)
Invoke-CimMethod : Generic failure
At C:\Users\govar\Downloads\scan-atkacpi.ps1:5 char:20
+ ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand

110025 : ffff0000 (-65536)
110026 : ffffffffffff0000 (-65536)
110027 : ffffffffffff0000 (-65536)
120057 : 80000 (524288)
120061 : 1 (1)
120063 : ffffffffffff0000 (-65536)
120065 : ffffffffffff0000 (-65536)
120067 : ffffffffffff0000 (-65536)
12006c : 1 (1)
120072 : fffeffff (4294901759)
120073 : 0 (0)
Invoke-CimMethod : Generic failure
At C:\Users\govar\Downloads\scan-atkacpi.ps1:5 char:20
+ ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand

120075 : ffff0000 (-65536)
120076 : ffffffffffff0000 (-65536)
120077 : ffffffffffff0000 (-65536)
12007a : 0 (0)
120081 : ffffffffffff0000 (-65536)
120082 : ffffffffffff0000 (-65536)
120083 : ffffffffffff0000 (-65536)
120087 : ffffffffffff0000 (-65536)
120088 : ffffffffffff0000 (-65536)
120089 : ffffffffffff0000 (-65536)
120090 : ffffffffffff0000 (-65536)
120091 : ffffffffffff0000 (-65536)
120092 : 1 (1)
120093 : 73 (115)
120094 : 3b (59)
120095 : 0 (0)
120096 : ffffffffffff0000 (-65536)
120097 : ffffffffffff0000 (-65536)
1200a0 : 0 (0)
1200a3 : 0 (0)
Invoke-CimMethod : Generic failure
At C:\Users\govar\Downloads\scan-atkacpi.ps1:5 char:20
+ ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand

130012 : ffff0000 (-65536)
130021 : 2 (2)
130022 : 0 (0)
130023 : ffffffffffff0000 (-65536)
130024 : ffffffffffff0000 (-65536)
130026 : 1 (1)
Invoke-CimMethod : Generic failure
At C:\Users\govar\Downloads\scan-atkacpi.ps1:5 char:20
+ ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand

130031 : ffff0000 (-65536)

There seems to be some errors? I'd love to do more. Feel free to ask.

You are doing god's work mate!

paslavskyit commented 1 year ago

ROG Zephyrus M15 (2020) - Intel® Core™ i7-10750H

60061 : 0 (0)                                                                                                           
60091 : ffffffffffff0000 (-65536)                                                                                       
80041 : ffffffffffff0000 (-65536)                                                                                       
80042 : 0 (0)                                                                                                           
80043 : ffffffffffff0000 (-65536)                                                                                       
80044 : ffffffffffff0000 (-65536)                                                                                       
100051 : 1 (1)                                                                                                          
100054 : ffffffffffff0000 (-65536)                                                                                      
100055 : 4 (4)                                                                                                          
110013 : 19 (25)                                                                                                        
110014 : 1d (29)                                                                                                        
110015 : ffffffffffff0000 (-65536)                                                                                      
110016 : ffffffffffff0000 (-65536)                                                                                      
110022 : d4 (212)                                                                                                       
110023 : ff (255)                                                                                                       
Invoke-CimMethod : Generic failure                                                                                      
At C:\Users\shprd\Downloads\scan-atkacpi.ps1:5 char:20                                                                  
+ ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...                                         
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                 + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimExc     eption                                                                                                                   + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand  
110024 : ffff0000 (-65536)
Invoke-CimMethod : Generic failure
At C:\Users\shprd\Downloads\scan-atkacpi.ps1:5 char:20
+ ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimExc
   eption
    + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand

110025 : ffff0000 (-65536)
110026 : ffffffffffff0000 (-65536)
110027 : ffffffffffff0000 (-65536)
120057 : 80000 (524288)
120061 : 1 (1)
12006c : 1 (1)
120075 : 3 (3)
120091 : 0 (0)
120092 : 0 (0)
120093 : 50 (80)
130021 : 2 (2)
130022 : 0 (0)
130031 : 1 (1)
ferensz commented 1 year ago

ROG Zephyrus G14 GA402RK_GA402RK - AMD Ryzen 7 6800HS | AMD Radeon RX 6800S

60023 : ffffffffffff0004 (-65532)
60024 : a36c8086 (2741796998)
60026 : 0 (0)
60061 : ffffffffffff0000 (-65536)
60094 : 6 (6)
80041 : ffffffffffff0000 (-65536)
80042 : ffffffffffff0000 (-65536)
80043 : ffffffffffff0000 (-65536)
80044 : ffffffffffff0000 (-65536)
90016 : 1 (1)
90020 : 0 (0)
90030 : 54 (84)
100051 : 1 (1)
110013 : 15 (21)
110014 : 16 (22)
110015 : ffffffffffff0000 (-65536)
110016 : ffffffffffff0000 (-65536)
110022 : d2 (210)
110023 : dc (220)
Invoke-CimMethod : Generic failure 
At line:5 char:20
+ ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand

110024 : ffff0000 (-65536)
Invoke-CimMethod : Generic failure 
At line:5 char:20
+ ...  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (AsusAtkWmi_WMNB...PNP0C14\ATK_0"):CimInstance) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041001,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand

110025 : ffff0000 (-65536)
110026 : ffffffffffff0000 (-65536)
110027 : ffffffffffff0000 (-65536)
120057 : 80000 (524288)
120061 : 20001 (131073)
12006c : 1 (1)
120075 : 3 (3)
120079 : 546 (1350)
120093 : 5a (90)
120094 : 4b (75)
120097 : 3d (61)
1200a0 : 0 (0)
1200a1 : 0 (0)
1200a2 : 0 (0)
1200a3 : 0 (0)
1200b0 : 0 (0)
1200b1 : 0 (0)
1200c1 : 0 (0)
1200c2 : 0 (0)
130021 : 2 (2)
130022 : 1 (1)
130026 : ffffffffffff0000 (-65536)
130031 : 1 (1)
starkwiz commented 1 year ago

@seerge Awesome!!! work on creating this tool :) I always wanted to get rid of the armoury crate as it's quite resource intensive. Here is my output for ASUS Zephyrus G15 (2020) Model GA502IV, CPU AMD Ryzen 9 4900HS with Radeon Graphics, dGPU NVIDIA GeForce RTX 2060 with Max-Q Design

.\scan-atkacpi.ps1
60023 : ffffffffffff0004 (-65532)
60024 : a36c8086 (2741796998)
60026 : 0 (0)
60061 : ffffffffffff0000 (-65536)
80041 : ffffffffffff0000 (-65536)
80042 : ffffffffffff0000 (-65536)
80043 : ffffffffffff0000 (-65536)
80044 : ffffffffffff0000 (-65536)
100051 : 1 (1)
110013 : 0 (0)
110014 : 0 (0)
110015 : ffffffffffff0000 (-65536)
110016 : ffffffffffff0000 (-65536)
110022 : ff (255)
110023 : ff (255)
Invoke-CimMethod: C:\temp\scan-atkacpi.ps1:5
Line |
   5 |  …  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Generic failure
110024 : ffff0000 (-65536)
Invoke-CimMethod: C:\temp\scan-atkacpi.ps1:5
Line |
   5 |  …  $result = (Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -Cl …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Generic failure
110025 : ffff0000 (-65536)
110026 : ffffffffffff0000 (-65536)
110027 : ffffffffffff0000 (-65536)
120057 : 80000 (524288)
120061 : 1 (1)
12006c : 1 (1)
120075 : 3 (3)
130021 : 2 (2)
130022 : 1 (1)

Why my output is so small compared to others ? Is there any issue with the script ?

Neristee commented 1 year ago

Hello @seerge

I currently have the 2022 G15 (GA503RW) on bios 313.

I saw you mentionned a quirky behavior/issue on reddit concerning this particular line of laptops, and since I have the hardware, I want to help with that.

I'm interested in getting my hands dirty with ACPI/DSTD related stuff (like mentionned by @vddCore) but I'm not from the field. However since I have the hardware, if either one of you would be so kind as to give me a starting point, or if I can be of any help, please do ping me.

(Don't hesitate to remove this feedback if you feel like it's not appropriate for this issue).

Have a good day. And thank you both for your work :)

Update/EDIT : Joined the result of your powershell script to the comment.

scan-atkacpi_result.txt

vddCore commented 1 year ago

Download ACPICA tools from here: https://acpica.org/downloads/binary-tools Extract, run acpidump tool, then you can use the other tool called iasl to decompile resulting files to something that humans can read.

Both tools include comprehensive help messages, but if all you want to achieve is dumping your DSDT and decompiling it, run acpidump.exe -b to dump them all to .dat files. They'll be placed in the location you ran the tool from. Then run iasl.exe dsdt.dat and the decompiled ACPI table will be created as dsdt.dsl.

seerge commented 1 year ago

@Neristee try to run in elevated powershell

(Get-WmiObject -Namespace Root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00090020, 1) - to disable dGPU
(Get-WmiObject -Namespace Root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00090020, 0) - to  enable

This is technically same thing as armoury or g-helper does, if it doesn't work for you - then i don't know how to help :)

marcelomijas commented 1 year ago

Decompiled ACPI table (dsdt file) of G14 2020 model GA401IV-HE003 (Ryzen 7 and RTX2060)

https://pastebin.com/8Vj46rWZ

Also, the file in *.dsl format: https://drive.proton.me/urls/3CSGCERH0R#2bzTPFmBhJFR

seerge commented 1 year ago

@paulusgi - i'm looking at your scan results and you seem to have way more "Generic failure" errors than anyone else. Looks strange, and probably connected to PPTs not working for you at all.

**Rest have "generic failure" only 110024 and 110025 - which is "reading" of fan profiles, and cause response there is not single integer but a byte array of 16 bytes, WMI method just can't handle that.

Can you try to "reinstall" asus control interface as explained here https://github.com/seerge/g-helper/discussions/145#discussioncomment-5431447 ? mb it's just damaged somehow

P.S. Checked your DSL related to PPTs

               If ((IIA0 == 0x001200A0))
                {
                    ^^PCI0.SBRG.SPLX (IIA0, IIA1)
                    Return (One)
                    Return (0xFFFFFFFE)
                }

                If ((IIA0 == 0x001200A1))
                {
                    Return (0xFFFFFFFE)
                }

                If ((IIA0 == 0x001200A2))
                {
                    Return (0xFFFFFFFE)
                }

                If ((IIA0 == 0x001200A3))
                {
                    ^^PCI0.SBRG.SPLX (IIA0, IIA1)
                    Return (One)
                    Return (0xFFFFFFFE)
                }

                If ((IIA0 == 0x001200B0))
                {
                    Return (0xFFFFFFFE)
                }

                If ((IIA0 == 0x001200B1))
                {
                    Return (0xFFFFFFFE)
                }

                If ((IIA0 == 0x001200C0))
                {
                    If ((IIA1 < 0x05))
                    {
                        ^^PCI0.SBRG.PPAB (Zero)
                    }
                    Else
                    {
                        If (((^^NPCF.DBAC == One) || (^^NPCF.DBDC == One)))
                        {
                            ^^NPCF.DBAC = Zero
                            ^^NPCF.DBDC = Zero
                        }

                        Local0 = (IIA1 << 0x03)
                        If ((Local0 != ^^NPCF.AMAT))
                        {
                            ^^NPCF.AMAT = Local0
                            Notify (NPCF, 0xC0) // Hardware-Specific
                        }
                    }

                    Return (One)
                    Return (Zero)
                }

                If ((IIA0 == 0x001200C1))
                {
                    ^^PCI0.SBRG.SPLX (IIA0, IIA1)
                    Return (One)
                    Return (0xFFFFFFFE)
                }

                If ((IIA0 == 0x001200C2))
                {
                    ^^PCI0.SBRG.RCTT (IIA1)
                    Return (One)
                    Return (Zero)
                }

A2, A3, Bx - do nothing

But all A1, A3, C1, C2 - seem to do some command

seerge commented 1 year ago

@marcelomijas - thanks, and on your DSL whole section dedicated to PPTs is imply absent :( (but that's expected) 001200Ax - 001200Cx

paulusgi commented 1 year ago

@seerge Hello I followed the steps in #145 but I'm still having the same problem :( . If I can help with some more test just tell me. Thanks for all :)

seerge commented 1 year ago

@paulusgi oke. What is interesting that your DSL is missing even a mode selection (120075). At the same time in your logs mode's seem to be accepted https://pastebin.com/b1T7JcD3 (it says ok after each PerformanceMode setting, so it got 1 as response)

Does actually Silent/Balanced/Turbo buttons have effect in your case ?

paulusgi commented 1 year ago

@seerge This problem seems to me that it can be due to 2 causes: For custom watts to work in armory crate you need to activate manual mode, it is a fourth mode different from silent, balanced and turbo modes. Maybe to pay attention to the endpoints or make them functional that mode has to be activated.

The other option that comes to mind is that it could be a problem or conflict with the power plans. Each performance mode (Silent, Balanced and Turbo) has its own performance plan in windows and when you change it from Armory Crate I mean it also changes in windows.

Maybe I'm wrong in both but I'm out of ideas right now x)

seerge commented 1 year ago

@paulusgi "Custom" mode in armoury is actually "Turbo" + custom settings :) (on bios level it's only 3 modes)

Windows power plans shouldn't have effect on fans or PPTs, they mainly affect own windows behavior.

seerge commented 1 year ago

@paulusgi that's not DLS, it's my script's output :) and powershell answers are predictable (based on what was in your DLS)

seerge commented 1 year ago

@paulusgi oke, thanks, it has changed a bit - but not in an important parts related to modes or PPTs :) But since you are testing - I was wondering - if you do this "reset" thing with holding power button for 30 seconds, would that change anything ?

Turn of laptop normally, press and hold power for 30-40 seconds, and then boot as usual (it will take some time)

paulusgi commented 1 year ago

@seerge Hello, thanks. I tried to do a full power cycle but nothing changed (followed your instructions). So the PPT sliders don't do anything.

Still having this on the log: 4/12/2023 2:51:03 PM: PowerLimit A0 = 54 : OK 4/12/2023 2:51:03 PM: PowerLimit A3 = 54 : OK 4/12/2023 2:51:03 PM: PowerLimit B0 = 54 : 0

seerge commented 1 year ago

@paulusgi okey, thanks for trying tho.

Log shows same as your DSL says - i.e. A0/A3 do something , and respond 1(ok), but apparently not ppts :)