You are not logged in.

#1 2012-03-05 02:54:45

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,143

[solved] screen dimensions & xorg config

I've been trying (finally) to improve the appearance of fonts in my system. In the process of following the wiki font configuration guide, I checked out the dpi/screen dimensions identified by xorg. According to my calculations, xorg is getting the physical dimensions of my laptop's display wrong. It correctly identifies the native resolution as 1366x768 and then uses a dpi of 96 to calculate physical dimensions:

$ xdpyinfo | grep -B2 reso
screen #0:
  dimensions:    1366x768 pixels (361x203 millimeters)
  resolution:    96x96 dots per inch

However, my laptop screen is 11.6" which I think is about 256.8x144.4 mm with a dpi of 136x135. Er... ish.

Trying to follow the wiki instructions for configuring xorg at https://wiki.archlinux.org/index.php/Xo … ze_and_DPI, I created a /etc/X11/xorg.conf.d/20-monitors.conf:

Section "Monitor"
    Identifier "LVDS1"
    DisplaySize 256.8 144.4    # In millimeters
EndSection

However, this produces pretty ugly results. Fonts look all wrong - at least in some applications - and things just generally seem too big. So I removed the config file and rebooted and everything looks OK again (actually a bit better than before - probably because I'd got through part of the font config guide). I have no non-default config files under /etc/X11/xorg.conf.d/ - just default files for evdev, quirks and synaptics.

So now I'm confused about what dimensions I should be using.

I would have thought that with the autogenerated settings above, I should find things not fitting onto the screen because X believes that the physical screen is larger than it really is. But that's not what happens. Everything fits fine. Plus I'm not sure how to check but the resolution looks comparable to the resolution I get in the ttys.

I'm using the intel i915 driver with various power-saving options (which don't affect display so far as I can tell). It's one of the integrated graphics chips. There's no separate graphics card to complicate (or improve!) things.

Could somebody explain what might be going on? Or give me a reference? I don't understand how the physical dimensions X uses can be incorrect and yet everything fit and look better than when I force it to use accurate ones.

Last edited by cfr (2012-03-06 18:31:35)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#2 2012-03-05 10:06:34

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [solved] screen dimensions & xorg config

High resolution in the TTY means that you have KMS activated, which is a good thing.

Of course anything bigger than 96x96 or 100x100 DPI is going to look awkward, it's an 11.6 inch screen! Or did you actually try to bring a ruler to the screen and measure a 136x136 pixel image? There's this little thing called dot (pixel) pitch: 0.39, 0.33, 0.28, 0.265 mm, etc.

http://en.wikipedia.org/wiki/Dots_per_i … _standards

Obviously Microsoft's sneaky little hack had very long-term consequences, when instead they should've just used a better rendering method. "However, larger graphical elements meant less screen space on which to draw" - which is what you experienced when everything looked like it was on steroids.

Another very interesting article: http://www.tested.com/news/why-pixel-de … ution/371/


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#3 2012-03-05 13:38:34

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,143

Re: [solved] screen dimensions & xorg config

No, I didn't measure a 136x136 image. I just figured what the overall screen dimensions were. (I knew the diagonal physical size and the height to width ratio so the physical width and height just follow.) I then fed these numbers to xorg and let xorg figure what the dpi should be. Though the wiki article does suggest physically measuring your display at one point, I don't think I'd get a very accurate result!

So this is why xrandr gives accurate size but xorg doesn't? Because xrandr is using physical dpi and xorg is using logical dpi? And xorg adjusts, say, an 8 point font so it is rendered with more than 8 points if it believes that the dpi is larger than it is? It tries to make the physical heights of the font the same size as they would be on a screen with a lower dpi?

As if these things were not sufficiently complicated already! I'm still pretty sure I don't really understand it...

Thanks!


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB