DEV Community

Jesse M. Holmes
Jesse M. Holmes

Posted on

How does Windows detect my external monitor position?

At home my external monitor is above my laptop. At the office it is to the right (well, to be fair, it's Ayja's monitor, but she is having a blast in San Antonio, soooo …). Who can fill me in on the technical bits where Windows knows the difference and remembers their positions? This is a rabbit hole I am willing to jump down!

Top comments (2)

Collapse
 
helgef profile image
helgef

I would assume it saves the screen serial number and the orientation/location you set for it last time you configured. Serial can be obtained through the EDID protocol en.m.wikipedia.org/wiki/Extended_D...

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

It doesn't really detect the position, it detects which displays are connected.

Windows looks at the EDID (extended display identification data) or DisplayID. All displays that implement either of these protocols (which is pretty much everything on the market today using either VGA or a digital video interface) provide a bunch of information, including a manufacturer and product ID, serial number, and rough date of manufacture (week and year). Together, that info can be used to identify specific displays with a very high degree of reliability, which lets Windows remember settings for each display you connect to it independently.

Relative position is a bit more complicated than that though. Windows stores position layouts keyed to which set of displays are connected, not on a per-display basis. So, if you have 3 displays A, B, and C, you can have different position layouts for each combination of two as well as yet another different one for all three being connected. The same is true of all other OSes that remember this type of configuration, as it's really the only sane way to handle it.