Setting DPI of Monitor

Dear all,

I am struggling setting the dpi of my monitor.

It is an Eizo EV3285. The resolution is 3840 x 2160, The size of the screen is 697 mm x 392 mm. Thus, it has 140 dpi.

xdpyinfo | grep -B2 resolution returns:

screen #0:
dimensions: 3840x2160 pixels (677x381 millimeters)
resolution: 144x144 dots per inch

Size and resolution are wrong.

The relevant portion of xrandr -q is:

Screen 0: minimum 320 x 200, current 3840 x 2160, maximum 16384 x 16384
DisplayPort-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 698mm x 393 mm

Here, only the size if off by 1 mm in each dimension.

I added a file /etc/X11/xorg.conf.d/90-monitor.conf to fix the dpi that reads:

Section “Monitor”
Identifier “DisplayPort-0”
DisplaySize 697 392 # In millimeters
EndSection

Why do xdpyinfo and xrandr return different dimensions?
Why does the added file have no effect?

Could you please help me fix the dpi issue?

Best regards,
Fabius

Because it needs (as I think) a Device and Screen Section aswell.

Example:

Section "Device"
    Identifier "radeon"
    Driver "radeon" #intel or radeon or amdgpu or nvidia ...
    BusID "PCI:0:1:0" #Choose the correct one
    # 00:01.0 -> PCI:0:1:0
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "radeon" #Identifier of Device Section
    Monitor "DisplayPort-0" #Identifier of Monitor Section
EndSection

Section "Monitor"
    Identifier "DisplayPort-0"
    DisplaySize 697 392 # In millimeters
EndSection

Of course you need to adjust it to your needs.

Also … you usually, especially when the numbers are quite close, want to prefer steps of 25%

| 1.00x=96dpi | 1.25x=120dpi | 1.50x=144dpi | 1.75x=168dpi | 2.00x=192dpi |

So your 144 is exactly 1.5, and very close to 140 … up to you if it must change.

And some relevant links, such as impermanent config:
https://wiki.archlinux.org/title/HiDPI#Xorg

And the xrandr page, specifically the section on custom configs:
https://wiki.archlinux.org/title/Xrandr#Permanently_adding_undetected_resolutions