Bug 39290

Summary: PreferredMode, TargetRefreshRate and DisplaySize in /etc/X11/xorg.conf.d/50-monitor.conf are ignored
Product: xorg Reporter: Felix Miata <mrmazda>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: shawn.t.rutledge
Version: unspecified   
Hardware: x86 (IA32)   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
xrandr output & xorg.conf prepended to Xorg.0.log from Fedora 15 producing 1792x1344@120DPI via DisplaySize, PreferredMode, TargetRefreshRate
none
xrandr output & 50-monitor.conf prepended to Xorg.0.log from Fedora 15 failing to produce 1792x1344@120DPI via DisplaySize, PreferredMode, TargetRefreshRate
none
/etc/X11/xorg.conf.d/20-nouveau.conf
none
log file after startx -- --dpi 96, with the attached /etc/X11/xorg.conf.d/20-nouveau.conf none

Description Felix Miata 2011-07-16 15:28:20 UTC
Created attachment 49187 [details]
xrandr output & xorg.conf prepended to Xorg.0.log from Fedora 15 producing 1792x1344@120DPI via DisplaySize, PreferredMode, TargetRefreshRate

Yesterday I filed https://bugzilla.novell.com/show_bug.cgi?id=706024 because of this, before I knew it wasn't specific to openSUSE Factory.

/etc/X11/xorg.conf.d/50-monitor.conf files containing e.g.:
Section "Monitor"
	Identifier "Default Monitor"
	HorizSync    30-107
	VertRefresh  56-61
	Option       "TargetRefreshRate"	"60"
	Option       "DDC"	"off"
	Option       "DPMS"	"off"
	Option       "DefaultModes"	"on"
	DisplaySize  338 253 # 120 DPI @ 1600x1200
	Option       "PreferredMode" "1600x1200"
EndSection

were working to produce desired refresh, resolution and DPI as recently as server 1.9.3 (openSUSE 11.4). Now in what remains identified as 1.9.3 in openSUSE Factory (12.1), in 1.10.1 in *buntu 11.04, and 1.10.2 in Fedora 15, TargetRefreshRate, PreferredMode & DisplaySize (at least, not checked other options as yet) are apparently being ignored. The exact same section when contained in /etc/X11/xorg.conf still produces expected results for resolution, DPI & refresh.

In contrast, 'option "DRI" "false"' & 'option "Shadow" "true"' contained in either xorg.conf or 50-device.conf are obeyed.
Comment 1 Felix Miata 2011-07-16 15:30:37 UTC
Created attachment 49188 [details]
xrandr output & 50-monitor.conf prepended to Xorg.0.log from Fedora 15 failing to produce 1792x1344@120DPI via DisplaySize, PreferredMode, TargetRefreshRate
Comment 2 Shawn Rutledge 2012-09-19 13:22:09 UTC
I agree that's a bug; xorg.conf should really be able to override DisplaySize such that xrandr will show it.
Comment 3 Shawn Rutledge 2012-09-19 13:25:37 UTC
Created attachment 67382 [details]
/etc/X11/xorg.conf.d/20-nouveau.conf

I try to override DisplaySize 531 298 because for the HDMI monitor it is incorrectly detected; xrandr says this:

DVI-I-1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm

HDMI-1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 160mm x 90mm

even though I tried to override it.
Comment 4 Shawn Rutledge 2012-09-19 13:29:01 UTC
Created attachment 67383 [details]
log file after startx -- --dpi 96, with the attached /etc/X11/xorg.conf.d/20-nouveau.conf

I started X with startx -- --dpi 96.  xrandr still reports the wrong physical size, but at least xdpyinfo gets the overridden dpi correctly:

  dimensions:    3840x1200 pixels (1016x317 millimeters)
  resolution:    96x96 dots per inch

I think xrandr should get the overridden physical size too.  Otherwise programs which compute DPI for themselves by getting the physical display size and resolution, using xcb, will get it wrong.  Qt does this for example, so Qt programs will have wrong font sizes in this case.
Comment 5 GitLab Migration User 2018-12-13 22:25:25 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/413.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.