JPersson77 / LGTVCompanion

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

Multi monitor support #161

Open ka5p3rr opened 11 months ago

ka5p3rr commented 11 months ago

Hey, first of all, fantastic work! I love this software. It's absolutely amazing.

I have encountered a couple of issues with multi-monitor support.

My setup is as follows:

I have enabled and run through the setup wizard to enable multi-monitor topology. Through using the software I have noticed some issues with the power state of the TV. For better display management I'm using Display Fusion to enable/disable different sub-sets of monitors+TV. I have a config for only the two monitors being enabled and one for just the TV.

I have these two options enabled: image

Some scenarios:

  1. TV is turned off. I have the two monitor config loaded. I switch my config to just TV. This successfully and correctly manages the TV's power state. For example, the TV powers on when I switch my profile just to use the TV, and vice versa when I switch back the TV turns off. Brilliant.
  2. TV is turned on but I have a different input on or an app running. I have the two monitor config loaded. I switch my config to just TV. This doesn't change the TV's power state. Would it be possible to change the input on the TV only if it is enabled in monitor settings under Windows? I can see in the logs that the topology is changed, i.e. it is correctly detected.
  3. TV is turned on but I have a different input on or an app running. I turn on my PC with the two monitors config. This turns my TV's input to PC. This is fine as I have the second checkbox under Miscellaneous device options. It would be great if this only happened when the TV is enabled under Windows.
  4. TV is turned off. I turn on my PC with two monitors config already set. I can see the TV being disabled in the Nvidia Control panel and Windows 11 monitor settings. Unfortunately, this also turns my TV on despite being disabled. It seems like the monitor topology condition in this scenario is not checked.

Is this an issue with my configuration? Thanks! I guess what I would like to achieve is better synchronisation of the TV input and power state based on it being enabled/disabled in Windows.

JPersson77 commented 9 months ago

Hi @ka5p3rr apologies for the delayed response - totally missed your message. Thanks for the kind words and detailed scenarios

  1. Great!
  2. Do I understand correctly that you would like the TV to switch to the PC input when you enable the "just TV" profile? If so that might make sense to implement
  3. Gotcha. I will add it to the feature requests
  4. Topolgy changes are currently triggered in one of two ways. a) when windows signals a change (after you changed display fusion profile for example) b) eight seconds after the user has logged on

Regarding 4) I'm not sure if you mean a cold boot or system resume. If you mean a cold boot then the behaviour should be that the TV power on as soon as the service loads, before the user logon screen and to allow for the user to properly login. Then, after user logon, and if the topology function is enabled in the app and the TV is disabled in the windows monitor settings you will notice the TV turning off eight seconds after logon (after the daemon has loaded actually). The monitor topology is a user space feature so there is not so much else to tweak regarding this behaviour.

If you refer to a system resume (after sleep) then the topology state (disabled/enabled) should be preserved and adhered to.

If you can clarify on no 4 above please and also please paste a log I will have a look.

JPersson77 commented 7 months ago

Hi @ka5p3rr any input wrt the above? Check out the next version as well which allows for restoring the topology on boot (before logon)

ka5p3rr commented 7 months ago

Hello @JPersson77, apologies for not getting back to you earlier.

I have just updated the app, thank you!

In terms of your comments on the provided scenarios:

  1. Yes, exactly. I would like the inputs on the TV to switch to my PC as the display output is enabled under Windows.
  2. Awesome, thank you!
  3. Ahh, that makes sense. Thanks for the explanation.

In terms of the changes in the update, is that addressing point number 3.?

JPersson77 commented 7 months ago

point no 4 :)

ka5p3rr commented 7 months ago

Exciting, I will check that out. Thank you :) I will run through my scenarios again and let you know