Giter VIP home page Giter VIP logo

g14controlr3's Introduction

NOTE:

This is an upstream fork of https://github.com/thesacredmoocow/g14control-r2 which is an upstream fork of https://github.com/CappyT/g14control that has features and bug fixes that are not yet deemed stable for the official release, but that I have tested and are stable enough for my day-to-day use. There will be new EXEs bundled in the releases section that will be released between official releases by me. For those that want the bleeding edge updates/testing branches (but testing and working).

Some people have had issues with missing dependencies (errors saying they are missing MSVCP120.dll). This can be solved by installing Microsoft Visual C++ Redistributable 2013, version x86 and x64. Those can be installed here: https://www.microsoft.com/en-us/download/details.aspx?id=40784

G14ControlR3

A simple tray app to control Asus Zephyrus G14 Power options

Background:

If you are a user like me, you hate using a bunch of different apps to control all the power saving options of your laptop (sometimes even hidden in the registry) and prefer a simple, handy, tray app utility. The focus of this application is just that! It does combine all the option offered from other utilities into one, single, configurable TrayApp.

What does it do?

G14Control (you can even rename it) can control the current ASUS Power plan, Fan curve, Processor Boost Mode, Processor TDP, dGPU Activation and Screen refresh rate to your needs with a simple right click on the Windows taskbar. You can configure all the presets (and add new ones too) from the config.yml file via directly editing it during runtime using the Edit config button (which opens config.yml) and then pressing the Reload config button, or with your editor of choice from explorer.

What about Linux?

While is possible to port this app to Linux, at the moment is engineered to work only on Windows.

Installation

Before boost changes work, you must update the registry to allow modifications of the power option proccessor performance boost mode. Information for this can be found here: reddit link

Download the latest release zip from GitHub: https://github.com/aredden/G14ControlR3/releases

Extract it to C:\G14Control

Edit the config.yml with text editor as needed (see configuring below)

Configuring

All done in config.yaml within the root folder of the program. The program must be restarted for any changes to the config.yaml to take effect.

default_power_plan and alt_power_plan MUST BE SET IN ORDER FOR POWER PLAN SETTINGS TO WORK (BOOST, dGPU toggling)

By default, the default power plan is "Balanced" and the alt_power plan is "High performance". You need to set these to the names of your windows power plans, ie GameTurbo, Battery saver, etc.

app_name: can be customized, this is what the hover text displays over the icon and the windows notification title

start_on_boot Set this to true or false. Note this will create a Windows Registry entry to enable starting on login. Must have files extracted to a permanent location as above. Note: This will popup an administrator UAC prompt the first time you login after each boot. Setting back to false will remove registry key.

Alternatively to make it run on boot WITHOUT UAC prompt, you will have to create a windows task, please see our Autostart instructions

default_starting_plan set plan name you want on boot or on restart of the program

default_ac_plan This plan name will automatically enable when AC adapter plugged in (set both default_ac_plan and default_dc_plan to null to disable this feature)

default_dc_plan This plan name will automatically enable when on battery power (set both default_ac_plan and default_dc_plan to null to disable this feature)

default_gaming_plan Enable this if you want the program to auto-switch plans based on games (or any program really) running. It will automatically switch to the plan specified here when the program is launched, and automatically switch back to the previous plan once it has closed. Set to null to disable.

  • WARNING: this may be more resource intensive as it polls running processes on your computer every 10 seconds. However I noticed little difference, and almost no score change on Heaven Benchmark (FPS +/- 2).

default_gaming_plan_games This will be a list of exe's that you want to detect. Please check the exact name of the exe. For example, Steam is SteamService.exe. Example list: ["7zFM.exe", "notepad++.exe", "SteamService.exe"]

power_check_enabled This will enable or disable the power switching for both gaming and battery. Possible values are true or false.

Notes on using Auto Power Switching:
  • Only available if default_ac_plan and default_dc_plan are set in config (set to null to disable)
  • Manually changing your plan thru the icon menu will DISABLE auto power switching.
  • To re-enable, click the "Re-Enable Auto Power Switching" option in the icon menu.
Configure plans

Removed the plan: Armory Crate Plan functionality because of issues with atrofac.

Under Plans, you can configure as many or few plans as you want. A plan includes:

- name:
    This is where you will enter the name you want to be displayed for that plan
  plan:
    --DEPRECIATED BUT STILL SHOWS IN CONFIG.YML--
    Name of the ROG Armory plan you want it set on (`silent` or `windows` or `performance` or `turbo`).
  cpu_curve:
    An array of `temps_in_deg_C:fanspeed_percent` for custom fan curve such as "30c:0%,40c:0%,50c:0%,60c:0%,70c:34%,80c:51%,90c:61%,100c:61%". Otherwise use `null` for default
  gpu_curve:
    An array of `temps_in_deg_C:fanspeed_percent` for custom fan curve such as "30c:0%,40c:0%,50c:0%,60c:0%,70c:34%,80c:51%,90c:61%,100c:61%". Otherwise use `null` for default
  cpu_tdp:
    The tdp you want for the CPU expressed in mW, use `null` for default or numeric (45000 = 45W)
  boost:
    Whether you want the CPU to boost above it's 3.0Ghz base clock speed. 0 for no boost, 2 for aggressive boost, 4 for efficient aggressive boost (reccommended)
  dgpu_enabled:
    Whether you want the dedicated NVIDIA GPU enabled (uses more power, need for graphics/games), `true`, `false`
  screen_hz:
    The refresh rate of the screen. Can be 60 (numeric) or 120 (numeric) (for supported models) or null for default refresh rate of your screen

The config.yaml has many examples of plans included by default. Modify at will.

