BartoszCichecki / LenovoLegionToolkit

Lightweight Lenovo Vantage and Hotkeys replacement for Lenovo Legion laptops.
GNU General Public License v3.0
5.29k stars 238 forks source link

[BUG]: LLT override FN+R double switches refresh rate with one keypress #678

Closed bfrancom22 closed 1 year ago

bfrancom22 commented 1 year ago

Version

2.12.0

OS

Win11 Home 22621.1555

Device

Legion S7 16IAH7

BIOS version

JYCN49WW

What's wrong?

I have the LLT FN key override (Lenovo Hotkeys disabled). I have 3 total refresh rates on my computer 60hz 120hz and 165hz. When I press Fn+R to switch refresh rates, I see the screen flicker twice. It is acting as if I am pressing FN+R twice in rapid succession, effectively skipping the next refresh rate in line, and going from #1 to #3, or #3 to #2, etc. I have tried deleting one of them and running only 2 refresh rates, but it puts me back where I start. So if I try to go #1 to #2, it flickers twice and puts me back where I started at #1. Once my display is done changing (twice), the notification for the refresh change shows the correct one, immediately followed by the second one it shouldn't have switched to.

How to reproduce the bug?

Disable Lenovo Hotkeys, change refresh rate with Fn+R with built in LLT functionality

What is the behavior that you expected?

I expect it to switch only one refresh rate at a time, not 2.

Logs

log_2023_04_19_06_57_48.txt

Do you have Lenovo software installed?

Did you disable any Lenovo software using Lenovo Legion Toolkit?

Additional information

No response

BartoszCichecki commented 1 year ago

After checking your log I can see that refresh rate is changed correctly and it cycles between 90 > 120 > 165. If you look at timestamps of these events (beginning of the line) there is at least 1 second delay between them (pic 1), so Fn+R events are debounced correctly (pic 2).

Pic 1: image

Pic 2: image

BartoszCichecki commented 1 year ago

Actually let me take a look at this since the debounce period should be 2 seconds not one.

BartoszCichecki commented 1 year ago

@bfrancom22 please check if this build fixed the issue for you.

LenovoLegionToolkitSetup.zip

bfrancom22 commented 1 year ago

@bfrancom22 please check if this build fixed the issue for you.

LenovoLegionToolkitSetup.zip

This fixed it. Thank you!!! What a quick solution.