Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitor DDC not detected sometimes (new wmi-bridge on beta) #809

Open
eikaramba opened this issue Aug 26, 2024 · 8 comments
Open

Monitor DDC not detected sometimes (new wmi-bridge on beta) #809

eikaramba opened this issue Aug 26, 2024 · 8 comments

Comments

@eikaramba
Copy link

eikaramba commented Aug 26, 2024

I have the LG 34GN850-B Monitor which offers DDC. Working 100% in ClickMonitorDDC (https://github.com/chrismah/ClickMonitorDDC7.2)

Now i switched to Twinkle-Tray because ClickMonitor crashes after hibernation.

Twinkle-Tray was detecting my monitor with the default settings, however today it stopped working and no restart, switching to legacy mode etc did not helped. Then i started ClickMonitor again to see if it is working. Low and behold after THEN exiting ClickMonitor and starting Twinkle it was able to detect the Monitor. Weird right? Is there any way i can help debugging the issue?

I am on latest beta 1.16.0-beta7

@eikaramba
Copy link
Author

eikaramba commented Aug 29, 2024

i cloned the repo on the beta branch and started it locally, there i can see that i get "Sorry, no updates right now!" all the time. so it seems the monitorthread is never launched somehow or there is a race condition. so clickMonitorDDC does not seem to have anything to do with it. i also don't see "WMI-BRIDGE TEST" in that case.

trying it again after a few times it works and i can see my monitor. will see if i can pinpoint the exact cause

@eikaramba eikaramba changed the title Monitor DDC not detected sometimes Monitor DDC not detected sometimes (new wmi-bridge on beta) Aug 29, 2024
@eikaramba
Copy link
Author

ok i think there is something going on in the getWMIMonitors c++ code.
how can i see the log statements from the c++ code so that i can better see what is going on? @xanderfrangos

@eikaramba
Copy link
Author

eikaramba commented Aug 29, 2024

i found out how to print the debug lines here is the log where the monitor was not detected. i can now say he is stalling at this line and never continues and resolves the promise https://github.com/xanderfrangos/twinkle-tray/blob/master/src/wmi-bridge-test.js#L22

Starting Twinkle Tray...
Starting Parcel bundler server...
[PIPE] Starting named pipe...
[PIPE] Server listening at \\.\pipe\twinkle-tray\cmds
Function: getThemeRegistry
Creating panel...
Running wmi-bridge test...
getting monitors
Line: getWMIMonitors 1
Line: wmiConnect 1
Line: wmiConnect 2
Line: wmiConnect 3
Line: wmiConnect 4 END
Line: getWMIMonitors 2
Line: getWMIMonitors 3
Line: getWMIMonitors 4
Line: getWMIMonitors 5
Line: getWMIMonitors 6
Line: bstr_to_str 1
Line: bstr_to_str 2
Line: bstr_to_str 3
Line: bstr_to_str 4
Line: bstr_to_str 5 END
Line: getWMIMonitors 7
Line: getWMIClassUINTString 1
Line: getWMIClassUINTString 2
Line: getWMIClassUINTString 3b
Line: getWMIClassUINTString 4
Line: getWMIClassUINTString 5
Line: getWMIClassUINTString 6
Line: getWMIClassUINTString 7
Line: getWMIClassUINTString 8 END
Line: getWMIMonitors 8
Line: getWMIMonitors 12
WMI-BRIDGE TEST: READY
[UDP] Starting local UDP Server...
Function: getThemeRegistry
Function: getThemeRegistry
[UDP] UDP server listening at 127.0.0.1:14715
Function: getThemeRegistry
Panel ready!
~~~~~ MAIN WINDOW MINIMIZED ~~~~~~
Sorry, no updates right now! false false
Function: getThemeRegistry
~~~~~ MAIN WINDOW RESTORED ~~~~~~
overlayType: safe
~~~~~ MAIN WINDOW MINIMIZED ~~~~~~

@eikaramba
Copy link
Author

i suspect the loop https://github.com/xanderfrangos/twinkle-tray/blob/master/src/modules/wmi-bridge/wmi-bridge.cc#L243 is never finishing, i am now trying to debug this. unfortunately once the monitor was detected after a few attempts i need to wait again until the error happens. maybe it is caused by hibernation? let's see

@xanderfrangos
Copy link
Owner

xanderfrangos commented Aug 30, 2024

@eikaramba If you disable WMI-Bridge under General -> Troubleshooting -> Enabled monitor detection methods, does that fix the issue?

Do you ever get WMI-BRIDGE TEST: OK or WMI-BRIDGE TEST: Killing thread in your logs? The test should time out after 2 seconds.

Also, are you on a laptop or desktop?

@eikaramba
Copy link
Author

eikaramba commented Aug 30, 2024

  • waiting does not help, i did wait multiple times for more than 10-30 minutes.

For the rest i need to check again, because the error unfortunately only happens sometimes...
update: still waiting for it to happen again, somehow it did not happen in the last days.

@xanderfrangos
Copy link
Owner

@eikaramba Rolled out a new beta that might help. It's possible there was a race condition that caused the test to never finish.

@eikaramba
Copy link
Author

thanks i will test it. on the old version disabling wmi bridge did not help. unfortunately i rarely happened in the last days so i wasn't able to debug it more but will test the new version. if it does not happen in the next 3 months i will close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@eikaramba @xanderfrangos and others