Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OTH] External KVM support / question #244

Open
hakamairi opened this issue Sep 23, 2024 · 3 comments
Open

[OTH] External KVM support / question #244

hakamairi opened this issue Sep 23, 2024 · 3 comments

Comments

@hakamairi
Copy link

I have the following setup. LG C4 connected to external KVM on HDMI 4, external KVM switches between a PC and a laptop.
I've installed and configured LGTVCompanion on both devices.

The issue is that when one goes to sleep after switching then it turns off the TV off as well, the one currently connected is not handling this in any way.

I think it's more or less similar to #158 but I'm not quite sure, hence the new issue created.

Is this setup anyhow supported? How could I configure LGTVCompanion to have it working without interruptions?

@JPersson77
Copy link
Owner

Hi,

Yeah it is not straightforward. By default the two apps will send power commands to the TV based on the power state of the PC, regardless of whether the TV is connected via HDMI.

The Multi monitor support option in the app will recognise when a TV is attached/detached from the active desktop and turn the TV on/off respectively, but it's still a conflict between the two apps.

So the most straightforeard way is probably to ensure that automatic management of the TV is only enabled on the laptop or the stationary, exclusively.

This can be done manually, via the gui or a script.

Or it can be done automatically, by having a script running on both PCs to detect the presence of certain usb accessorirs (mouse/keyboard) and/or HDMI devices and toggle automatic management in the app on/off respectively.

Let me know your thoughts

@hakamairi
Copy link
Author

Hi,
Thanks for your quick answer. Any examples or pointers how such script would look like? If that works for me I'm happy to share to have it as example for others in the same situation.

@JPersson77
Copy link
Owner

JPersson77 commented Sep 23, 2024

I usually point towards autohotkey scripts but it can be done in other scripting languages ofcourse.

It involves hooking and waiting for a windows message and parsing the results, looking for a specific usb device id, and then send the appropriate command line to lgtv companion to enable/disable automatic management.

Here is a discussion on how to run X when usb device Y is detected as a start

https://www.autohotkey.com/boards/viewtopic.php?t=98931

Edit: more relevant link: https://www.autohotkey.com/boards/viewtopic.php?t=76221

Let me know on how you would like to proceed from here and I can probably help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants