JPersson77 / LGTVCompanion

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

Test works but TV will not power off on normal shutdown #226

Open catsncode opened 1 month ago

catsncode commented 1 month ago

Thanks for this amazing and helpful code!

Power on is working, but I just can't get it to power off even though the test mode works fine. I have tried, early and delayed. I checked the error log and it says:

"Did not receive the anticipated event subscription call back prior to shutting down unable to determine if system is shutting down or restarting!"

Any ideas on how I can troubleshoot? This is a windows 11 machine with a C2 TV on hdmi 2. I had some weird issues with interference or something on hdmi 1, which is why I switched to 2. I have also tried setting the TV to always on mode but it did not help.

Thanks!

catsncode commented 1 month ago

I will also add that I have 3 physical monitors, the other 2 are connected via display port. Not sure if that is relevant or not but thought it was worth mentioning. Thanks again!

JPersson77 commented 1 month ago

Hi @catsncode can you try enabling persistent connections please (device onfigutation). If that does not work please paste a log and I will have a look

catsncode commented 1 month ago

Sorry for the delay, my machine was down for a bit. Now I can test again. Persistent connections was already checked. I just tried it and it worked fine... If it starts acting up again, I'll post the log. Thanks!

Kingston1 commented 1 month ago

@JPersson77 I seem to have this same issue. TV does not turn off on system shut down. I don't know what test mode is and where to use it, so cannot tell if that works.

Also, what does it mean to "enable persistent connections please (device configutation)". Which device, which app, which software, which system. On TV, on PC?

JPersson77 commented 1 month ago

hi @Kingston1 the test function is in the drop down menu of main UI page:

image

the persistent connections are enabled in the app's configuration page for the TV:

image

Kingston1 commented 1 month ago

@JPersson77 well argh. My mistake. I was using a seriously old version. I installed the latest (4.0.5) and everything works flawlessly with default settings, through both Wifi and LAN.

But to my defence, I landed on this app through a very prominent Google search result, which is pointing to that seriously ancient version: https://www.reddit.com/r/OLED_Gaming/comments/vlx8nz/turn_lg_oled_onoff_automatically_via_pc/

I was stupid and assumed the link was legit. I don't have reddit account but someone should get that person to link to the releases page instead.

Thanks for your flawless software though!

catsncode commented 1 month ago

After that 1 time it worked, it has failed to work after that every time. I've probably shutdown around 15 times as I'm testing some other stuff on the machine.

Here is a clean debug log I took that shows a shutdown and startup. The power on always works, but it's very slow. Is there any way to speed it up?

Thanks again!

lgtv-companion-log.txt

JPersson77 commented 1 month ago

Hi @catsncode you are right that comms seem slow and it seem to be causing problems. Usually a response from the TV is immediate but I can see seconds long delays. First, try and pull the power plug on all network equipment, the PC and the TV, including access points, routers, switches etc. I have seen that help more than ten times probably.

Then make sure shutdown timing is set to delayed and that persistent connections are enabled.

Fingers crossed...

catsncode commented 1 month ago

I would have thought to put shutdown timing to early since the PC is powering off before the TV is shutting off. It is still not working. The power on works like a champ every time (unless the TV is somehow doing that itself when it sees the hdmi signal?)

I haven't rebooted the router yet because I'm worried it could mess some other things up. The TV's assigned IP has not changed so I'm not sure what rebooting would accomplish as I think it would still assign it the same one.

Thanks!

JPersson77 commented 1 month ago

Hi again, the reason I suggest to power cycle all network equipment, PC and TV is because something is/seem to be causing delays in the network communications and this was the solution for a few people with similar issues.