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

screen refresh rate auto mode #1395

Closed 123dqwkhjk closed 1 year ago

123dqwkhjk commented 1 year ago

NOTE

Bug reports without clear information or scenario to reproduce and logs from %AppData%\GHelper will be closed without answer. Please respect the time of the developer. Thanks.

Describe the bug before I close the lid of the computer, my laptop is not charging. I close the lid and plug in, after that my screen stuck at 60hz. ps. I set it to don't do anything when close the lid. Steps to reproduce the behavior:

  1. unplug
  2. close the lid
  3. plug in
  4. open the lid and it stuck at 60hz

Expected behavior should be 165hz

App Logs Please include and attach log.txt from %AppData%\GHelper log.txt

Desktop (please complete the following information):

Asus software none

seerge commented 1 year ago

@123dqwkhjk hello,

I see that when your laptop woke up, windows didn't return a list of displays (you have 2, internal and external monitor) therefore app decided that internal display was off , and didn't set refresh rate back to 165Hz

2023/10/1 上午 02:14:48:  DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL
2023/10/1 上午 02:14:48: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at GHelper.Display.ScreenNative.FindInternalName(Boolean log) in D:\a\g-helper\g-helper\app\Display\ScreenNative.cs:line 175
2023/10/1 上午 02:14:48: Internal screen off

Try this build and post a log please again, thanks GHelper.zip

123dqwkhjk commented 1 year ago

Hello, I will try this build and report later. However, I do not have an external monitor.

123dqwkhjk commented 1 year ago

log.txt Here you are. Thanks.

seerge commented 1 year ago

@123dqwkhjk hmm, from the log it looks like it's from the previous build :|

To doublecheck - can you run this one ?

GHelper.zip

123dqwkhjk commented 1 year ago

log.txt

seerge commented 1 year ago

@123dqwkhjk well, looks like it worked this time ?

2023/10/1 下午 04:19:21: \\?\DISPLAY#CMN1540#5&2b412772&2&UID512#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7} DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL
2023/10/1 下午 04:19:21: \\?\DISPLAY#CMN1540#5&2b412772&2&UID512#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7} \\.\DISPLAY1\Monitor0
2023/10/1 下午 04:19:21: Screen = 165Hz : OK
123dqwkhjk commented 1 year ago

log.txt Hello, the screen refresh rate still stuck at 60Hz after installing the build you sent.

seerge commented 1 year ago

@123dqwkhjk try this one

GHelper.zip

123dqwkhjk commented 1 year ago

log.txt I have to tell you that i have replace the screen by myself.

seerge commented 1 year ago

@123dqwkhjk well, from last log it looks like it has set 165Hz ?

2023/10/1 下午 11:34:43: Screen = 165Hz : OK

I have added one more tweak to suppress error message appearing in the log

GHelper.zip

123dqwkhjk commented 1 year ago

log.txt hmm i doesn't seem working. it still show 60hz.

image
seerge commented 1 year ago

Well, from the log i see that it has tried to set 165hz (it does it via windows api) and windows even reported that it worked

2023/10/2 上午 01:50:11: Default internal screen
2023/10/2 上午 01:50:11: Screen = 165Hz : OK

It looks like some hiccup with the system, specifically in your case, as it doesn't return list of screens at first and then fails (apparently) to set a refresh rate.

Like windows is very slow to wake up, and actually do it's things.

I honestly don't know what else to offer here, as app gets a response that refresh rate change worked ...

123dqwkhjk commented 1 year ago

Well this problem is not bothering, so it is fine actually if it cannot be fixed. Idk, but in the windows graphic setting, it shows that the refresh rate is 60hz. Do you think this is due to some amd services? (I un-installed Asus smart display)

seerge commented 1 year ago

@123dqwkhjk it looks like windows (or GPU driver specifically) wake up too slowly in your case after enabling of GPU. So when app tries to do refresh rate change - system fails (it does it intentionally after GPU as otherwise it could cause conflicts)

Try this build, I have added a 0.5 seconds delay before refresh rate change, mb it will help a bit

GHelper.zip

123dqwkhjk commented 1 year ago

sadly still the same, should i try ac and report?

seerge commented 1 year ago

@123dqwkhjk

You can try this build, it still has same 0.5 seconds delay, but you can manually increase it to anything you want.

Just quit app, add refresh_delay parameter to a config.json, save it and start over and try the difference. Value is in milliseconds (so 2000 stands for 2 seconds for example)

Line to add to the beginning of config

"refresh_delay" : 2000,

GHelper.zip

123dqwkhjk commented 1 year ago

Ok thanks a lot sir! You are really a superhero to all rog tuf user.

seerge commented 1 year ago

@123dqwkhjk does it help?

123dqwkhjk commented 1 year ago

No sir. idk why it work when lid is open during all process, but broke while not.

seerge commented 1 year ago

@123dqwkhjk well, try to set some high delay, like 5000 (5 seconds)

123dqwkhjk commented 1 year ago

still no, even 7sec

seerge commented 1 year ago

@123dqwkhjk can you post a log from a run with 7 seconds ?

123dqwkhjk commented 1 year ago

log.txt of course

seerge commented 1 year ago

@123dqwkhjk oke, thanks.

I wanted to see if app indeed waits desired time after disabling eco mode . And it indeed does

2023/10/2 下午 08:12:56: GPUEco = 0 : OK -> ECO MODE OFF, dGPU ENABLED
2023/10/2 下午 08:12:56: PowerLimit A0 = 18 : OK
2023/10/2 下午 08:12:56: PowerLimit A3 = 18 : OK
2023/10/2 下午 08:12:56: PowerLimit C1 = 28 : OK
2023/10/2 下午 08:12:56: Display configuration changed.
2023/10/2 下午 08:12:56: Default internal screen
2023/10/2 下午 08:13:03: Eco flag : 0
2023/10/2 下午 08:13:03: Mux flag : 1
2023/10/2 下午 08:13:03:  DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL  -> it looks for internal display and tries and sets refresh rate
2023/10/2 下午 08:13:03: Default internal screen
2023/10/2 下午 08:13:04: Screen = 165Hz : OK
seerge commented 1 year ago

Given all the above, i'm afraid i can't offer anything else here :) as windows clearly refuses to work with display at all.

If it really bothers you - try to do a clean reinstall of GPU drivers using DDU . It may help :)

I'm closing this for now , as there is nothing else app can do here :)

123dqwkhjk commented 1 year ago

@seerge really thanks. If there are anythink i can help, do not hesitate to tell me.

123dqwkhjk commented 1 year ago

@seerge Hello, can this app detect after the lid reopen, then it will reapply the screen refresh rate setting?