Switch display input back to current display input (HDMI/DP) Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
GothicIII
Posts: 20
Joined: 17 May 2022, 04:16

Switch display input back to current display input (HDMI/DP)

Post by GothicIII » 17 May 2023, 15:45

Hello,

so I've got a script that builds through dllcalls a monitor-handle and uses that to send/get VCP-Codes directly to the monitor.

For those who don't know: VCP stands for virtual control panel and is part of a monitor control command set (mccs) which is a lowlevel api for controlling your monitor. It is a god-send when your monitor buttons are plain unuseable due to their positioning.

While this works as expected (switching input/turning off monitor) a pretty nasty problem remains:
When the connection breaks e.g. switching from DP to HDMI I cannot switch back from HDMI to DP because the monitor seems to be physically disconnected so retrieving the monitor handle fails.

Is there some kind of library/function which is able to send a signal to the monitor so it switches back? I believe for HDMI it is part of the CEC (consumer eletronics control) spec but I'd need some
advice where to look. Windows doesn't seem to natively support this so I am lost.

Please help

Thank you!

GothicIII
Posts: 20
Joined: 17 May 2022, 04:16

Re: Switch display input back to current display input (HDMI/DP)  Topic is solved

Post by GothicIII » 25 May 2023, 02:06

To answer my own question:
The CEC spec must be supported by the hardware (and driver) and AFAIK at least Nvidia (I believe AMD too) cards do NOT support this at all.
What exists is a CEC Usb adapter which connects to the HDMI port. The CEC signal is then send over USB. I can't find anything about CEC for DP.
Most likely this feature is HDMI-Only.

So no, due to missing hardware CEC support it is not possible directly.

wantop
Posts: 7
Joined: 25 May 2023, 03:20

Re: Switch display input back to current display input (HDMI/DP)

Post by wantop » 25 May 2023, 11:29

Why don't you buy a switch (supported by hardware) for this switch? It's very cheap and supports shortcut key switching. It is not possible for you to switch between storage software, unless it is configured for a special computer host with high configuration, dual output.

There is also a multi screen display switch, where shortcut keys can achieve computer win+p.

I don't know what your connection method is?

GothicIII
Posts: 20
Joined: 17 May 2022, 04:16

Re: Switch display input back to current display input (HDMI/DP)

Post by GothicIII » 25 May 2023, 16:38

I've got a monitor with DP and 2x HDMI inputs. PC is DP and device is HDMI. If I turn on 'device' the input signal is automatically switched to the HDMI input. If I turn 'device' off, the monitor stays black and does not switch back. That is my problem. Since the GPU is not able to provide HDMI2.1 I have to use DP for my 4k@120hz monitor or I stuck @60hz.
Since I develop ahk plugins for my stream deck it would be neat to include something like this.

wantop
Posts: 7
Joined: 25 May 2023, 03:20

Re: Switch display input back to current display input (HDMI/DP)

Post by wantop » 25 May 2023, 20:13

Suggest creating a multi input and one output switch with shortcut keys for switching

Post Reply

Return to “Ask for Help (v2)”