Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API access for third party application #1637

Closed
coffandro opened this issue Nov 23, 2023 · 15 comments
Closed

API access for third party application #1637

coffandro opened this issue Nov 23, 2023 · 15 comments
Labels
question Further information is requested

Comments

@coffandro
Copy link

Is your feature request related to a problem? Please describe.
On my laptop I often use programs which completely break in the most extreme manner possible if I change power mode while working.
because of this I would like to make a few AHK scripts to watch the status of if the app is open, this is completely out of the scope of G-Helper in my opinion so I would like to request some sort of communication protocol to, for instance, change power mode or something like that automcatically

Describe the solution you'd like
I would like a feature kinda like the windows Interprocess communication so that the community would be able to extend G-Helper without bloating this beautiful application you've made

Describe alternatives you've considered
An alternative way would be to for instance allow hotkeys like F13 to do things inside G-Helper

Additional context
I have previously mentioned something similar in #357 but now I'm trying to explain it better

@seerge
Copy link
Owner

seerge commented Nov 23, 2023

@coffandro hello,

It's not that easy to do. I simply can't add any CLI as whole app is designed to run in background, and act on certain events in the system (like plugging / unplugging power, pressing hotkey, etc).

Same applies to external API.

If you want to re-use certain G-Helper's actions you can simply re-use code for your own solution :) main (and unique to asus) things are in https://github.com/seerge/g-helper/blob/main/app/AsusACPI.cs

If you have more specific requests regarding hotkeys, that can be useful for a big range of people - i can consider them as well (even tho app already offers big amount of automatization) :)

@seerge seerge added the question Further information is requested label Nov 23, 2023
@coffandro
Copy link
Author

Well a hotkey for changing CPU mode could be quite useful

@seerge
Copy link
Owner

seerge commented Nov 23, 2023

@coffandro if you mean performance modes - then it's Fn+F5 / Fn+Shift+F5 or Ctrl+Shift+F5 / Ctrl+Alt+Shift+F5 to change them forwards / backwards? :)

@coffandro
Copy link
Author

Oh no I meant dgpu Vs egpu not performance modes

@seerge
Copy link
Owner

seerge commented Nov 23, 2023

@coffandro there is no eGPU modes, if you mean XG Mobile toggle, when it's handled - you need to physically interact with device anyway. So clicking on extra button in the app is not a big deal here.

As for enabling / disabling dGPU - it's already can be automated an called Optimized mode :)

@coffandro
Copy link
Author

image
I was more thinking hotkeys for these two buttons.

Optimized mode doesn't work because of the reasons I mentioned, it changes on power mode and I need something more complicated than the default option, there for I would at least like the option to add a hotkey for that

@seerge
Copy link
Owner

seerge commented Nov 23, 2023

@coffandro optimized mode doesn't change power modes :) it only turns dGPU on or off .

Can you explain your scenario why do you want to disable / enable dGPU so often if you don't unplug your laptop ?

@coffandro
Copy link
Author

@seerge in all cases except for if I'm running the "creation kit" I want it to switch to the egpu when I unplug, if it is running the CK I want it to keep dgpu+egpu

@coffandro
Copy link
Author

so if I the application is open I want it to be on DGPU while if it's closed I want it to be on optimized mode

@seerge
Copy link
Owner

seerge commented Nov 23, 2023

@coffandro try this build

Ctrl+Shift+Alt+F14 will set Eco mode
Ctrl+Shift+Alt+F15 will set Standard mode

GHelper.zip

@coffandro
Copy link
Author

That works perfectly!

@coffandro
Copy link
Author

or not? it gives me a bluescreen if i switch it while having win 11 notepad open lol

@coffandro coffandro reopened this Nov 23, 2023
@seerge
Copy link
Owner

seerge commented Nov 23, 2023

Asus has implemented disabling and enabling GPU by literally powering it off :) thats one more reason i don’t encourage constant switching here

PS: Check stop apps using GPU under extra, this may help

@seerge
Copy link
Owner

seerge commented Nov 23, 2023

@coffandro alternatively you can just run as admin following thing in powershell

1 - to set eco, 0 - to set standard :)

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

Results will be the same, cause this is same asus command that g-helper is using

@seerge seerge closed this as completed Nov 23, 2023
@coffandro
Copy link
Author

Thank you!

seerge added a commit that referenced this issue Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants