The system:
Operating System: Manjaro Linux
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.5.3-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5800H with Radeon Graphics
Memory: 62.1 ГиБ of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: HP
Product Name: Victus by HP Laptop 16-e0xxx
I have IPS display that have such characteristics:
Diagonal: 40.9cm (16.1")
Width: 35.6cm (14")
Height: 20cm (7.9")
Resolution: 2560x1440
This is from manufacturer documentation and also verified with ruler.
So it gives 182.278481DPI by width and 182.857143 DPI by height.
So I assume 182-183 will be good for it.
I use KDE, and in Display Settings configure scaling factor to 150%. It works well and sets automatically DPI in Font Configuration section to 144.
$ xrdb -query
Xcursor.size: 24
Xcursor.theme: breeze_cursors
Xft.antialias: 1
Xft.dpi: 144
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.rgba: rgb
$ xdpyinfo | grep -B 2 resolution
screen #0:
dimensions: 2560x1440 pixels (677x381 millimeters)
resolution: 96x96 dots per inch
Now, I set scaling factor to 187.5%. This automatically sets DPI in font setting to 180(close enough).
This produces unusable interface. Everything is to big, not just the fonts, but spacing’s between elements. Sites in Firefox renders in horrible way. Applications both QT and GTK affected in similar way.
KDE application menu to big, spacing between elements to big.
Mostly its broken UI for everything (I tried to set smaller fonts, but this does not helps)
In this mode DPI detect site shows 192DPI.
$ xrdb -query
Xcursor.size: 24
Xcursor.theme: breeze_cursors
Xft.antialias: 1
Xft.dpi: 180
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.rgba: rgb
$ xdpyinfo | grep -B 2 resolution
screen #0:
dimensions: 2560x1440 pixels (677x381 millimeters)
resolution: 96x96 dots per inch
Another approach, I add 50-display-size.conf
file to /etc/X11/xorg.conf.d/
folder:
Section "Monitor"
Identifier "<default monitor>"
DisplaySize 356 200 # 35.6cm x 20cm
EndSection
Set scaling factor in KDE settings to 100% and in Font Settings I set custom DPI to 183 (this is what Xorg calculates from my config).
$ xrdb -query
Xcursor.size: 24
Xcursor.theme: breeze_cursors
Xft.antialias: 1
Xft.dpi: 183
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.rgba: rgb
$ xdpyinfo | grep -B 2 resolution
screen #0:
dimensions: 2560x1440 pixels (356x200 millimeters)
resolution: 183x183 dots per inch
This produces similar to setting scaling factor to 187.5% results. Everything broken and to big. Some elements like icons, seems to render in small size, but spacing between elements are still gigantic. Fonts is to big. In this mode DPI detect site shows 192DPI.
Sites also all broken, in Firefox and Librewolf (despite Librewolf always report 96DPI no mater what).
Also, in librewolf, with this settings, this site Display DPI detector - find out DPI of your monitor shows squares of right sizes (as I measure by ruler)
So something somewhere works correct…
grep DPI /var/log/Xorg.0.log # always shows the same
[ 9.888] (==) AMDGPU(0): DPI set to (96, 96)
[ 9.939] (WW) NVIDIA(G0): Unable to get display device for DPI computation.
[ 9.939] (==) NVIDIA(G0): DPI set to (75, 75); computed from built-in default
I use non default Icon theme - but this is all the same, if not worse, with default.
So, why is native DPI for my display DPI does not working? I will understand if this is was purely UI elements renser problem, luck of suppr for fruction scaling and such.
But:
- Fonts are rendered to big everywhere. Much bigger that they should.
- And 150% and 144DPI shows normal (maybe slightly bigger that desired in some places) results for fonts and UI.
- And, scale factors less than 150% (143.75% for example) works great as well.
$ inxi -G
Graphics:
Device-1: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] driver: nvidia
v: 535.104.05
Device-2: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
driver: amdgpu v: kernel
Display: x11 server: X.Org v: 21.1.8 driver: X: loaded: amdgpu,nvidia
unloaded: modesetting dri: radeonsi gpu: amdgpu s-res: 2560x1440
resolution: 2560x1440
API: EGL v: 1.5 drivers: nvidia platforms: gbm
API: OpenGL v: 4.6.0 compat-v: 4.6 vendor: amd mesa v: 23.1.7-1
renderer: AMD Radeon Graphics (renoir LLVM 16.0.6 DRM 3.54 6.5.3-1-MANJARO)
API: Vulkan v: 1.3.264 drivers: nvidia,radv surfaces: xcb,xlib
At one point I decided to just leave it as it is, but maybe we can find the cause of it all, or learn something new.
Another motivation is, from my understanding, fonts renders best and correct when renderer knows real DPI of monitor. But it seems not the case? But they should? No way that 12pt font must looks gigantic and 6pt - okay in size?