JPersson77 / LGTVCompanion

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

LG companion turning tv on when streaming desktop. #31

Closed PsYchitOut closed 1 year ago

PsYchitOut commented 2 years ago

Hey there. I typically enjoy using the setting where it blanks the monitor after a couple minutes with no input. However, it causes a conflict with any remote PC software for gaming such as Steam Link or Moonlight. Problems pretty obvious, I connect to PC, it triggers the LG companion to turn on my tv. Even if I'm hundreds of miles away playing over my phone. Only fix I've found is to go into the settings every morning before I go to work. Disable the feature that blanks the tv. Then remember to turn it back on when I get home. Not sure if Windows Remote Desktop causes the issue I currently have it disabled but I can test it when I get home if you like.

JPersson77 commented 2 years ago

Hey, It should behave just like a regular monitor in these aspect I would assume.

But I'm a little confused by your description of the issue - is the issue you experience that the TV turns on when you remote into the PC, or is the issue that the screen is blanked after X minutes (during your remote sesssion)?

PsYchitOut commented 2 years ago

Sorry for confusion. Probably would make more sense if I describe the situation. In my testing I found I might be misdiagnosing the problem.

I have the display set up to turn on when my PC turns on , turn off on shutdown, and blank when my PC has been idle for 2 minutes.

So in the morning I turn on the PC, log in and then turn my TV off so while I'm on break at work I can connect with Steam Link or something and play some games. When I connect to the PC it doesn't turn the display on but if I click around in the desktop or use a controller bind that emulates keyboard presses it will turn my TV on.

On Mon, Apr 11, 2022, 1:07 PM JPersson77 @.***> wrote:

Hey, It should behave just like a regular monitor in these aspect I would assume.

But I'm a little confounded by your description of the issue - is the issue you experience that the TV turns on when you remote into the PC, or is the issue that the screen is blanked after X minutes (during your remote sesssion)?

— Reply to this email directly, view it on GitHub https://github.com/JPersson77/LGTVCompanion/issues/31#issuecomment-1095373148, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF2WEQF5XNRGNJ5IXVQKPPLVERS7FANCNFSM5TC6TFLQ . You are receiving this because you authored the thread.Message ID: @.***>

JPersson77 commented 2 years ago

Ah I see what you mean. Not sure but it might be possible for LGTV companion to detect if the PC is being remoted into (without knowing much about steam link) and then temporarily disable the function (as an option)

In the meantime you can try to workaround by finding a way of automatically running a script on steam link /nvidia gamestream connect/disconnect. I tried some googling but could not find any immediate answers, maybe you have an idea of how to do this already?

If you can find a way to do this, then In the connect script you could execute "LGTV Companion.exe -autodisable Device1" to temporaily stop the automatic management of Device1 (this includes the screen blanking feature)

Similarly, on disconnect you could execute "LGTV Companion.exe -autoenable Device1" to reenable the management of Device1.

comman line reference: link

JPersson77 commented 2 years ago

Check out the new version which has some optimisaations for RDP, which I hope will help in this case too. Please let me know how it goes.

Shiroe93 commented 2 years ago

it's not working with moonlight one solution could be (if possible) to react only to a specif device since moonlight creates virtual device for remote gaming

JPersson77 commented 2 years ago

I will investigate for next version. Just got myself a nvidia shield Pro which should help with testing and discovery gamestream/moonlight/steamlink

Shiroe93 commented 2 years ago

Awesome! I look forward to this new update

JPersson77 commented 1 year ago

Hi again @Shiroe93 I've uploaded a development build to discord with this feature if you want to test before it's released. #development-builds @ https://discord.gg/7KkTPrP3fq

Shiroe93 commented 1 year ago

Thanks I will try it as soon as I can

JPersson77 commented 1 year ago

Sounds good, please let me know how it goes! Thanks for the tip on the virtual controllers that was the right way

JPersson77 commented 1 year ago

Implmented so closing the issue