A reliable way to identify display devices?
Asked Answered
C

1

7

I have been working on a solution for identifying display devices (telivisions in my case) to keep the main layout which is especially designed to use multi-monitors.

Let's say I have 6 televisions connected. (usually 3 of them via HDMI ports and other 3 via DVI port (using DVI-to-HDMI adapter)) and their physical locations are 3x2 like this:

TV1 ... TV2 ... TV3

TV4 ... TV5 ... TV6

The Goal

I want to display some full-screen content on each specific television. Content1 must go to TV1, Content2 must go to TV2 etc... In other words: I need to push my content to the DisplayDevice (television) - not to any Location or Screen because they can change due to Windows behavior. (see below)

As you may know, Windows does not enumerate the display devices in the order you connect them (or in fact not based on any rule at all?). It uses a total different way to enumerate displays, for example:

\.\DISPLAY3 ... \.\DISPLAY6 ... \.\DISPLAY1

\.\DISPLAY4 ... \.\DISPLAY2 ... \.\DISPLAY5

What I do to get over this, I order the televisions in Display Settings manually when I'm finished connecting all of them to match with their real locations.

The Issue

But there 's a problem here: Some television models just pretend like they 've been unplugged when they're switched off (or set to stand-by mode) and that causes Windows to drop the display device from the system and re-enumerate the display devices all over again.

Because of this behaviour (of both some television models and the Windows itself) I can not count on Screen.DisplayName property or even Screen.Location because they are variables. They both change right after the re-enumeration process.

Solutions that I've tried so far

I 've tried to get the serial numbers of all display devices, thinking that I could find a way to correlate those numbers with the Screen.DisplayName. Well, I actually managed the get there by using SetupAPI's, EnumDisplayDevices but this all went to garbage after I've realized that most of the televisions does not have a valid SerialNumber. Even the Samsung TV does not have a SerialNumber (but a Samsung monitor certainly does - so I guess it's about the difference between a "monitor" and "televisoin")

After all..

I'm still looking a way to get over this issue. The other idea that comes to my mind is, maybe I should stop trying to push the content to the Display Device (because they are unidentifiable) Maybe I should try to push the content to the graphic card's ports, which means I must determine which ports of graphic cards correlates to which display device (Screen) but I am all talking without any knowledge about it - without even knowing if such a thing is possible or not.

I'm looking for your advices, thanks by now.

Cachepot answered 19/9, 2015 at 22:22 Comment(4)
Your GPU idea sounds like it might work. Also, what about simply only using proper monitors that don't mess up when powered off?Ebullition
It's not up to me and the TVs were already present before I build this project.Cachepot
Did you ever find a way to determine which display device correlates with which graphic card port? I have this same problem I need to solve.Paxton
@Balk Nope, there is no solution for this. For multi-display purpose I use both HDMI and DVI (even DisplayPort) ports and I don't think there is a way to do it. However, a hardware based solution revealed itself by chance. Because most of the televisions use HDMI input, I use DVI-to-HDMI and DP-to-HDMI adapters for non-HDMI graphic card ports. And again, most of the times I use HDMI extenders because of the distance from PC to televisions and Uptech HDMI Extender solved my problem. It never drops the TV even if you unplug the HDMI cable at TV side. They are always there.Cachepot
L
1

When you are using DVI, there might be a hardware solution to your problem: EDID Managers. These devices emulate a valid EDID even when the monitor behind it is turned off.

Lahr answered 22/10, 2015 at 16:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.