> On 20 Jun 2016, at 18:09, Thiago Macieira <thiago.macie...@intel.com> wrote:
> 
> On segunda-feira, 20 de junho de 2016 14:30:19 PDT Shawn Rutledge wrote:
>> Don’t you think there should be a quirks database somewhere (outside of Qt)
>> which corrects these cases?  The TV model can be identified, right?
> 
>> X does it, but that’s not a broad enough scope to cover Wayland.
>> 
>> https://wiki.ubuntu.com/X/Quirks#Monitor_Quirks 
>> 
>> Maybe it could be done with udev rules or something.  If there is really not
>> yet a proper solution on Linux, there should be, IMO.
> 
> We would need a correction database, not just a quirks one.

I thought that in common usage in the context of device drivers and their 
configuration, “quirks” are certain characteristics that are 
overridden/corrected for certain identifiable devices.

> 160x90 mm is a valid screen size, correspoding to a 7.2" monitor.

Of course, it’s just suspicious (being a fallback value, apparently), but not 
impossible.

But assuming the model of your TV is unique and can also be read over EDID 
(like most monitors), the size could be corrected.  I have the same issue with 
a Samsung SyncMaster 2494HM at the office, and have been wondering why X 
doesn’t “quirk” it by default.  From the xorg log on Arch Linux:

[   266.313] (II) RADEON(0): EDID for output HDMI-0
[   266.313] (II) RADEON(0): Manufacturer: SAM  Model: 4d5  Serial#: 1263088180
[   266.313] (II) RADEON(0): Year: 2010  Week: 38
…
[   266.313] (II) RADEON(0): Supported detailed timing:
[   266.313] (II) RADEON(0): clock: 148.5 MHz   Image Size:  160 x 90 mm
[   266.313] (II) RADEON(0): h_active: 1920  h_sync: 2008  h_sync_end 2052 
h_blank_end 2200 h_border: 0
[   266.313] (II) RADEON(0): v_active: 1080  v_sync: 1084  v_sync_end 1089 
v_blanking: 1125 v_border: 0
…

I’m guessing that "Manufacturer: SAM  Model: 4d5” is probably enough to 
identify it.  Or use the year and week if necessary.  There would need to be a 
web site to give feedback to add to the quirks database (similar to the way you 
can register unidentified USB devices on linux-usb.org): if various people with 
the same monitor, with different production dates, report the same problem, a 
pattern would emerge: for what period of time was this company making this 
mistake.  Then it could go into the quirks.  Or some distros could auto-report 
the EDIDs that are discovered - then it would be a matter of auditing them to 
see how many are uniquely identifiable and which of those are likely to contain 
wrong values for physical size.

I do also see several cases like this in the log:

[   266.313] (II) Quirked EDID physical size to 0x0 cm

which is not very useful…

But quirks should IMO belong to the kernel, or to udev (depending whether udev 
can see when any kind of monitor is hotplugged), or to some library that 
corrects monitor EDIDs, not just to X.  Qt could do it, cross-platform even, 
but we shouldn’t have to.

Ah (googles it again) here we go:

https://wiki.ubuntu.com/X/MonitorsDatabaseOnline

Sounds good.  But somehow it hasn’t resulted in corrected EDIDs being available 
everywhere.  But Ubuntu 16.04 does correct the EDID for my monitor!  I hadn’t 
noticed before.  (Maybe it knows about your TV too?)  And the qscreen manual 
test reports correct dimensions.  So, the other distros ought to be reusing 
Ubuntu's quirks database, I guess.  But maybe it’s only an online database so 
far.  On KDE though, http://www.simonzone.com/software/guidance/ was supposed 
to be using it (although I don’t see evidence of that in the code).  But I 
suppose there’s a political problem with having the latest (e.g.) KDE control 
panel depend on some Ubuntu online service to look up monitor EDID corrections. 
 (So far I’m having trouble finding the URL for that service.)  So ideally 
Canonical ought to give permission to package up their database and allow 
shipping it with other distros too; or maybe it can start to be hosted on a 
wider-community website.  The downside is that the updates to the quirks that 
ship with distros would tend to be slow (like adding USB IDs so that lsusb 
knows about them - it takes at least a few months, typically).

http://forums.fedoraforum.org/showpost.php?s=4dd2d2dbdc3131f2ad45a3f23b82d2d6&p=1695752
 has some different info.  I found that this works as a way of reading the EDID 
at any time:

parse-edid < 
/sys/devices/pci0000:00/0000:00:07.0/0000:05:00.0/drm/card0/card0-HDMI-A-1/edid

It seems that nVidia X drivers have a config option for overriding EDID, but 
the others apparently don’t.  If they all did, the quirks could go in 
/usr/share/X11/xorg.conf.d/10-quirks.conf.  But anyway, we want a solution that 
goes beyond X.

Microsoft also has inf files for correcting EDID:

https://msdn.microsoft.com/en-us/library/windows/hardware/jj133967(v=vs.85).aspx

so if manufacturers (sometimes) already provide the inf files, maybe Linux 
ought to be able to use those somehow.  
https://wiki.ubuntu.com/X/MonitorsDatabaseOnline says that DisplayConfigGtk can 
do that.

There’s even a utility to rewrite the EDID info on the monitor, if one dares: 
https://github.com/bulletmark/edid-rw

Anyway it looks like Ubuntu did something good for their own users, and then it 
didn’t get any further, so far.  Does anyone know who is in a position to 
negotiate a solution for all distros?  Otherwise Qt will continue to have 
ongoing trouble with this.  I don’t want to accept that there is no solution, 
and that monitor sizes will never be trustworthy.

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to