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://seerge.github.io/g-helper/
GNU General Public License v3.0
6.85k stars 247 forks source link

XG Mobile power limit stuck #729

Closed Wolper321 closed 1 year ago

Wolper321 commented 1 year ago

Recently my XG Mobile stuck at 100w (should go to 165w in Turbo) and no tweaks in G-Helper can help it. I have tried changing the power modes, and CPU power limits but the only thing that helps is disconnecting XG Mobile and connecting it back. After this, all starts to work normally and the power limit starts to shift between the modes as intended. Unfortunately, if you restart the computer the problem will come back again.

Steps to reproduce the behaviour:

  1. Go to FurMark
  2. Click on "Start the stress test"
  3. Look at 100w

Deleting G-Helper and installing Armoury Crate with MyAsus back resolves the problem. What causes it seems to be a hard reset when you hold the power button for 10 sec or so (sometimes the laptop refuses to wake up).

Laptop model: ROG Flow X13 GV301RA OS: Win 11

I have tried different versions before and now switched to 0.94. log.txt

seerge commented 1 year ago

@Wolper321 hello,

I see that you have quite a lot of settings in each mode, including custom fan curves for XGM itself.

Can you reset all your modes to defaults (i.e. click "factory defaults") and then do a clean test starting from situation when power on XGM is not limited and see if setting turbo / balanced / etc?

As AC obviously has customizations only in Manual mode (which is actually Turbo with extra settings)

Wolper321 commented 1 year ago

All modes were made to factory reset. Unfortunately no change in the behaviour. 100w in all modes (Silent should be 80w, Turbo unlocked). After reconnecting the power limit becomes unlocked (165w every mode). Restarting the computer makes it 100w again log.txt

seerge commented 1 year ago

@Wolper321 if you would just quit g-helper (and uncheck run on startup). Would windows reboot reset limit from 165 to 100? I.e is it reboot itself resetting limit or any of the settings in modes/etc do that?

And what do you mean under “reconnect”? physical reconnect or just disabling / enabling XGM via g-helper itself (via button)?

Wolper321 commented 1 year ago

It still runs at 100w. Makes me feel that actually, Windows is controlling it instead of the app, Physical reconnect. Disable in the app-->Unplug-->Plug Back--->Enable in the app

seerge commented 1 year ago

@Wolper321 oke, and does just re-enabling XGM via app itself reset limit back to 165w?

Wolper321 commented 1 year ago

@Wolper321 oke, and does just re-enabling XGM via app itself reset limit back to 165w?

I have tried and the results are interesting. If Disable->Enable when the silent profile is active the power limit will be 80w no matter what I do. When I Disable->Enable when the turbo profile is active the power limit will be 165w.

seerge commented 1 year ago

@Wolper321 you mentioned silent profile in both cases, did you mean turbo in 2nd case?

Wolper321 commented 1 year ago

yeah sorry typo

seerge commented 1 year ago

@Wolper321 ok, then you have a "solution" (just to re-enable device on app level).

I just wonder if power limits that you can set, also affect XGM

Can you try to get your device locked too 100W (i.e. by just rebooting for example).

  1. Then just select a Turbo Mode in g-helper (i assume by itself it won't boost power to 165W?)
  2. Run following commands in powershell as admin :
Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -ClassName AsusAtkWmi_WMNB) -MethodName DEVS -Arguments @{Device_ID=0x001200A0 ; Control_status=250}

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

Invoke-CimMethod (Get-CimInstance -Namespace root/wmi -ClassName AsusAtkWmi_WMNB) -MethodName DEVS -Arguments @{Device_ID=0x001200C1 ; Control_status=250}
Wolper321 commented 1 year ago

result ReturnValue PSComputerName


 1        True
 1        True
 1        True

And nothing happens unfortunately

seerge commented 1 year ago

@Wolper321 oke :) clear.

Well, then I assume the solution for you would be just re-enabling device via app ? :) As I don't really know any way to control power limits on a XGM (and i don't have a device to actually look into that deeper)

Wolper321 commented 1 year ago

