Skip to contentSkip to conversation

New: [Randr12] DPI calculation ludicrously incorrect

Bug 16033 [email protected] 1 participant 5 messages May 20, 2008 – Jul 23, 2010 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

http://bugs.freedesktop.org/show_bug.cgi?id=16033

Summary: [Randr12] DPI calculation ludicrously incorrect
Product: xorg
Version: git
Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Driver/nouveau
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]

Created an attachment (id=16646)
--> (http://bugs.freedesktop.org/attachment.cgi?id=16646)
Xorg log, showing DPI set to (230, 254)

It seems that the DPI calculation is using the Virtual line to calculate the DPI. Since this is substantially larger than my laptop's screen resolution this results in a DPI value slightly under double the true DPI!

This may well not be a nouveau bug; I've had a grep through the source and it seems that nouveau is just setting the DPI received from the server.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

A message that is not in the archive (sent off-list or not yet received): bug-16033-8800-V0hAGp6uBxMKqLRl/[email protected]/

#2 lore raw

[Bug 16033] [Randr12] DPI calculation ludicrously incorrect

http://bugs.freedesktop.org/show_bug.cgi?id=16033

Frans Pop <elendil-EIBgga6/0yRmR6Xm/[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |elendil-EIBgga6/0yRmR6Xm/[email protected]

--- Comment #1 from Frans Pop <elendil-EIBgga6/0yRmR6Xm/[email protected]> 2008-08-15 14:48:40 PST --- I'm seeing the same issue on my new laptop (HP 1510p running Debian Lenny).
Initially DPI was getting set to (96, 96), which is too low for my laptop's LCD
screen. Apparently because the laptop's display does not provide size info.

From the Xorg log:
(II) intel(0): Output VGA disconnected
(II) intel(0): Output LVDS connected
(II) intel(0): Output TV disconnected
(II) intel(0): Output LVDS using initial mode 1280x800 (II) intel(0): Monitoring connected displays enabled (II) intel(0): detected 512 kB GTT.
(II) intel(0): detected 7676 kB stolen memory. (==) intel(0): video overlay key set to 0x101fe (==) intel(0): Will not try to enable page flipping (==) intel(0): Triple buffering disabled
(==) intel(0): Intel XvMC decoder disabled (==) intel(0): Using gamma correction (1.0, 1.0, 1.0) (==) intel(0): DPI set to (96, 96)

I had already been playing with a second monitor connected for which I needed the "Virtual" option. Using info from the Debian wiki I added the correct display size setting for LVDS, after which my xorg.conf had:

Section "Device"

        Identifier      "Intel GM965 Video Controller"
        Option          "Monitor-LVDS"  "Internal Panel"
        Option          "Monitor-VGA"   "External VGA Monitor"

EndSection

Section "Monitor"
Identifier "Internal Panel"
DisplaySize 261 163 # 10.2x6.3"
EndSection

Section "Monitor"
Identifier "External VGA Monitor"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Internal Panel"

Subsection "Display"
Virtual 3000 2000
EndSubSection
EndSection

After restarting the X server this resulted in:
(II) intel(0): Output VGA disconnected
(II) intel(0): Output LVDS connected
(II) intel(0): Output TV disconnected
(II) intel(0): Output LVDS using initial mode 1280x800 (II) intel(0): Monitoring connected displays enabled (II) intel(0): detected 512 kB GTT.
(II) intel(0): detected 7676 kB stolen memory. (==) intel(0): video overlay key set to 0x101fe (==) intel(0): Will not try to enable page flipping (==) intel(0): Triple buffering disabled
(==) intel(0): Intel XvMC decoder disabled (==) intel(0): Using gamma correction (1.0, 1.0, 1.0) (**) intel(0): Display dimensions: (261, 163) mm (**) intel(0): DPI set to (291, 311)

Given that only the LVDS is connected the DPI should be (125, 126) based on the LVDS mode and the display dimensions. The actual DPI is way too high and can be shown to be calculated from the (dummy) Virtual mode (for example: 3000 / (261 / 10 / 2.54) = 291).

Even if multiple displays are connected the Virtual setting is not a useful value as it only defines the _maximum_ area that can be used by combining monitors and not the _actual_ area.

Note that if I also add the external VGA monitor in the Screen section, the DPI will default to (96, 96) again. But if I list them in reverse order (external VGA first and LVDS second), I get the above values again.
Seems like the display dimensions of the last monitor are used, regardless of what is actually connected.

Cheers,
FJP

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#3 lore raw

[Bug 16033] [Randr12] DPI calculation ludicrously incorrect

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=16033

--- Comment #2 from Pekka Paalanen <[email protected]> 2009-09-23 05:12:14 PST --- Does this problem still occur with the latest released xorg-server?

If it does, maybe this bug should be re-targeted to xorg-server?

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#4 lore raw

[Bug 16033] [Randr12] DPI calculation ludicrously incorrect

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=16033

Elvis Pranskevichus <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #3 from Elvis Pranskevichus <[email protected]> 2010-01-11 11:16:08 PST --- I can confirm this happening on xorg-server-1.7.4 on my system. I use external
monitor in a randr setup and the physical dimensions reported in xdpyinfo are
totally wrong:

dimensions: 4000x1600 pixels (331x207 millimeters)
resolution: 307x196 dots per inch

I have DisplaySize set for both monitors and apparently the server takes only the first one.

Now, I've hit this trying to remedy a regression from xorg-server-1.6. Previously, physical dimensions were detected correctly and a correct DPI was set. Now (with 1.7.4) it just uses 96x96. xrandr reports correct dimensions in all cases.

Oh, and I'm on xf86-video-intel, so this is almost definitely not nouveau-specific.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#5 lore raw

[Bug 16033] [Randr12] DPI calculation ludicrously incorrect

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=16033

Marcin Slusarz <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

          Component|Driver/nouveau              |Server/general
         AssignedTo|[email protected] |[email protected]
                   |rg                          |

--- Comment #4 from Marcin Slusarz <[email protected]> 2010-07-23 16:37:32 PDT --- probably not nouveau bug, changing component to Server/general

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.