You are not logged in.

#1 2023-05-04 12:10:45

archuser_9999
Member
Registered: 2019-08-17
Posts: 97

unable to set screen size using 90-monitor.conf: Resolved

It's perfectly possible this is me being daft or completely overlooking some other glaringly obvious thing but...

I cannot for the life of me work out how to ensure that my screen dimensions and, as a result, its resolution are correctly set.

I can use

 xrandr --dpi 90

to set it at login, and if this is finally the now correct way of doing so, ignoring the outputs of

$ xdpyinfo | grep -B2 resolution
  screen #0:
  dimensions:    1920x1080 pixels (508x285 millimeters)
  resolution:    96x96 dots per inch

then fine, issue closed.

That said, I also like to fully understand how my system operates. I'd prefer that Xorg finds and sets the monitor correctly during boot if that is still reasonable.

Fortunately the manufacturer's website still lists my monitor, so I can absolutely confirm that it's 544mm x 303mm, with a pixel pitch of 0.283mm.

Following the ArchWiki I've been trying to do

/etc/X11/xorg.conf.d/90-monitor.conf
Section "Monitor"
    Identifier             "Screen0"
    DisplaySize            544 303    # In millimeters
EndSection

but it changes nothing. Am I missing something, or is this now deprecated or something?

Last edited by archuser_9999 (2023-05-04 21:34:00)

Offline

#2 2023-05-04 12:39:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: unable to set screen size using 90-monitor.conf: Resolved

