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.59k stars 266 forks source link

Custom GPU clock settings persist when switching to a mode that doesn't store GPU clock settings #1915

Closed KelseyHigham closed 9 months ago

KelseyHigham commented 9 months ago

Rules

What's wrong?

i created a new Fan & Power mode to mess with GPU clock settings, without messing up my default modes (Silent/Balanced/Turbo). but the custom GPU clock settings persisted when i switched back to the default modes, because the default modes didn't store GPU clock setting to replace the custom one.

when i applied a GPU clock setting to each default mode, by pressing Factory Defaults on each of them, the problem went away.

How to reproduce the bug?

  1. create a mode, Mode A. drag Core Clock Limit all the way to the left.
  2. create another mode, Mode B. drag Core Clock Limit to the middle.
  3. create a third mode, Mode C. leave settings at defaults.
  4. switch to Mode A, then C, then B, then C. the custom Core Clock Limits will persist in Mode C.

Logs

log.txt

Device and Model

G14 GA402XZ

Additional information.

i'm not actually sure how to reproduce the fact that it affects the default modes. i can press Factory Defaults to set the GPU clock values, but not to remove them entirely. so i can't reproduce the original version of the problem.

giving the default modes GPU clock values would address most of the problem as i experienced it. but i think ideally, switching to a mode without GPU clock values stored, would switch the GPU clock settings to factory defaults.

Asus Software Running

Version

0.144

OS

Windows 11 22H2

seerge commented 9 months ago

@KelseyHigham hello,

I can't actually reproduce that :)

Current logic is very simple. On every mode switch it

  1. Reads current clock limit
  2. Checks if mode setting is different from it
  3. If mode setting is nothing or OFF it would reset limit (i.e. turn limit off), else - set a new limit

I see it happens in a log as well, for example

1/13/2024 7:24:04 PM: Mode = 2 : OK   <---- main mode turned on (based on Turbo)
1/13/2024 7:24:04 PM: GET CLOCK LIMIT: 400 <----- it reads current limit (was 400)
1/13/2024 7:24:04 PM: nvidia-smi -rgc <---- since no limit is set in new mode - it resets clock

nvidia-smi -rgc - is a command for resetting clocks, nvidia-smi -lgc 0,400 - for setting clock limit to something

seerge commented 9 months ago

This is the actual implementation https://github.com/seerge/g-helper/blob/83fed695e483dbc2ec730703af7c5df5a8b58a51/app/Gpu/NVidia/NvidiaGpuControl.cs#L148

You can check it, logic is pretty simple. And there is no difference between "Limit has never been set" and "Limit is set to OFF" here (both would be limit = 0)

KelseyHigham commented 9 months ago

weird... i'll test if the behavior is still present in the newest version, and take a video if so

KelseyHigham commented 9 months ago

video, and log with what happened in the video: ghelper bug maybe.mp4 log.txt

KelseyHigham commented 9 months ago

i noticed this because i was getting bad performance in Turbo, so i don't think it's just aesthetic.

seerge commented 9 months ago

@KelseyHigham I see.

If absolutely nothing from GPU driver settings is changed in a profile, G-Helper will simply ignore it (it won't threat it as 0)

This is actually done intentionally, so by default when you run app and have no setting it won't override them set by other apps (for example if you use Afterburner?).

So I would keep things as is. In your case - just drag any slider left/right and it will remember that

seerge commented 9 months ago

i noticed this because i was getting bad performance in Turbo, so i don't think it's just aesthetic.

I assume you had no special settings for Turbo ? I would just set something for it then

KelseyHigham commented 9 months ago

i see. i've addressed the issue on my machine, i just disagree with the design decision in ghelper.

this would still cause inconsistent, hard-to-identify behaviors in Afterburner, if the user has changed settings for some built-in ghelper modes but not others. i'm curious how many people have installed ghelper, installed Afterburner, changed settings in Afterburner, and not changed settings in ghelper.

and it makes it more confusing to use ghelper by itself, since such a prominent behavior is controlled by a setting that's completely hidden. messing around in a new mode shouldn't affect the behaviors in the other modes - i made a new mode so that switching to the default modes would bring back stock values.

seerge commented 9 months ago

@KelseyHigham ok, it may cause more troubles tho, but try this build

GHelper.zip

seerge commented 9 months ago

@KelseyHigham updated build, cause previous one was asking for admin permissions on start if it couldn't read clocks from the driver GHelper.zip

KelseyHigham commented 9 months ago

this build addresses the issue! thank you!