xrandr resolution changes incorrectly affect server DPI settings
Submitted by Dan Berger
Assigned to Xorg Project Team
Description
From: Dan Berger <dberger _at_ oubliette _dot_ org>
To: keithp at keithp dot com
Cc: agd5f at yahoo dot com
Subject: xrandr dpi question
Date: Fri, 28 May 2004 13:25:22 -0700
Mailer: Ximian Evolution 1.5.6 (1.5.6-04192004)
Greetings. Sorry for the email out of the blue, I've done a fair bit of googling to see if this is question has been asked and answered, but come up blank.
I'm curious about a behavior I'm observing when using XrandR to change resolutions. I'm using a notebook with a radeon chip, and the "MergedFB" driver modifications by Alex Deucher (who I've cc'd on this message). (On the off-chance MergedFB doesn't ring any bells, it's essentially a single frame-buffer spanning both card outputs, aka TwinView in nvidia-speak).
When I have an external monitor attached I want to run in 2048x768 (spanning the LCD and external monitor), and when I'm using only the LCD, I want 1024x768.
xrandr does this, but I've seen some strange behavior in some applications - especially emacs, ghostview, and openoffice. I've narrowed it down to the fact that xrandr is changing the dpi settings for the X server - and I'm wondering why this is the right thing to do.
The "default" X mode is 2048x768, and xdpyinfo reports:
resolution: 75x75 dots per inch
if I xrandr to 1024x768, and re-run xpdyinfo, it reports
resolution: 35x75 dots per inch
Many applications aren't affected (those based on GTK, for example, seem immune) but not being an X hacker, it's not obvious why this dpi adjustment is, in general, the right thing to do. I'm guessing that it has to do with the fact that in the MergedFB case the physical dimensions of the "screen" are changing - but xrandr doesn't realize that. (I also figured it might be a driver problem, which is part of why I'm cc'ing Alex.)
If you'd be so kind, I'd appreciate any thoughts you have on the subject.
Cheers.
--- Response ---
From: Keith Packard <keithp _at_ keithp _dot_ com>
To: Dan Berger <dberger _at_ oubliette _dot_ org>
Cc: keithp at keithp dot com, agd5f at yahoo at com
Subject: Re: xrandr dpi question
Date: Fri, 28 May 2004 13:28:10 -0700
Mailer: exmh version 2.3.1 11/28/2001 with nmh-1.1
Around 13 o'clock on May 28, Dan Berger wrote:
it's not obvious why this dpi adjustment is, in general, the right thing to do.
It isn't; it's just a bug in the XFree86 DDX implementation of Xrandr.
-keith