You are not logged in.

#1 2021-10-15 21:49:31

rezad
Member
Registered: 2014-09-17
Posts: 184

question about display scaling and resolution

I have a 1080p 14inch laptop.
when I first install kde plasma desktop the fonts and size of everything is too small for me so I have experienced with everything from font size to dpi setting and now global display scaling in kde setting.
my question is this.
when I  change font size I understand what is happening but when I use dpi change from 96 to 157 (which people tell me I should do because my lapotop screen size is 309mm by 174mm) then in firefox I get from javascript the 720p screen.
does that mean that my screen (whole screen not just a firefox app) is running at 720p at hardware (or software hardware-emulated) level ?

for example if I open a movie that is 1080p (my laptop max resolution) in this setting do I get a 720p movie resolution equivalence? or is the screen for DE (desktop enviroment) is still 1080p but DE assign to some apps like firefox a 720p and to movie player an actuall 1080p?

hope the answer my question was not too obvious.

btw I still dont understand dpi usage. I understand its definition but not what it got to do with a user. it is just dot (in this case 1080by 1920 ) devided by the physical size of screen, right? so when some one tells me my dpi is 160 (or 157 in this case) but kde seems to use a 96 dpi and changing that causes apps like firefox to see smaller than 1080p resolution, is this kde fault?
should kde get the 157 dpi but still show 1080p right? becasue dpi is not something I change in hardware, but something that is a part of hardware.
for example if there was no definition for dpi then the resolution and size of screen still provide all the kde needs to set its font size and so on for a user to be confortable right?

I know linux is not there for hiDpi (is this what it is names right?) like windows but this part , kde seeing my dpi as 96 and the default font being 12p and if I want to acutally be able to see it easily I lose the resolution (At least in software level like in firefox), this part seems too fundamental not to have been kinda fixed.

maybe my first question in this post is the more important one but I still dont understand why kde (I am not familiar with what gnome does about this) doesnt understand that dpi (or size of screen) is not related to the resolution of it.

am I missing something?
am I the only one with a laptop that is 1080p and 14 inch and want to use linux on it?
right now I have sett global displat scaling to 150% (as suggested by kde instead of dpi setting) and I can this way use default font size and other defaults like firefox default but I dont want to sacrifice my resolution for just this)

any help would be appreciated

Last edited by rezad (2021-10-15 21:53:17)

Offline

#2 2021-10-15 22:04:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,497
Website

Re: question about display scaling and resolution

First, are you running Xorg or Wayland?  If Xorg, I'd advise against manually overriding the dpi setting in KDE settings (at least not before you set Xorg to the right dpi) - this can have effects opposite of what one might expect as this doesn't set your actual DPI, but it tells KDE to compensate for the given DPI.

Instead, create an xorg.conf.d file that defines your screens actual physical size (measured with an actual ruler).  In many cases, the OS cannot accurately determine the physical size of the monitor but can detect the pixel size, and so a 96dpi resolution is assumed often incorrectly.  If you specify the physical screen size in an xorg.conf file, Xorg will set the true dpi on it's own and KDE will likely work well "out of the box" without needing to override any DPI settings.

As for JS reporting a 720p region, I'd not read much (or really anything) into that - it certainly doesn't tell you anything about your system or how videos will play.  You have a 1080p screen, fullscreen videos will be at 1080p (so long as the video source is at least that high of a resolution).  Getting the right screen size and caclulated DPI only affects the scaling of fonts and font-relative sizing (i.e., the height of a menu bar would generally be a font-relative measure).

Last edited by Trilby (2021-10-15 23:58:37)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2021-10-16 04:07:58

rezad
Member
Registered: 2014-09-17
Posts: 184

Re: question about display scaling and resolution

after some use with display scaling I think I got some insight into what is going on.
first:
using dpi or scaling doesn't actually change any resolution, which is good to know.
what tipped me to that direction was looking at firefox about:support page and seeing that it sees the gpu display as a 1080p.

also I use x (wayland is not bug free for me) but using scaling seems to make most programs work good for me.

I still think kde should fix this paper cut issues (like not using a scaling font based on user screen size (which can be gotten from xrandr) .

Offline

#4 2021-10-16 07:05:36

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

Re: question about display scaling and resolution

This is actually a follow-up to https://bbs.archlinux.org/viewtopic.php?id=270419 and the physical size seems correctly determined.
According to https://wiki.archlinux.org/title/HiDPI#KDE_Plasma KDEs font DPI setting should™ set the randr DPI (no idea what sets it to 96 itfp, how do you login/start your session)
Your initial problem is that you've configured your system for the 60% resolution (fonts w/ large point sizes) or just came to expect the underscaled look.

Also

right now I have sett global displat scaling to 150%

From your other thread and there

the menus are too big

this is absolutely NOT what you wanted to do, reset that and force the DPI in the font settings. The system wide logical DPI will be picked up by a couple of things. No idea whether KDE also merges Xft.dpi into xrdb for you.

Online

#5 2021-10-16 07:30:43

rezad
Member
Registered: 2014-09-17
Posts: 184

Re: question about display scaling and resolution

seth wrote:

This is actually a follow-up to https://bbs.archlinux.org/viewtopic.php?id=270419 and the physical size seems correctly determined.
According to https://wiki.archlinux.org/title/HiDPI#KDE_Plasma KDEs font DPI setting should™ set the randr DPI (no idea what sets it to 96 itfp, how do you login/start your session)
Your initial problem is that you've configured your system for the 60% resolution (fonts w/ large point sizes) or just came to expect the underscaled look.

Also

right now I have sett global displat scaling to 150%

From your other thread and there

the menus are too big

this is absolutely NOT what you wanted to do, reset that and force the DPI in the font settings. The system wide logical DPI will be picked up by a couple of things. No idea whether KDE also merges Xft.dpi into xrdb for you.

no.
I have not set my setup to 60%. kde did that as default by thinking my dpi is 96.
when it sees the dpi as 96 them when I set my personal dpi as 158 (or 144) then kde thinks I want to zoom from my 1080 to 720 and that is what happens for brave and firefox.
again I didnt set anything when I installed kde. I just saw that font was too small and just increased font.
thats it.
with my new laptop, that font increase was not enough so I was searching for a fix.


the menus are not too big when I use gloabal scaling.
I think because I had set font to bigger than default and then scaled the display, the menus got big.
so I reset all the setting to default and then only used the scaling option set to 150% and things look fine.
just two things:

1-
I wish firefox would use 1080p for veiwport but I think this is firefox issue that scales the pixels based of default zoom(from firefox setting) or dpi. I didn't investigate it further becuase I am fine with firefox giving a 720p to webpages (unless I am missing something). again firefox sees that I have a 1080p display (as seen from about:Support) but instead of only scaling its own font and menu it also reduces the webpage resolution (it javascript method to get the resolution can be trusted)
again this is firefox related. compared to brave browser I have seen different behavior from firefox ( as you saw on my last thread)

2-
kde doesnt seems to understand (compute?) the dpi from my screen size.
this is based on me installing arhclinux and kde twice on two different laptops and having to ,on first laptop, increase the font ( that was a 15inch 720p laptop so just the font was enough) and on this second laptop, increasing the font then messing with dpi and then resetting them both to default and use the global as recommended by kde itself.

again:
this is the behavior on a clean new installation of kde.
I didnt set my dpi to 96. it is just that if I set dpi to 157-158 (calculated from my screen size) or use global scaling I get acceptable/readable sizes in all apps, but it makes firefox (and probably other apps) use 720p resolution  because kde or x or whatever tells them that my screen is in zoom mode and tell them that I am going from screen default  ~96 to my custom ~160dpi.
and if I dont touch the clean install and it seems that kde think that my dpi is 96 (which I found out after playing with numbers in font dpi in kde and looking at what brave sees at webpage resolution (brave uses fracturing zoom but firefox uses stepping zoom so for example with a non standard zoom brave would show 1920*.78 by 1080*78 but firefox would round that to nearest standard)

it seems that my kde desktop seems my screen dpi as 96 and that makes all the things look smaller if I dont touch the defaults.
but if I use global scaling as 150% that make the dpi near 96*150 so near my 158 physical dpi.

if you have anyway to find what causes kde to use 96 (or whatever number) dpi it uses when I install kde , you can tell me and I can investigate from there.


if I was not clear I apologize and say it again:
after a clean kde install from usb I had to at the first step either zoom in konsole for my commands typing or set a bigger konsole font size.
that is the first thing I have to do in kde installation.
I didnt touch any setting or dpi or anything before I get to that.
so I am sure that is all kde and x and others and not me.


also when I use global scaling from plasma setting and set it to 150% then I see that in font section the font dpi is set to 144 which means that from kde perspective my original dpi is 144*100/150=96 exactly


also if I set everything to default and then user xrandr to set dpi to anything like 158 that makes the output of this command
xdpyinfo | grep -B 2 resolution
screen #0:
  dimensions:    1920x1080 pixels (308x173 millimeters)
  resolution:    158x159 dots per inch

and that dimensions are near my physical screen size. but at the next login that commands shows this:
xdpyinfo | grep -B 2 resolution
screen #0:
  dimensions:    1920x1080 pixels (508x285 millimeters)
  resolution:    96x96 dots per inch

so kde seems my screen as a 51cm by 29 cm screen which is 164% the size of my actual screen from my measurement and
xrandr | grep -w connected     
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm

that is my main issue.
kde thinks my laptop screen is bigger than it is and so the scale it uses ,not the my custom scale I set but the internal scale that it uses from the original dpi that it thinks it is 96, makes everything look small on my smaller actual screen.

I need to make kde understand that my acutal dpi is 158 or make it understand that my screen is 309mm x 174mm not 508x285 millimeters
so that the base is correct and I dont have to use tricks to see the text.

I have uploaded and image of me posting this post. https://imgur.com/a/PRKav4Z
image this on a 31by17cm screen
and weep for my eyes on kde default setting.

Last edited by rezad (2021-10-16 09:37:27)

Offline

#6 2021-10-16 12:20:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,497
Website

Re: question about display scaling and resolution

seth wrote:

... and the physical size seems correctly determined.

Based on what?  If it was correctly detected (or explicitly set in an xorg.conf) the reported DPI would definitely not be 96 DPI.  If 96 DPI is being reported, there is still a misconfiguration at the Xorg level which should be addressed prior to tweeking WM / DE settings.  Certainly a guess-and-check approach can be used to adjust DE settings until a suitable result is reached, but if the underlying Xorg DPI isn't correct this will require odd settings in an attempt to have two wrongs make a right (i.e., one nonsensical setting compensating for another existing nonsensical setting).

EDIT: I suppose the rezad never defined where the value of 96 was obtained.  Rezad, what does xdpyinfo report?

Last edited by Trilby (2021-10-16 12:22:04)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2021-10-16 15:41:08

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

Re: question about display scaling and resolution

Inspector Parrot wrote:

Based on what?

https://bbs.archlinux.org/viewtopic.php … 0#p1997800

eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm

https://bbs.archlinux.org/viewtopic.php … 7#p1997817

also my laptop is 14 inch.

sqrt(12.165354^2 + 6.8503937^2) = 13.96

The only way that's not correct is if units uses British inch (which, let's face it, just like pounds could be totally different from the US implementation … ;-)

Gnome/GDM has a habit to steamroll the correct™ 96DPI over stuff, that's why I asked how he logs in.

The geometry from xdpyinfo is calculated from the logical DPI, ie. if you run "xrandr --dpi 200" the output will be different from the one after a subsequent "xrandr --dpi 72" - the authority on what the system should (jaja) "think" about the actual physical dimensions is xrandr. Qt reports logical and physical DPI - depending on what one needs (what for font rendering and generally most clients would be reasonably the logical DPI, ie. the stuff you can set yourself)

Online

#8 2021-10-16 15:43:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,497
Website

Re: question about display scaling and resolution

Thanks - I stand corrected.  Corrected, and more convinced that DE's suck.  I think that terminology is a bit misleading though as I'd call the two values the physical DPI and the illogical DPI - at least when the DE deliberately sets it to something different than the physical DPI for no reason.

Last edited by Trilby (2021-10-16 15:47:40)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2021-10-16 18:26:19

rezad
Member
Registered: 2014-09-17
Posts: 184

Re: question about display scaling and resolution

so everyone is on the same page? about what the problem is?
kde (or gnome too? I dont know)  on x (and I tested on wayland it was the same) thinks my physical screen is the
xdpyinfo | grep -B 2 resolution
screen #0:
  dimensions:    1920x1080 pixels (508x285 millimeters)
  resolution:    96x96 dots per inch
this is even though I have used global scaling and so in kde setting the dpi is also have gotten changed to 144 which
xrdb -query |grep dpi
Xft.dpi:        144
shows.

so kde is confused.

and when I use this global scaling or just dpi from kde and then logout and back it and test these two
the xrdb says 144 and xdpyinfo says 96
and if I then use this command
xrandr --dpi 144
the desktop stays the same (which means that the dpi is still 144) but now xdpyinfo also says 144.
so xdpyinfo at the login always says 96 even though I have set the dpi to be 144.

UPDATE: it seems there are actually two dpi ,one for screen one for font.
based on this.
https://linuxreviews.org/HOWTO_set_DPI_in_Xorg
now I know why linux is not a desktop OS.

maybe all this causes the DE to not work correctly.
my login manager is sddm.

should I test with others or is this futile and kde plasma does this one upon install.

also cant I fool kde to think correctly? make is see that my physical dpi is 158 (or size of screen is 14inch?)

Last edited by rezad (2021-10-16 18:31:52)

Offline

#10 2021-10-16 18:57:29

rezad
Member
Registered: 2014-09-17
Posts: 184

Re: question about display scaling and resolution

I tested all the available optinos (even setting from xorg config my monitor size) but kde still thinks I am zooming(scaling) and tells brave browser that and I get under 1080p for viewport in webpages.

I think I go back to setting all to defaults and then setting the kde font to bigger font.

Offline

#11 2021-10-16 19:34:46

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

Re: question about display scaling and resolution

Again: stop bumping.

There are not "actually two dpi ,one for screen one for font", no idea where you got that nonsense from.
There're however several ways to override the DPI the clients are supposed to use (because they all read different configurations) and all of this has nothing to do with "linux" but X11 which is significantly older than linux and was designed for remote terminals.
On top of that HiDPI is a PITA on older windows software just as much (if not even worse)

I previously explained why the xdpyinfo output is irrelevant when it comes to the question *why* the DPI is at 96.
Querying xdpyinfo under wayland is even more pointless, because you're talking to a nested X11 "emulation".

https://gitlab.freedesktop.org/xorg/xse … issues/253
Xorg starts at 96 DPI (seems only nvidia has a proprietary config option and also calculates the DPI from the EDID by default) and SDDM/KDE simply don't do anything about that.

You can force SDDM to start X11 w/ a specific DPI, https://wiki.archlinux.org/title/SDDM#DPI_settings
Alternatively, you can set the DPI w/ xrandr in a session script in ~/.config/plasma-workspace/env/, https://wiki.archlinux.org/title/KDE#Autostart

You're certainly at liberty to do what you want on your system, but using a false DPI and oversizing your configuration is not advisable and will fail especially in browsers, where some webdev has configured the font & size for you - likely the reason why you mapped pixel dimensions in FF itfp - and what in turn caused your entire inqury.

Online

#12 2021-10-16 20:40:15

rezad
Member
Registered: 2014-09-17
Posts: 184

Re: question about display scaling and resolution

again I am not bumping
I am just adding the info I learn from changing stuff and reporting back here.
about the dpi I didnt say it myself and I put the link there so when you say "no idea where you got that nonsense from." the link is there. doesnt mean the link is gods word but it does mean you "no idea where you got that nonsense from." is ,...... . well nevermind.

second I dont want to override dpi. overriding dpi would mean that linux xorg have the correct dpi and I , like an asshole, want to change that.
what I found out is that x (and wayland it seems) hardcode dpi (or think all the displays are) 96 dpi.
this is not my claim. this is interet claim that I have also seen when trying to fix my reading ability.


and again I am not using wayland. I dont know why you have to say this "Querying xdpyinfo under wayland is even more pointless,"\
you are correct that xdpyinfo is uses the current dpi that is used and not the correct one but that exactly show my issue.
if I use a clean install xdpyinfo say 96dpi and calculate a   dimensions:    1920x1080 pixels (508x285 millimeters) screen size that is bigger than my screen size.
and it seems that kde/x uses this dpi as the base one.

as you yourself said "Xorg starts at 96 DPI " and I was trying to fix that because not all screens are physically 96dpi.
but it seems that when I try to change dpi to 144 for example, then x (or kde or what ever linux thing it doing this) thinks I am zooming from a physical 96dpi screen and that makes application like firefox the use a 720p screen for webview.

if my issue is  not clear enough let me say is easier.
suppose you have my laptop and wanted to install archlinux on it.
then with a clean install kde you login.
then you see that the text is way too small.
what would you do?
if you change kde font size (which I use to do on my bigger older 720p laptop) then that fixes some issues but then firefox font is still way too small. because firefox still get 96dpi.

if I use global scaling from kde (which also sets dpi) or set the font dpi manually to say 144 (96*1.5) then I can reset the font size to to the default and firefox and other apps text is readable. but then firefox and brave (and probabrly others) use a 720p screen as if DE told them to zoom which it kinda did with global scaling.



I dont understand why you have to say this:
"You're certainly at liberty to do what you want on your system, but using a false DPI and oversizing your configuration is not advisable and will fail especially in browsers, where some webdev has configured the font & size for you - likely the reason why you mapped pixel dimensions in FF itfp - and what in turn caused your entire inqury.
"

I am not trying to use a FALSE dpi .
my physical screen dpi is 158. but linux(xorg) thinks that my screen is 96dpi.
and I have no way to tell it that my screen is 158 dpi. I can only tell it to use 158 dpi which x interpret as me wanting to use a zoom or scale from 96 to 158 dpi.


"Gnome/GDM has a habit to steamroll the correct™ 96DPI over stuff, that's why I asked how he logs in.

The geometry from xdpyinfo is calculated from the logical DPI, ie. if you run "xrandr --dpi 200" the output will be different from the one after a subsequent "xrandr --dpi 72" - the authority on what the system should (jaja) "think" about the actual physical dimensions is xrandr. Qt reports logical and physical DPI - depending on what one needs (what for font rendering and generally most clients would be reasonably the logical DPI, ie. the stuff you can set yourself)"

here you a think the same way as me.
I dont know what made you think I want to "use a FALSE dpi ."

also I have tested with disabling the sddm login manager and running a plasmashell from terminal with startplasma-wayland
I still have the same issue.
so sddm doesnt set anything that messes it.


if you want to insult me and not add to discussions you can refrain from answering to this post.
if you read all I wrote ,even with my not so good english, you should have understood my issue by now. if not DO NOT answer to this ,ok?
I dont need insults beside the issue that I am trying to fix.

Last edited by rezad (2021-10-16 21:22:55)

Offline

Board footer

Powered by FluxBB