You are not logged in.

#1 2018-08-22 18:45:33

Registered: 2008-08-03
Posts: 6,417

Force Xorg to use correct physical size of monitor?

I have an external HDMI monitor that incorrectly reports its physical size via EDID (the monitor is 22" with a 16:10 aspect ratio, native 1680x1050 resolution, which is about 474mm x 296 mm, while the reported physical size is 160 mm x 90 mm). parse-edid (from read-edid) reports a correct checksum for the edid file.

Despite using the monitor for years, I have only become aware of this recently due to QT5 apps trying to "cleverly" adjust their own size to preserve physical dimensions. For example, on the main monitor with correctly reported physical dimensions, VLC looks like this:

whereas dragging it onto the HDMI monitor (without resizing the window) it looks like this:

This only occurs with QT applications. GTK and all others display correctly on both screens.

While it is possible to change QT's behavior with environment variables, it doesn't address the real issue of the incorrect physical dimensions.

I have tried a few times over the past few weeks to find a solution but nothing seems to work.

  • xrandr cannot set DPI separately for each monitor

  • xrandr seems to completely ignore the --fbmm option to set the physical screen size (e.g. xrandr --output HDMI1 --mode 1680x1050 --fbmm 474x296)

  • Xorg appears to ignore the DisplaySize of a "Monitor" section in a Xorg configuration file (see below). This solution would be sub-optimal anyway, because it would force all external HDMI monitors to report the same physical size. I would prefer to configure the monitor via xrandr if possible.

  • xrandr's --scale option does not provide a workaround as suggested somewhere online (maybe a Stack Overflow thread?): it distorts all other applications while QT apps remain the same.

Here's the Xorg config file that I have tried (recommended by our Xorg wiki page), including variations of the identifier (to match that reported by /sys//devices/*/*/drm/card*/card*-* (HDMI-A-1), and with Option    "UseEdidDpi"    "false" as suggested in the forum threads linked below. I restarted Xorg each time I modified the file.


Section "Monitor"
    Identifier             "HDMI1"
    DisplaySize             474 296

Xorg reads the file but fails to set the display size. Relevant threads that did not help: … -in-xrandr

Does anyone else have any other ideas of how to force the system to report the correct physical dimensions of the HDMI monitor?

edit: I forgot to mention that I am using the Intel integrated graphics driver (i915).

Last edited by Xyne (2018-08-23 13:55:41)

My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone


#2 2018-08-22 19:58:18

Registered: 2012-05-17
Posts: 3,404

Re: Force Xorg to use correct physical size of monitor?

You could create your own edid file and load it during boot. … s_and_EDID
Edit: With the proprietary nvidia drivers, you might have to configure it in xorg.conf with CustomEDID and UseEDID.

Last edited by progandy (2018-08-22 20:10:02)

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |


#3 2018-08-23 13:54:11

Registered: 2008-08-03
Posts: 6,417

Re: Force Xorg to use correct physical size of monitor?

Thanks for the suggestion.

I used hexedit to modify the default edid file to correct the reported physical sizes (rounded to the nearest cm, as required by the specification). After the edit, parse-edid reports the correct sizes. I copied the modified edid file to /usr/lib/firmware/edid/foo.bin and added the kernel command-line parameters to load the file:


I also added a Xorg configuration file under /etc/X11/xorg.conf.d/ with a "Monitor" section including the Identifier, ModelName and VendorName reported by the edid with the "UseEDID" and "CustomEDID" options.

The same physical size of 160 mm x 90 mm is still reported after rebooting.

I also forgot to mention that I am using the onboard Intel graphics driver (i915). I will edit my first post to add that info.

Relevant links for anyone who stumbles across this thread: … -edid-file … _xorg.conf … ation_Data

My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone


#4 2019-01-07 15:01:02

From: Oss, The Netherlands
Registered: 2013-04-18
Posts: 6

Re: Force Xorg to use correct physical size of monitor?

Based on your `drm_kms_helper.edid_firmware=HDMI-1:edid/foo.bin`, it seems from an edid perspective your HDMI connection is called 'HDMI-1'. Just like in my system which has an embedded i915 on an Ivy Bridge Asus motherboard connected to an old JVC TV.

But in your Xorg configuration file and your xrandr command you specify 'HDMI1'; notice the missing dash ('-').

In my system setting the physical dimension in my `~/.xinitrc` using xrandr works perfectly.

## bottom part of ~/.xinitrc
xrandr --fbmm 572x325 --output HDMI-1 --mode 1280x720
exec i3

So get-edid reports the wrong size:

get-edid 2>/dev/null | parse-edid 2>/dev/null | grep Size 
	DisplaySize 580 320

... while Xorg has set the correct dimensions through xrandr:

xdpyinfo | grep -i dimens
  dimensions:    1280x720 pixels (572x325 millimeters)

I'm currently trying to get it working using early KMS; I'll try your trick using a hex editor for achieving that and will post my findings.


Board footer

Powered by FluxBB