Bug 12400

Summary: If NoDDC (Option: DDC False) is in use, Intel driver ignores Monitor's displaysize setting
Product: xorg Reporter: Antti Mäkelä <zarhan>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: cgamesplay
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 13027    
Attachments:
Description Flags
Xorg.0.log when using DDC
none
Xorg.0.log when NOT using DDC none

Description Antti Mäkelä 2007-09-12 04:17:36 UTC
After upgrading to Xorg 7.3, I noticed that my font sized started out wrong. Problem, as I learned, was that I had "Option" "NoDDC" in my xorg.conf Intel driver section, and I had manually specified my Laptop TFT size in Monitor section with DisplaySize directive. 

(I had done this for the reason that while the laptop's display reports it's size correctly, many projectors and other display devices that I frequently hook my laptop to - in conference rooms etc - do not - so I wanted to avoid DDC).

Anyway, end result is that I'm no forced to use DDC since manually specified Displaysize is ignored.

In Xorg 7.2 and Intel driver 1.7.4 this worked just fine.
Comment 1 Antti Mäkelä 2007-09-23 09:31:50 UTC
Oh, by "displaysize is ignored" I mean that the display is set to 96x96 DPI, the default.
Comment 2 Michael Fu 2007-11-01 22:10:18 UTC
could you please post basic info like xorg.conf, X.log and hw info?
Comment 3 Antti Mäkelä 2007-11-01 22:52:11 UTC
(In reply to comment #2)
> could you please post basic info like xorg.conf, X.log and hw info?

  Hardware is in this case Thinkpad Z60m laptop with i915, and a 1680x1050 TFT panel.

  Xorg.conf as follows - I simply comment out the "NoDDC" for manually specifying displaysize. The (commented out) Clone-lines are still there from old intel drivers (1.7.4). Attaching two xorg.0.logs - one with NoDDC and one without.

Section "ServerLayout"
        Identifier     "Layout0"
        Screen      0  "Screen0" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Trackpoint" "CorePointer"
        InputDevice    "Touchpad" "AlwaysCore"
EndSection

Section "Files"
        FontPath     "/usr/share/fonts/misc:unscaled"
        FontPath     "/usr/share/fonts/Type1"
        FontPath     "/usr/share/fonts/TTF"
        FontPath     "/usr/share/fonts/corefonts"
        FontPath     "/usr/share/fonts/freefont"
        FontPath     "/usr/share/fonts/sharefonts"
        FontPath     "/usr/share/fonts/terminus"
        FontPath     "/usr/share/fonts/ttf-bitstream-vera"
        FontPath     "/usr/share/fonts/unifont"
        FontPath     "/usr/share/fonts/75dpi:unscaled"
        FontPath     "/usr/share/fonts/100dpi:unscaled"
        FontPath     "/usr/share/fonts/artwiz"
EndSection

Section "Module"
        Load  "freetype"
        # Load "xtt"
        Load  "extmod"
        Load  "glx"
        Load  "dri"
        Load  "dbe"
        Load  "record"
        Load  "xtrap"
        Load  "type1"
EndSection

Section "InputDevice"
        Identifier  "Touchpad"
        Driver      "synaptics"
        Option      "Emulate3Buttons" "off"
        Option      "EmulateMidButtonTime" "0"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/event1"
        Option      "SHMConfig"
EndSection

Section "InputDevice"
        Identifier  "Trackpoint"
        Driver      "mouse"
        Option      "Protocol" "ImPS/2"
        Option      "Device" "/dev/input/mouse1"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "keyboard"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "fi"
EndSection

Section "Monitor"
        HorizSync    31.5 - 128.5
        VertRefresh  40.0 - 150.0
#       Option       "Clone" "true"
#       Option       "MonitorLayout" "CRT,LFP"
#       Option       "CloneRefresh" "75"
        Identifier   "Monitor0"
        DisplaySize  330        210
EndSection

Section "Monitor"
        Identifier   "ExternalMonitor"
EndSection

Section "Device"

#       Option      "NoDDC"
        Identifier  "Card0"
        Driver      "i810"
        Option      "AccelMethod" "EXA"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultDepth     24
        Option      "monitor-VGA" "ExternalMonitor"
        SubSection "Display"

                Viewport   0 0
                Virtual   1680 1680
                Depth     24
                Modes    "1680x1050" "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
        EndSubSection
EndSection

Section "DRI"
        Group        27
        Mode         0660
EndSection

Section "Extensions"
        Option      "Composite" "Enable"
        Option      "Render" "Enable"
EndSection
Comment 4 Antti Mäkelä 2007-11-01 22:52:45 UTC
Created attachment 12313 [details]
Xorg.0.log when using DDC
Comment 5 Antti Mäkelä 2007-11-01 22:53:27 UTC
Created attachment 12314 [details]
Xorg.0.log when NOT using DDC
Comment 6 Antti Mäkelä 2007-11-01 22:55:17 UTC
Xdpyinfo when using DDC says

  dimensions:    1680x1050 pixels (331x207 millimeters)
  resolution:    129x129 dots per inch

Without DDC, it says 96x96.
Comment 7 Eric Anholt 2007-11-02 13:05:27 UTC
DPI handling is entirely within the server -- the driver is unaware of it.  Changed component.
Comment 8 Ryan Patterson 2008-10-01 11:27:16 UTC
This bug is not related to DPI detection, it is related to the monitor physical size. Please reassign it.

The bug stems from the fact that the intel driver disregards the Xorg configured DisplaySize option. Here are my similar results. I have abridged the log files, use the ones already attached to this report for a complete reference.

Properly configured xorg.conf
-----------------------------

xorg.conf:
  Section "Monitor"
      Identifier  "DELL 2001FP"
      DisplaySize 406 304
      HorizSync   31-80
      VertRefresh 56-76
  EndSection

  Section "Device"
      Identifier  "Intel Integrated Graphics"
      Driver  "intel"
  EndSection

Result:
  $ xdpyinfo | egrep 'dime|reso'
    dimensions:    1600x1200 pixels (367x275 millimeters)
    resolution:    111x111 dots per inch

Xorg.log:
  (II) intel(0): EDID for output VGA
  (II) intel(0): Manufacturer: DEL  Model: a007  Serial#: 810830412
  (II) intel(0): Year: 2004  Week: 5
  (II) intel(0): EDID Version: 1.3
  ...
  (**) intel(0): Display dimensions: (410, 310) mm
  (**) intel(0): DPI set to (99, 131)
  ...
  (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
  (--) RandR disabled
  ...
  (II) intel(0): Setting screen physical size to 367 x 275

After disabling DDC
-------------------

xorg.conf:
  Section "Monitor"
      Identifier  "DELL 2001FP"
      DisplaySize 406 304
      HorizSync   31-80
      VertRefresh 56-76
  EndSection

  Section "Device"
      Identifier  "Intel Integrated Graphics"
      Driver  "intel"
      Option "NoDDC"
  EndSection

Result:
  $ xdpyinfo | egrep 'dime|reso'
    dimensions:    1024x768 pixels (270x203 millimeters)
    resolution:    96x96 dots per inch

Xorg.log:
  (**) intel(0): Option "NoDDC"
  (II) intel(0): EDID for output VGA
  ...
  (**) intel(0): Display dimensions: (406, 304) mm
  (**) intel(0): DPI set to (100, 133)
  ...
  (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
  (--) RandR disabled
  ...
  (II) intel(0): Setting screen physical size to 270 x 203
Comment 9 Antti Mäkelä 2009-09-22 03:27:06 UTC
This is still present in intel-driver-2.8.1 and xorg-server 1.6.3.

I really hate the fact that my desktop font sizes go crazy depending on whether I plug in an external display with same resolution as my internal display but which is physically bigger. My current workaround is to NOT plug it in on startup, but start X with it disconnected, connect it after startup and then use xrandr --output VGA --auto.

I'd settle for the possibility to choose the display which to base DPI on, if the manually specified size cannot be implemented.
Comment 10 Adam Jackson 2018-06-12 18:44:23 UTC
Mass closure: This bug has been untouched for more than six years, and is not obviously still valid. Please file a new report if you continue to experience issues with a current server.

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.