Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
6.5.2
-
None
Description
On a system with the following screens:
\\.\DISPLAY1
primary: true
geometry: x: 0 y: 0 width: 1920 height: 1080
device_path: \\?\DISPLAY#MSI30A1#4&28dcb5b9&0&UID8261#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}
model: MSI MP242
serials: 0x1010101 "1322131231233"
\\.\DISPLAY2
primary: false
geometry: x: 1920 y: 0 width: 1920 height: 1080
device_path: \\?\DISPLAY#MSI30A1#4&28dcb5b9&0&UID12613#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}
model: MSI MP242
serials: 0x1010101 "1322131231233"
We observe that Qt has great trouble displaying things on one of the screens. The output from the attached test program is the following - note that one screen is missing:
"MSI MP242 (1)" "1322131231233" "MSI MP242" 0x20062 "\\\\.
DISPLAY2" QRect(1920,0 1920x1080)
We know that WinAPI will enumerate these screens just fine (that's where we get the first output). The bug is that Qt doesn't.
Additional information:
- EDID knows two serial number fields. one being an uint32 one at bytes 12-15, the other a textual one in the monitor descriptors (equivalent to QScreen::serialNumber()). These serial numbers often do not agree with each other. Manufacturers show no clear preference for either, and to mostly reliably identify screens, you have to use both. In rare cases, both fields are set to a constant default value, leading to bugs such as this one in multimonitor setups.
- Windows, when confronted with such setups, will generally work. The main problem is that it cannot maintain a stable viewGdiDeviceName / device instance path mapping, and thus will occasionally swap screens around from a user point of view. We have observed this to be the case if and only if both serial number fields were the same, meaning additional information such as manufacturing date is not used to identify devices.
- It is impossible to reliably identify hardware screens for 100% of setups. Do not try it. We have found it is sanest to be bug compatible to Windows, meaning that to identify hardware screens, we also use only the two serial numbers and nothing else.
- It is pretty hard to find these buggy setups. It tends to happen with screens whose manufacturers were lazy, and with some docking stations that apparently proxy EDID data.