loading...

How does Windows detect my external monitor position?

twitter logo github logo ・1 min read

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!

twitter logo DISCUSS (2)
markdown guide
 

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...

 

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.

Classic DEV Post from Mar 23 '19

50+ Data Structure and Algorithms Problems from Coding Interviews

A collection of data structure and algorithms coding problem from interviews including essential data structure like string, array, linked list, binary tree, hash table etc.

Jesse M. Holmes profile image
⛡️ Building ambulatory healthcare software in beautiful, historic Annapolis, Maryland. Brass-bander. ADHD Avenger. Lover of giant hounds. Believer in the impossible.

πŸ‘‹ Hey dev.to reader.

Do you prefer sans serif over serif?

You can change your font preferences in the "misc" section of your settings. ❀️