What registry key or windows file determines where monitors are placed in a multi monitor environment?

17

10

I have a laptop with a USB to VGA adapter which allows me to add a third monitor to my laptop (the second monitor uses the onboard slot).

It worked fine on Windows Vista - you could go into Windows' display settings and Windows would recognize the third monitor and let you drag it around accordingly. With Windows 7, the third monitor literally is not there in Windows' display settings. The driver allows you to display to the third monitor, but you can't move where it is. The display settings are misplaced relative to my other two (if you drag windows over to it, they end up on the bottom when it should be aligned).

I called tech support and they said that there isn't a driver with this functionality for Windows 7 yet. But here's my hunch. The monitor placement is still somewhat similar to where I had it on Vista, it's just off about 500 pixels or so. I think there is either a registry key or driver file somewhere that is telling this monitor where to exist. If I could just modify the number and move it up 500 pixels, it would be in the right place and I don't have to wait 6 months for the company to come out with a new driver.

Any ideas?

dfree

Posted 2010-02-09T17:11:01.507

Reputation:

Answers

8

Check out the various keys and folders in

HKEY_CURRENT_CONFIG\System\CurrentControlSet\Control\Video

Specifically in the innermost MonXXXXXXX sub-folders should be Attach.RelativeX and Attach.RelativeY values which are the monitors' location in relation to pixel 0,0.

Strangely when I check a Windows 7 machine here with two monitors, it doesn't seem to show the second monitor. But my XP machine shows all three of mine, so your mileage may vary.

If nothing else it's a place to start!

Ƭᴇcʜιᴇ007

Posted 2010-02-09T17:11:01.507

Reputation: 103 763

Great find! This is exactly they keys I was looking for. Modifying the relativeY value in two places and then restarting the extended desktop usb driver causes it to shift. Now here's the remaining problem: Because of the way the monitors are configured, I need to put in a NEGATIVE value. How would I do that?

Putting in a positive value only puts the monitor I need even lower.

Here is my setup:

2 3 1

Those are the monitor numbers (1 and 2 are touching and three is off to the side).

Changing the attach.relativeY value makes 3 appear to go even lower, I want to raise it. – None – 2010-02-09T21:45:42.210

looks like the formatting didn't keep there but hopefully you get the gist - 2 is above 1 and three is on the right of both of them, centered in between the two. Digitally, windows is placing it next to monitor 1. – None – 2010-02-09T21:47:03.347

Waht happens when you try entering a negative value? In the end, you may have to rig a startup script to make the adjustment when you log in (if it's not going to stick on it's own). – Ƭᴇcʜιᴇ007 – 2010-02-10T04:56:42.903

You can't enter a negative value, windows won't let you. In the hexidecimal part of the registry you can put numbers and letters and in the decimal portion you can only put numerical values.

That 4 billion number I posted definitely works and sticks, I'm just not sure why. Maybe there is some sort of code in windows that means that the 429496xxxx denotes a negative number. The last 4 numbers correlate to the amount of pixel deslpacement beyond the negative. – None – 2010-02-11T02:57:52.063

Sweeeeeeeet. ;) – Ƭᴇcʜιᴇ007 – 2010-02-11T03:07:59.500

27

For anyone that is looking for the key in Windows 7 it is in one of the folders in:

HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\

Look for Position.cx and Position.cy in each of the subfolders; you have to edit the hex string.

Binary / decimal / hexadecimal converter:

http://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html

Sean

Posted 2010-02-09T17:11:01.507

Reputation: 271

Adisak - I found it easier to just change according values in all positions. – Artanis – 2016-01-31T15:17:02.243

1@Adisak Old question, but for anyone still looking for this, here's what I did: Right click -> export the configuration node (just in case), save it somewhere. Delete every single child node. Sign out of windows. Sign back in. This will create 1 new item which is the current/active one. – René – 2016-05-19T17:30:05.910

To find the active configuration you can use MonitorInfoView. Configuration names are lists of all monitor identifiers joined with *, identifiers will start with values from Registry Key column in MonitorInfoView.

