JPersson77 / LGTVCompanion

Power On and Off WebOS LG TVs together with your PC
MIT License
992 stars 40 forks source link

Blank on idle stopped working #83

Closed sreenisatish closed 1 year ago

sreenisatish commented 1 year ago

The app worked perfectly fine for a few weeks until yesterday, the blank on idle stopped working. I have tried to do some debugging on my own - nothing seems to be working and I am at my wits end.

Things tried:

  1. Assigned static IP for the TV on my router
  2. Removed all devices and scanned and re-added
  3. Enable logging
  4. Verified that the service is running in services.msc. Tried re-starting it too.
  5. Ran the LG TV Companion (daemon) executable manually as well.
  6. Tried setting/unsetting the only turn off when HDMI is input.

From the log:

Sat 22:14:16 > LGTV Companion Service started (v 1.8.0) ---------------------------
Sat 22:14:16 > Configuration file successfully read
Sat 22:14:16 > Data path: C:\ProgramData\LGTV Companion\
Sat 22:14:16 > Device1, [LG] webOS TV OLED42C2PUA, with IP 192.168.86.38 initiated (Enabled:yes, WOL:2, PairingKey:e0454e821a19f36a8d1f44d021cb7a0f, MAC: 4C:BA:D7:C3:0F:AA , VerifyHdmiInput:1, SetHdmiInput:1, BlankOnIdle:on(1m))
Sat 22:14:16 > Host IP detected: 192.168.86.31
Sat 22:14:16 > Setting shutdown parameter level 0x3FF
Sat 22:14:16 > ** System requests displays ON.
Sat 22:14:16 > Device1, spawning DisplayPowerOnThread().
Sat 22:14:16 > Device1, repeating WOL broadcast started to MAC: 4C:BA:D7:C3:0F:AA using IP address: 192.168.86.38
Sat 22:14:16 > GetBestRoute2() selected interface index 12 LUID 1689399733518336 route protocol 2
Sat 22:14:16 > Device1, spawning DisplaySetHdmiInputThread().
Sat 22:14:16 > IPC, Daemon has started.
Sat 22:14:17 > Device1, established contact. Set HDMI input: 1
Sat 22:14:17 > Device1, established contact: Display is ON.  
Sat 22:14:18 > Device1, repeating WOL broadcast ended

Seems like the app is talking to the TV. Test -> Turn off works. Perhaps it is the idle detection which is broken? Any pointers on how to debug this further?

Other details: Windows 11. 42 inch LG C2 TV software version: 03.21.30

sreenisatish commented 1 year ago

Oh and the Windows power setting Turn off display after 'X minutes' also does not seem to be working. Is it possible that some app is interfering with the idle detection system wide?

sreenisatish commented 1 year ago

Ah I just figured this out! I had my PS5 controller plugged in with USB. It appears that the controller is what was interfering with the idle detection. Feel free to add this in the troubleshooting section.

JPersson77 commented 1 year ago

Thanks for the detailed report. I would not expect the PS5 controller to cause this issue actually. Don't have one to test with though.

I am looking to make the blank on idle features a bit more granular so maybe it would be possible to add some additional checks or logic to prevent some controllers from triggering this behaviour. I've seen at least one other report of controllers causing whar you describe, and as you also noticed it will also prevent screensavers and windows from sleeping

dechamps commented 1 year ago

One possible explanation is this GeForce Experience bug that disrupts Windows input detection when a joystick is plugged in. If you have GeForce Experience installed, try disabling the overlay.

JPersson77 commented 1 year ago

@dechamps that was a very interesting read!

JPersson77 commented 1 year ago

Just leaving this here as there is some progress on the issue: https://www.techradar.com/news/its-finally-game-over-for-one-of-windows-11s-oldest-and-annoying-bugs