[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpi changes on the fly



Hugo Vanwoerkom wrote:
Hi,

Running Sid with Nvidia driver 9631.

X has always been rock solid, but recently I notice that the DPI settings of the display changes on the fly, when I do:

xdpyinfo | grep 'dots per inch'

I normally get 110x110. That's what I set it to in /etc/gdm/gdm.conf:

...
command=/usr/bin/X0 :1 -layout X0 -dpi 110 -deferglyphs 16 -isolateDevice \"PCI:1:0:0\" -sharevts
...

But recently "suddenly"... maybe related to running Qt apps? the DPI setting changes on the fly to 138x88 and all font sizes get tiny.

Logging out and back in sets it back to 110x110.

Is that possible, those DPI changes on the fly?

How does it happen?


I think I figured it out:

I have fvwm as window manager and have buttons defined as:

...
Key F9          A       S       Exec xrandr -o left
Key F10         A       S       Exec xrandr -o normal
...

to rotate the screen.

When I run my Qt app it displays a window rotated (i.e.text is drawn in vertical lines from right to left).

In order to see them straight up I rotate the screen with F9 and after looking I rotate it back again.

But... doing xdpyinfo then shows:

resolution:    138x88 dots per inch

And if you start a Qt app then all the fonts are very small, naturally.

However doing F9 + F10 once more sets the dpi to 110x110 once more.

A bug in xrandr perhaps?

Hugo









Reply to: