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.41k stars 265 forks source link

Touchpad layout shows ON when I turn it off for the first time. #732

Closed kuonji-arisu closed 1 year ago

kuonji-arisu commented 1 year ago

Steps to reproduce the behavior:

  1. turn off G-Helper with touchpad on
  2. press FN+F10
  3. layout show "ON" but actually disabled

Expected behavior layout shows "OFF"

Asus software

App Logs

2023/7/6 11:07:46: WMI event 107
2023/7/6 11:07:53: WMI event 107
2023/7/6 11:07:56: WMI event 107
2023/7/6 11:07:57: WMI event 107
2023/7/6 11:09:12: ------------
2023/7/6 11:09:12: App launched: ASUS TUF Gaming F15 FX507ZM_FX507ZM :0.95.0.0zh-CN
2023/7/6 11:09:12: NVIDIA GeForce RTX 3060 Laptop GPU
2023/7/6 11:09:13: CPU: -1 - 12th Gen Intel(R) Core(TM) i7-12700H - Intel64 Family 6 Model 154 Stepping 3
2023/7/6 11:09:13: AutoSetting for Online
2023/7/6 11:09:14: Input device not found
2023/7/6 11:09:14: Mode = 0 : OK
2023/7/6 11:09:14: Eco flag : 0
2023/7/6 11:09:14: Mux flag : 1
2023/7/6 11:09:14: ScreenOverdrive = 0 : OK
2023/7/6 11:09:14: BatteryLimit = 100 : OK
2023/7/6 11:09:14: BatteryLimit = 100 : OK
2023/7/6 11:09:14: TUF Brightness = 129 : OK
2023/7/6 11:09:14: Monitor Power On
2023/7/6 11:09:17: Latest version 0.95.0.0
2023/7/6 11:09:23: WMI event 107
2023/7/6 11:09:25: WMI event 107

Desktop (please complete the following information):

kuonji-arisu commented 1 year ago

Update: It seems that this problem does not only occur after the first launch of GHelper, but also after a period of time without triggering FN+F10.

seerge commented 1 year ago

@kuonji-arisu does a switch work in general? I thought on asus TUF models touchpad toggle were ignored ? :)

kuonji-arisu commented 1 year ago

@seerge This problem only occurs after the first boot or a period of time without triggering FN+F10, and then it will display normally when triggered again.

seerge commented 1 year ago

@kuonji-arisu my question if FN+F10 actually turn touchpad off or on ? Currently app uses USB call to do that, and that seemed to work only on ROG models, not TUF

kuonji-arisu commented 1 year ago

@seerge actaully works, but display wrong

seerge commented 1 year ago

@kuonji-arisu do you have asus optimization service running?

kuonji-arisu commented 1 year ago

no, all asus service are disabled

seerge commented 1 year ago

@kuonji-arisu oke, thanks :) currently app "reads" touchpad status from windows registry

Can you please check what do you have under SOFTWARE\Microsoft\Windows\CurrentVersion\PrecisionTouchPad\Status (especially on a first boot) ?

It should be Enabled : 1 flag there (if it's actually enabled)

seerge commented 1 year ago

Or check what do you have under Settings -> Bluetooth & Devices -> Touchpad (on first boot)

https://stackoverflow.com/questions/72819528/change-windows-11-touchpad-toggle-programmatically

seerge commented 1 year ago

@kuonji-arisu or you can just try this build, it will write current touchpad status (from windows registry) on the moment BEFORE toggling it:

GHelper.zip

kuonji-arisu commented 1 year ago

The options in the registry/settings always sync with the actual state of the touchpad( after refresh registry or re-open setting page ), only the display of GHelper sometimes deviates. After my multiple tests, this problem does not occur every time I start up ghelper, and I have not figured out its exact rules. In addition, it not only shows “ON” when it should show “OFF”, sometimes it will also reverse - this depends on the touchpad state before closing GHelper, osd layout will show same status as last time. btw, the new build did not solve this problem.

seerge commented 1 year ago

@kuonji-arisu new build is not supposed to solve anything, i have just added a log entry there :) can you try to "replicate" situation and post a log after that here ? : ) thanks

kuonji-arisu commented 1 year ago
2023/7/6 17:22:12: WMI event 107
2023/7/6 17:22:12: Touchpad status:0
2023/7/6 17:24:27: WMI event 107
2023/7/6 17:24:27: Touchpad status:0
2023/7/6 17:24:28: WMI event 107
2023/7/6 17:24:28: Touchpad status:1
2023/7/6 17:24:29: WMI event 107
2023/7/6 17:24:29: Touchpad status:0
<- re open ghelper with touchpad on

2023/7/6 17:26:28: ------------
2023/7/6 17:26:28: App launched: ASUS TUF Gaming F15 FX507ZM_FX507ZM :0.95.0.0zh-CN
2023/7/6 17:26:29: NVIDIA GeForce RTX 3060 Laptop GPU
2023/7/6 17:26:30: CPU: -1 - 12th Gen Intel(R) Core(TM) i7-12700H - Intel64 Family 6 Model 154 Stepping 3
2023/7/6 17:26:30: AutoSetting for Online
2023/7/6 17:26:31: Input device not found
2023/7/6 17:26:31: Mode = 0 : OK
2023/7/6 17:26:31: Eco flag : 0
2023/7/6 17:26:31: Mux flag : 1
2023/7/6 17:26:31: ScreenOverdrive = 0 : OK
2023/7/6 17:26:31: BatteryLimit = 100 : OK
2023/7/6 17:26:31: BatteryLimit = 100 : OK
2023/7/6 17:26:31: TUF Brightness = 129 : OK
2023/7/6 17:26:31: Monitor Power On
2023/7/6 17:26:33: Latest version 0.95.0.0
2023/7/6 17:26:37: WMI event 107
2023/7/6 17:26:37: Touchpad status:0 <- display on but actually off
2023/7/6 17:26:57: WMI event 107
2023/7/6 17:26:57: Touchpad status:0 <- now display on and actually on
2023/7/6 17:26:59: WMI event 107
2023/7/6 17:26:59: Touchpad status:1
seerge commented 1 year ago

@kuonji-arisu thanks, can you try this build instead ? :

GHelper.zip

kuonji-arisu commented 1 year ago

I haven’t reproduced the problem in the new build for now, maybe it was solved. By the way, the “OFF” in the layout became “OF”.

seerge commented 1 year ago

@kuonji-arisu that's a typo :) sorry. In new build app will try to read touchpad status AFTER toggling it, so it should be accurate.

The reason i didn't do that in a first place, is cause windows is sometimes slow with updating a registry -> therefore it could be that actual state is changed, but registry would report old value.

seerge commented 1 year ago

GHelper.zip This one should say OFF :)

kuonji-arisu commented 1 year ago

The layout is displayed normally now, thank you!