– gronostaj – 2017-05-25T11:11:44.373

3How do you tell which configuration is the active one? – Adisak – 2012-07-23T16:09:55.700

4

I wish I knew why this worked but I know it does:

To get the monitor to go UP (because negatives aren't allowed by the registry), you have to use values for attach.relativeY like this: 4294967040

Thanks to this forum for helping figure out that part - http://www.ureader.com/msg/164488.aspx

If you change the last 4 digits of that number down, the monitor goes down and vice-versa. This will also work for attach.relativeX. A little tweaking and my setup was back to normal.

Who needs functional drivers pshh

dfree

Posted 2010-02-09T17:11:01.507

Reputation:

and thanks to techie007 for getting me on the right path – None – 2010-02-10T07:07:22.893

Sweet, do I get the 'correct answer' mark for pointing out the key? :) – Ƭᴇcʜιᴇ007 – 2010-02-10T16:35:53.663

Can you do half a correct answer? lol – None – 2010-02-11T02:54:08.170

Only if I can give you half a point for your open ended question. :) To me it seems you asked for "any ideas" on how you could fix it by using "a registry key or driver file somewhere" - I pointed out a registry key that you then used to set it. What more do you want? Blood? :) I guess I'll have to include negating 32-bit word hexadecimal number lessons in my next answer. ;) – Ƭᴇcʜιᴇ007 – 2010-02-11T03:07:14.993

This is because it is the positive integer representation of a negative integer. Look up 2's complement if you are interested in knowing how to represent the negative number, and then treat the bits as an unsigned integer to get the correct input value. – Edwin Buck – 2015-03-02T19:52:44.823

2

Subtract the amount you wish to make negative from 4294967296 to get the number you need for the registry. I.e., for 4294967296 - 250 = 4294967046.

For you geeks...

The annoyance here is due to the fact that the registry editor doesn't interpret the 32 bits as anything other than an unsigned decimal integer or a hexadecimal representation of binary data. However, when Windows retrieves that binary data when positioning your displays, it interprets it as a signed integer. In order for Windows to know that a 32-bit signed integer is negative, it sets the last bit to 1 (leftmost) and the rest of the bits are inverted. So -1 will have a binary value of 11111111 11111111 11111111 11111111 (hex: FF FF FF FF). If you translate that into an unsigned decimal integer (like the registry editor does), you get 4,294,967,295. So, for our purposes, 0 equates to 4,294,967,296 which you can simply add your negative number to in order to get the unsigned decimal integer you need that the registry editor saves in binary form and that the system will later interpret as a negatively-signed integer.

dynamichael

Posted 2010-02-09T17:11:01.507

Reputation: 169

1

Instead of calculating negative values it may be easier to understand if you keep all values positive by making a logical 0,0 at the physical top left of a virtual box you would draw if you tried to surround all the monitors. Think like when you move a monitor up and left, that you are really pushing the others away to the right and down.

For example, I had 1280x1024 and 1920x1200 monitor with the first smaller one defaulting to the top right side of the second, not the bottom left of the first where it is physically positioned (left) and aligns-with (bottom edge is at same height, the top is lower of course because it's not as high).

So to start with the second 1920x1080 monitor was at position 0,0 and the first at 1920,0. Instead of trying to calculate negative -(1920 + 1280), (1200 - 1024) for the first monitor I just put the first monitor at all positive values 0,(1200 -1024) and the second at 1280, 0.

Logging off Windows then logging back on applied the settings for me. It's also useful to know that this works on Windows Hyper-V Server (I just did this on 2012 R2 which means these settings still work in Windows 8 and 8.1). That's really useful for people locked out of the screen resolution settings but trying to achieve a "bare metal" style host PC (you hardly ever have to update or reboot) and work purely with virtual machines inside via Remote Desktop (copy that from another machine).

Thanks to techie007 for the original answer, that was the key to work all this out. If you mark this variant useful don't forget to "up" his answer and the question too.

Tony Wall

Posted 2010-02-09T17:11:01.507

Reputation: 113