JPersson77 / LGTVCompanion

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

No Longer Turns Off TV, Just Sets It to Blank #167

Closed matthewvinton closed 1 year ago

matthewvinton commented 1 year ago

Hey all, I thought it would be best to break this into a specific issue, though it appears to be the same as referenced in this comment:

https://github.com/JPersson77/LGTVCompanion/issues/166#issuecomment-1718485633

Test works fine, and turns off the display. Turning the display on also works. But at idle, it doesn't turn off the display, it just sets the screen to blank. I have disabled display management in Power Settings.

I am running Win11 22HT, build 22621.2283. Screen is a CX48 webOS version 5.4.3-36

Here is the relevant log section:

Tue 08:54:19 > Device1, spawning Thread_DisplayOff().
Tue 08:54:19 > Device1, [DEBUG] (SSL) OFF response 1: {"type":"registered","id":"register_0","payload":{"client-key":"5abc62b4cda4e980361fd721fee96f00"}}
Tue 08:54:19 > Device1, [DEBUG] (SSL) OFF response 2: {"type":"response","id":36,"payload":{"returnValue":true,"state":"Screen Off"}}
Tue 08:54:19 > Device1, power state is: Screen Off

I don't think this is network related, as "Test" works correctly, and the TV turns off and on correctly through Home Assistant.

JPersson77 commented 1 year ago

Hi @matthewvinton

Thanks for the report! I can't say from the log snippet but from reading your description it sounds like it's working as expected. User idle mode (in the app) will blank the screen after X minutes of inactivity. The power management function in windows (turn off screen after x minutes) will power off the screen.

Myself I have it configured so that user idle mode triggers after 5 minutes, then power off screen after 20 minutes and lastly PC sleep after 30 minutes. The main benefit of user idle mode is that it will always trigger regardless of whether an application has registered with windows to not go to sleep.

matthewvinton commented 1 year ago

Ah, thanks @JPersson77! I thought it was an override of Windows built in Power Management (as a more reliable method due to the way apps can request the screen stay on) - but it makes sense to blank as that override, as that prevents the screen from burning in. I'll troubleshoot why Windows Power Management isn't working right, as I DID have that enabled before I started to troubleshoot things. Thanks again!