The Identifier has to match the output name in "xrandr -q" (eg. "HDMI-0" to be auto-applied and if this is an nvidia system, there might be more hoops to jump through.

The size in xdyinfo is calculated the the resolution and the DPI (1920/96 = 20" = 508mm) and isn't really relevant for local X11 servers (ie. how you most likely use X11) - the true™ geometry is shown in "xrandr -q"

It is not advisable to change the DPI from 96 to 90 as 96 is somewhat of a standard and, clients might just assume that and the 6% difference isn't really significant.

What do you actually want to achieve here?

Offline

#3 2023-05-04 13:01:00

archuser_9999
Member
Registered: 2019-08-17
Posts: 97

Re: unable to set screen size using 90-monitor.conf: Resolved

thank you, this is very helpful.

To answer your question, and to (hopefully) improve my understanding:

I suffer from being something of a 'literalist' if that's a word. With regard therefore to the DPI it came out of doing the best I can with the wider subject of font rendering. Which is to say that sure, I've read through and configured all of that as it suits... my login script(s) sources ~/.Xresources where I've set things like hinting, antialiasing, subpixel order, filters etc. And from all of that, some part of my brain came to feel that if X11 "knew" about the correct size and settings for my display, this would help render the best possible, bearing in mind what anti aliasing is supposed to achieve.

Of course I may be suffering a huge misunderstanding, but I note that the ArchWiki mentions the fact that the 'assumption' of 96 has proved to be nothing like universal.

In addition I found myself recently having to tweak my Polybar config (having long left it a bit broken) and I noted that it contains it's own DPI setting. I hate redundancy, so ended up on this trail of... "if I just set X to run my display exactly as per manufacturer's design, then all these different configs can be discarded, because the thing drawing the windows actually 'knows' all about my screen". That kinda thing.

From

xrandr -q
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP1 disconnected primary (normal left inverted right x axis y axis)
HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 540mm x 300mm
   1920x1080     60.00*+  74.97    50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   1600x1200     60.00  
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      74.98    59.90  
   1280x960      60.00  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1152x720      59.97  
   1024x768      75.03    60.00  
   832x624       74.55  
   800x600       75.00    60.32  
   720x576       50.00  
   720x576i      50.00  
   720x480       60.00    59.94  
   720x480i      60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08  
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

I get nothing from using "Screen0" or "Screen 0" in this 90-monitor-config file. It made me curious. I'm currently using xrandr to set it on login, and if I learn that I really should leave things at 96DPI I'll just abandon the whole idea. Being a perpetual asker of "but why" I tend to fiddle about and see what works or not. I currently see NO drawbacks at all from having the correct physical pixel sizing for my display.

Offline

#4 2023-05-04 13:14:21

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: unable to set screen size using 90-monitor.conf: Resolved

HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 540mm x 300mm

The display size is correct (and the physical DPI somewhere at 90.31 DPI)

To set the DPI w/ the server see https://wiki.archlinux.org/title/Xorg#D … ze_and_DPI and you can also pass the DPI to the server, https://wiki.archlinux.org/title/Xinit#Override_xinitrc

How to do that depends on what starts the server (in doubt your DM)

ArchWiki mentions the fact that the 'assumption' of 96 has proved to be nothing like universal

Likely in the context of  HiDPI? But your physical DPI isn't 200 or so.

Offline

#5 2023-05-04 13:40:40

archuser_9999
Member
Registered: 2019-08-17
Posts: 97

Re: unable to set screen size using 90-monitor.conf: Resolved

again thank you. It really helps to better understand how these parts all tie together.

What I rather overlooked in my earlier reply was that I had already set DPI by overriding .xinitrc (the second link above). So I removed that, and restarted. I don't use a DM as such, I just boot to console, and then log in with username/pwd - I've long since stopped bothering with a login manager, it being a single user machine that is never shared. Plus, I like minimalism, so rather than install a packaged DE I ended up working out what I thought was a bare minimum to give me all I need. As such, my login at console boots the X window server (using all the instructions on the ArchWiki) and which itself sources just the minimal amoult of stuff necessary for a working environment. The TL/DR being that at login X server reads .xinitrc, which configures what I need.

Sooo... I removed my override from .xinitrc and reran

$  xrandr -q
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP1 disconnected primary (normal left inverted right x axis y axis)
HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 540mm x 300mm
   1920x1080     60.00*+  74.97    50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   1600x1200     60.00  
   1680x1050     59.88  
   1280x1024     75.02    60.02  
   1440x900      74.98    59.90  
   1280x960      60.00  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1152x720      59.97  
   1024x768      75.03    60.00  
   832x624       74.55  
   800x600       75.00    60.32  
   720x576       50.00  
   720x576i      50.00  
   720x480       60.00    59.94  
   720x480i      60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08  
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Then

$  xdpyinfo | grep -B2 resolution
screen #0:
  dimensions:    1920x1080 pixels (508x285 millimeters)
  resolution:    96x96 dots per inch

which is clearly NOT correct.

My first post having begun by explaining that I seem unable to set the DPI with the server, as per the first link above, I came here to find out why.

Currently my understanding is now that while I need not worry about the exact DPI on a standard Hi-Def monitor, it is still completely unclear as to why, left to its own devices, the X server cannot correctly set my display.

Offline

#6 2023-05-04 14:20:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,255

Re: unable to set screen size using 90-monitor.conf: Resolved

Because it will by default use 96 hard coded (and did so for ages because it was the "de-facto" standard for ages), they actually implemented it to do correctly based on screen size for a version (in 21.1) but it was met with so much backlash due to people either getting used to 96 and assuming that to be default and correct or working around it on another layer by scaling/increasing font sizes and the like. If you're interested in the back story read the thread of https://gitlab.freedesktop.org/xorg/xse … ssues/1241

Also for some fun anecdotes when this was the version current here

https://bbs.archlinux.org/viewtopic.php?id=281846
https://bbs.archlinux.org/viewtopic.php?id=275573
https://bbs.archlinux.org/viewtopic.php?id=271121
https://bbs.archlinux.org/viewtopic.php?id=271129

Last edited by V1del (2023-05-04 16:22:05)

Offline

#7 2023-05-04 16:00:48

archuser_9999
Member
Registered: 2019-08-17
Posts: 97

Re: unable to set screen size using 90-monitor.conf: Resolved

so to sum up then, it's of NO relevance whatsoever that I cannot set this in a config? Or indeed, that there's zero point in overriding it (on anything that's not a 4K+ screen)?

It doesn't matter what xrandr thinks my screen size is, because it everything gets drawn correctly to screen because there are hard coded defaults in X server? Basically, I'm wasting my time worrying about it or trying to set it because it will make zero difference now?

Have I understood correctly?

Offline

#8 2023-05-04 16:17:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,255

Re: unable to set screen size using 90-monitor.conf: Resolved

It will not make zero difference (though as already mentioned 6% is unlikely to be overly notable anyway), the settings is honored if you actually want to set it (it will simply be 96 by default if you do not explicitly do so), but as mentioned for the 90-monitor.conf to do something your Identifier needs to match the output name so

Section "Monitor"
    Identifier             "HDMI1"
    DisplaySize            544 303    # In millimeters
EndSection

but as mentioned there are some tools that hard assume 96 to be "the DPI" and might look slightly off on something lower.

I'd generally agree that under the circumstances and with the screen you have you will most likely be worrying about a non issue

Last edited by V1del (2023-05-04 16:21:08)

Offline

#9 2023-05-04 16:28:20

archuser_9999
Member
Registered: 2019-08-17
Posts: 97

Re: unable to set screen size using 90-monitor.conf: Resolved

aah! As with all learning of this type... if I'd known which question to ask at the start!

It is about using the correct identifier for the "Monitor" section. That said, it doesn't work insofar as it's still reporting an incorrect pixel dimension for the screen.

I do however take the advice that I'm now burrowing into something that is unlikely to provide any useful advantage, so I'll mark it closed.

Thanks for all the responses smile

Offline

#10 2023-05-04 17:05:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: unable to set screen size using 90-monitor.conf: Resolved

Mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Ftr and everyone's info, the Xorg server has after quite a while regained the "-dpi" flag few years ago (and I guess it's still undocumented), see the 2nd link in #4
The nvidia driver also supports that as a "Device" or "Screen" "Option"

But, once more, you're likely better off w/ 96dpi

Offline

Board footer

Powered by FluxBB