Important Note about ASUS ROG Armory Crate

The ASUS ROG Armory Crate program will automatically change plans on wake, AC unplug, AC plugin. This will override G14's plan setting, but It is important to keep Armory Crate for the power profiles so that it's easier to fix fan bugs from occuring due to atrofac-cli.exe.

Downloads:

Check the release tab!

How to build:

Make sure 32-bit python 3.8.x and pip are installed. Then (as admin, in the source folder) run install.bat

The install directory is C:\G14Control, go there and modify the config.yml as needed. ensure that windows has at least two power plans. the default power plan will be selected 99% of the time, but will flip to the alternate plan for a bit to force a refresh of the power plan settings

run G14control\G14Control.exe

Optionally: create a task in task manager to have it start by itself

Disclaimer

Please note that this is an ALPHA version of this software, which is still undergoing testing and development. The software and all content found on GitHub related to it are provided “as is”. We do not give any warranties, whether express or implied, as to the safety, reliability, suitability or usability of the software or any of its content.

We will not be held liable for any loss, whether such loss is direct, indirect, special or consequential, suffered by any party as a result of their use of the software or content. Any use of the software or scripts provided here is done at the user’s own risk and the user will be solely responsible for any damage to any computer system or loss of data that results from such activities.

Should you encounter any bugs, glitches, lack of functionality or other problems with the software, please let us know in GitHub so we can look into addressing it.

Contribute:

You are very free to contribute with your code. I kinda suck at coding so any help is appreciated. Just submit a pull request, I will merge it or discuss it as soon as possible.

TODO:

  • Automatic config generation
  • Dynamic Menu generation based on configured profiles Implemented
  • atrofac commands integration Implemented
  • ryzenadj command integration Implemented
  • Parallel notification spawning (right now when notification is displayed the whole app locks until the notification disappears) Implemented
  • Different options for AC/DC modes
  • Logging
  • Better binary storage
  • Better UI (?)
  • Better code comments
  • .... you tell us!
  • mode switching upon launching games

Contributors:

g14controlr3's People

Contributors

aredden avatar dependabot[bot] avatar thesacredmoocow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

g14controlr3's Issues

Health charging

On the G14 the health charging can be enabled with the following Powershell command (with elevated privileges) where X is an integer between 0 and 100:

(Get-WmiObject -Namespace root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00120057, X)

Note: the command has to be executed after boot AND whenever resuming from sleep.
Could this be implemented in g14controlR3 by any chance?

Crash on startup

image

Receiving this error on launch. I have tried using the standard yml file as well as one modified with different power plans. Any help?

Crash on start, settings keep reseting (won't autoswitch)

g14control error

I saw this on start up. Honestly, I think I want to delete G14controlR3 for now as it seems a bit too buggy for my skill level (I updated the config file but the menu has a weird lag and is randomly resetting (example: I would say auto switch based on power input and that would be disabled in the menu and it also was not switching even though if I enabled it in the menu, it would say yes this is turned on now).

Problem is I can't uninstall as it says something is running in the background. What process do I have to kill in Task Manager to uninstall G14Control? Also is there anything I have to reinstall so that Armory Crate has full control of my system again?

Love the idea and implementation and will return when I have more time to mess around with it. Thanks so much for making and updating this.

Windows 11: IndexError: list index out of range

Updated to Windows 11 and am now getting the below error. Have become reliant on G14control so really sad it isn't working anymore!!!

Traceback (most recent call last):
File
“C:\Users\alexa\Documents\G14ControlR3\venv\lib\site-packages\oc_ Freeze\initscripts_startup_.py’, line 40, in run
File
*C:\Users\alexa\Documents\G14ControlR3\venv\lib\site-packages\oc_ Freeze\initscripts\Console.py’, line 37, in run
File “G14Control.pyw’, line 523, in
File "G14Control.pyw’, line 499, in startup
File
“C:\Users\alexa\Documents\G14ControlR3\venv\lib\site-packages\pystray_base.py’, line 141, in menu
File
“C\Users\alexa\Documents\G14ControlR3\venv\lib\site-packages\pystray_base.py’, line 216, in update_menu
File
“C:\Users\alexa\Documents\G14ControlR3\venv\lib\site-packages\pystray_win32.py’, line 115, in__update_menu
File
“C\Users\alexa\Documents\G14ControlR3\venv\lib\site-packages\pystray_win32.py’, line 269, in _create_menu
File
“C:\Users\alexa\Documents\G14ControlR3\venv\lib\site-packages\pystray_win32.py’, line 305, in _create_menu_item
File
“C\Users\alexa\Documents\G14ControlR3\venv\lib\site-packages\pystray_win32.py’, line 269, in _create_menu
File
“C:\Users\alexa\Documents\G14ControlR3\venv\lib\site-packages\pystray_win32.py’, line 301, in _create_menu_item
File
“C\Users\alexa\Documents\G14ControlR3\venv\lib\site-packages\pystray_base.py’, line 393, in checked
File “G14Control.pyw’, line 328, in
File
“C:\Users\alexa\Documents\G 14ControIR3\G14RunCommands.py’, line 55, in get_boost
IndexError: list index out of range

GA402RK support

Hello! Are you considering support for newer models? I have Zephyrus G14 2022 GA402RK and I would like to see it working on my laptop :)

Windows 11: ValueError: invalid literal for int() with base 10: ‘KNOWN’

Getting this issue when starting up the program now. This has only become a thing since I upgraded to Windows 11.

File
“C:\Users\alexa\Documents\G14ControlR3\venv\lib\site-packages\pystray_base.py’, line 393, in checked
File "G14Control.pyw’, line 328, in
ValueError: invalid literal for int() with base 10: ‘KNOWN’

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.