Well, it is a solution but every single restart will make it annoying. I guess it is a good topic for people who will face similar problems as me. Another solution will be: Installing armoury crate-->restart-->confirming all works-->deleting AC and going back ghelper until the next hard reset. The sleep mode in this laptop drives me crazy sometimes...

seerge commented 1 year ago

@Wolper321 what the sense in installing / deleting AC ? does XGM then maintain constant 165W no matter what ?

UnknownLOL commented 1 year ago

I cannot recreate this behavior (with Z13 + XGM 4090). Well, at least I can confirm that hard reset doesn't cause this for my configuration. The only thing out of ordinary is the led on XGM turned off despite being set to "on" in G-Helper (had to physically reconnect XGM for the led to turn back on).

seerge commented 1 year ago

@UnknownLOL most probably it's isolated to AMD version with 6950 in it only, and only after a hard-reset (so quite specific case)

Wolper321 commented 1 year ago

@Wolper321 what the sense in installing / deleting AC ? does XGM then maintain constant 165W no matter what ?

3 weeks ago I solved the same issue by installing AC and MyAsus (idk if that one mattered) back. After this XGM started to behave like it should, properly shifting power limits between the modes even after restart. At that point, I came back to Ghelper for sweet undervolting and manual modes :D

seerge commented 1 year ago

@Wolper321 it could be that there is some secret init command, specifically for AMD model that needs to be sent. But w/o device and same setup it's unrealistic to figure out if this indeed the case.

Closing this as not planned for now, as i can't do anything here.

Wolper321 commented 1 year ago

After installing back AC and replugging XGM my laptop freaked out a bit (refused to boot at first). But now all the modes are working as usual. The big mystery is this asus proprietary thing. Time to go back to G-helper :)

Wolper321 commented 1 year ago

Here is a small update on this issue. I recently uninstalled the AC and used GHelper for a couple of weeks. During this time all the power modes were working well until I needed to unplug the XGM. This caused the power limit issue to come back again. So it's definitely something to do with XGM activating/reactivating. Once activated the power limit will be stuck to the power mode chosen and after restart it goes with 100w (balanced) no matter what.

seerge commented 1 year ago

@Wolper321 thanks for confirming :) there is probably some "init" payload, that I don't know still :|

If you would be able to spot correct payload (i.e. just array of bytes) that AC sends to XGM (USB device ID 0x1970 )

So far I know (and use) 0x5e, 0xc5, 0x50 - Sets light ON 0x5e, 0xc5, 0x00 - Sets light OFF

0x5e, 0xd1, 0x01, T1, T2, ... T8, F1,F2 .... F8 - Sets custom fan curve (with eight Temps and Fan speeds) 0x5e, 0xd1, 0x02 - Resets XGM fan

So most probably init will also start with 0x5e

Wolper321 commented 1 year ago

So I installed AC and the power limit was stuck regardless of the power mode chosen (100W). After replugging using AC tool everything comes back to normal. I have uninstalled AC and restarted the laptop and everything is still fine. 100w is the limit also in AC if you choose the Windows preset, so probably Windows is controlling it. This also makes me belive that some of the Windows updates spoiled it for me because back in May everything was working nicely. Another small difference between AC and Ghelper for that when I unplug XGM the ECO GPU mode is chosen. I don't have the dGPU in my laptop and I don't have ECO/Standard/Optimised modes in AC. However, when I unplug XGM I receive a notification that I am in ECO mode now (lol) and I connect my XGM with no problem. In GHelper it also puts me in ECO mode but I need to manually switch to standard and then it allows me to activate XGM.

seerge commented 1 year ago

@Wolper321 this build should keep XGM button enabled even in Eco state for your model GHelper.zip

Wolper321 commented 1 year ago

It works ok. Now I can switch from ECO mode to XGM and when it is activated it automatically switches to Standard. The button still says that I need to be in standard in order to toggle XGM though, but it works regardless. The power limit is still a problem though but still a big thanks to your efforts. I also tried for the sake of testing to switch to ECO with XGM and it was a mess. The system cut the XGM out but the light on the connector stayed red (which means connected) and Ghelper also detected XGM as connected. Switching back to standard, restarting and even disconnecting XGM in ghelper didn't help. So I ended up physically unplugging XGM after shutting down the system. So the GPU modes were hidden on my system in AC for a good reason :D

seerge commented 1 year ago

@Wolper321 but app disables gpu mode buttons when xgm is connected, how did you manage to set eco?

Wolper321 commented 1 year ago

For me, the button are still active even if XGM is connected.

seerge commented 1 year ago

@Wolper321 connected or activated ? it's 2 different things

When it's just connected (i.e. plugged). Buttons have to be active (obviously to allow to set Standard mode for devices with dGPU, or set Eco back if you don't plan to activate it)

When it's activated - buttons will be disabled

Wolper321 commented 1 year ago

They are not greyed out if this is what is meant to happen. image

seerge commented 1 year ago

@Wolper321 try this build

GHelper.zip

Btw, question : does Eco / Standard mode switch do anything for you (w/o XGM) ?

Wolper321 commented 1 year ago

image works now, thank you.

In my case, I see no difference between all three ECO/Standard/Optimized. As I say in AC I don't even have the option to toggle since there is no dgpu.

seerge commented 1 year ago

@Wolper321 ok, clear.

App shows modes cause ECO flag exists in BIOS by some reason (i don't know what purpose it has tho). So for now I will probably just keep it as is :)

As for your power limits.

If you would be able to actually figure out right payload that would help

  1. Download and install https://freeusbanalyzer.com/
  2. Disable / disconnect XGM and quit AC / it's services (or mb just reboot?)
  3. Launch it and find on the left device with ID1970 (it's XGM)
  4. Double click on it and select "Packet View" in monitoring (as on screenshot, just in my case i have selected keyboard with ID 19b6 as i don't have XGM) Screenshot 2023-09-03 154639
  5. Launch AC and connect XGM via armoury and make sure it's up and running
  6. Check what logger have recorded , we need packages marked as DOWN (it's what AC sends TO XGM) Screenshot 2023-09-03 154841

I'm interested in packages starting with 0x5e mainly :)

If you can't find anything specific - just click Export -> Save to log and upload it here (it's dmslog8 format, but you can zip it)

Thanks!

Wolper321 commented 1 year ago

Sorry, I don't know how to record the stuff properly in this program. I made the set of screenshots instead. https://imgur.com/a/tSvXXFH 1-15 are the DOWN requests made by AC when activating XGM 16-17 are the DOWN requests made by GHelper when I open the app. Changing the power mode works fine. 18-20 are the DOWN requests spammed by AC. Every 2 seconds the same 3 requests are made.

seerge commented 1 year ago

@Wolper321 great! that's a lot of screenshots and effort of course

Check this build, app will send all it's payloads after the moment XGM is being Activated

GHelper.zip

Wolper321 commented 1 year ago

Unfortunately, it is still the same. I have decided to check what packets GHelper is sending to XGM when I switch the power modes and they are all the same no matter which mode is chosen. I don't know if it is relevant though because when I install AC back it also cannot change the PPT limit UNTIL the XGM is reconnected with AC tool. image

seerge commented 1 year ago

@Wolper321 because I have added this payload only for the moment when you activate XGM (i.e. you click on XG Mobile button) :)

Check this build, I have added whole init payload (copied 1 to 1 from AC) to every time you set a new mode GHelper.zip

Wolper321 commented 1 year ago

And no. Still the same behaviour. When you replug it memorizes the power limit from the mode it was last connected and after restarting it's hard 100w. I wonder what other magic AC does to it.

seerge commented 1 year ago

@Wolper321 oke, well, thanks anyway for trying. Mb those payloads will fix fan issues some people had.

If you want to you can try to submit a dump as described under Method 2 here https://github.com/seerge/g-helper/issues/38

Mb there is some tricky endpoint for resetting XGM ...

seerge commented 1 year ago

@Wolper321 just in case I need a DSDT dump (method2).

Btw seems that init payload helps with fan issues https://github.com/seerge/g-helper/issues/1123#issuecomment-1705536570

seerge commented 1 year ago

@Wolper321 from your scan I have noticed something

Can you try to run in powershell as admin following command

(Get-WmiObject -Namespace Root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00090017, 1)

And see if it "fixes" your power issue ?

Or try this build

GHelper.zip

Wolper321 commented 1 year ago

Still doesn't work with the same behaviour. I have tried both the build you have provided as well the command. BTW the command gave the following:

GENUS : 2 CLASS : PARAMETERS SUPERCLASS : DYNASTY : PARAMETERS RELPATH : PROPERTY_COUNT : 1 DERIVATION : {} SERVER : NAMESPACE : PATH : result : 4294967294 PSComputerName :

I have tried to do the dump from the second method but don't understand how the acpidump works. It definitely does something but after finishing it just closes and I see no dump file generated. At least it is not in the same folder so I don't know where to look.

EDIT: I am very happy that at least people with a custom fan curve problem got the problem solved (I have never experienced that for some reason). But reading the thread again I have noticed that hibernating is allowing them to apply the settings. I have tried it myself aaaand.... it worked. The system will remember to the power limit chosen in Ghelper before hibernating and will stick to it after waking up. Again, this power limit cannot be changed when cycling between power modes but at least I don't need to install AC to get +40% power. Big relief for me! So this is kind of proving that Windows is messing with it. Since hibernating remembers and restart doesn't.

seerge commented 1 year ago

@Wolper321 just run

./acpidump.exe -b

in powershell as admin (from a folder with that exe) ZIP everything it generated and upload here

Wolper321 commented 1 year ago

Ok, thanks for the help. Here are the files. A bunch of .dat DUMP.zip

seerge commented 1 year ago

@Wolper321 thanks!

I have checked it and actually XGM Enable / Disable command has some optional params.

Try following in powershell as admin

To Activate XGM (it's known and should work)

(Get-WmiObject -Namespace Root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00090019, 1)

To Deactivate XGM (it's known and should work)

(Get-WmiObject -Namespace Root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00090019, 0)

And then after deactivating try to activate it with each of the following and see if it affects power limit

(Get-WmiObject -Namespace Root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00090019, 0x0101)
(Get-WmiObject -Namespace Root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00090019, 0x0201)
(Get-WmiObject -Namespace Root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00090019, 0x0301)
Wolper321 commented 1 year ago

aaand... it worked! You actually did it! The very first command: (Get-WmiObject -Namespace Root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00090019, 0x0101) It does everything flawlessly. Restarting, hibernating, unplugging - all works. Thank you so much!

I tested the other two and they also activated XGM but the power limit got stuck like before. However, now I couldn't deactivate XGM. Restarting didn't help and I just ended up manually unplugging the device when the laptop was off.

seerge commented 1 year ago

@Wolper321 ok, good to know .

But I don't know if 0x0101 is applicable only for your case or all cases ...

My only guess, it's actually Turbo , Silent and Balanced modes but for XGM (as they match by numbers to main modes)

But I don't know for sure and I don't know anyone else who would experience a power limit issues with XGM in a first place.


Question :

Does running 1 OR 101 OR 201 commands when XGM is already activated make any difference ?

JoePavel commented 1 year ago

Hey guys,

I have an Asus ROG ally + 6850M XT XG mobile And i experience the same 100w issue with my XG mobile.

Any way i could help you guys do some test? If anyone want to remotely connect to my ally to test different command, etc.. I'd be more than happy to help with that ; or anything else.

seerge commented 1 year ago

@JoePavel you can also try same command in poweshell as admin to Activate XGM and see if it helps

(Get-WmiObject -Namespace Root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00090019, 0x0101)
Wolper321 commented 1 year ago

Question :

Does running 1 OR 101 OR 201 commands when XGM is already activated make any difference?

These commands "reactivate" the XGM. From what can see XGM deactivates and activates with the new parameters. I just have switched from 101 to 1 and to 201. 201 didn't allow me to "jump" back and again doesn't allow me to deactivate XGM. Seems like I need to unplug it physically again.

JoePavel commented 1 year ago

Want me to uninstall armoury crate, install ghelper and connect using that command, right?

seerge commented 1 year ago

@JoePavel do you have 100w problem even with AC ? you can just try that command as is

JoePavel commented 1 year ago

@JoePavel do you have 100w problem even with AC ? you can just try that command as is

When activated with AC i always get 165w With Ghelper im stuck at 100w after reboot, deactivating/reactivating will put it back to 165w untill i reboot again