You are not logged in.

#26 2021-11-10 11:47:29

Clay
Member
Registered: 2021-11-10
Posts: 1

Re: Plasma scaling broken

After installed the latest plasma-workspace , typewriting went wrong.(The application is fcitx). It can not change the different languages , And I also try the ibus and fcitx5.but none of them worked.Who has been noticed this problem?Is I configured something wrong or it need some patches?
Also there is the other problem:When you updated to the latest version, The desktop's UI will be very huge.I am sure that not only me notice it.

Offline

#27 2021-11-10 11:49:11

wim66
Member
Registered: 2021-11-10
Posts: 2

Re: Plasma scaling broken

Downgrading xf86-video-intel xorg-server and xf86-input-libinput solved the problem for me too.

Offline

#28 2021-11-10 11:50:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: Plasma scaling broken

You are setting yourself up for breakage with a downgrade. This isn't a bug, fix your configuration, either properly or by reintroducing the "wrong" default of 96 DPI

Last edited by V1del (2021-11-10 11:51:02)

Offline

#29 2021-11-10 12:26:57

damjan
Member
Registered: 2006-05-30
Posts: 451

Re: Plasma scaling broken

V1del wrote:

You are setting yourself up for breakage with a downgrade. This isn't a bug, fix your configuration, either properly or by reintroducing the "wrong" default of 96 DPI

The question is what is the proper fix. Xorg in old versions would default to 96 dpi. With 21.1.1-2 it properly reports it as 158 dpi (on my 14" 1920x1080 laptop).

Now all fonts in my Plasma settings are quite small already (10Pt).
https://i.imgur.com/b99Cw2U.png

If I remove the "Force 96 DPI" option, they become huge. Should I make them even smaller? how small, 6Pt?
And it's not just the Fonts, Plasma/KWin UI elements become big too. Window title buttons for example.

Offline

#30 2021-11-10 12:31:56

Ammako
Member
Registered: 2021-07-16
Posts: 267

Re: Plasma scaling broken

Grelek wrote:

This could have been communicated more in my opinion, because having to hardcode stuff in configs for things that worked until now seems like going at least 10 years back. sad

Yeah, would have been nice to have an arch-announce about it at the very least.

Offline

#31 2021-11-10 12:34:14

johnnyn
Member
Registered: 2015-10-26
Posts: 26

Re: Plasma scaling broken

This just hit me too in Plasma.
Probably because the system wrongly identifies my 32" TV as being only 06.30" X 03.54" (xrandr -q)

The solution for me is this:

  1. Set Plasma's global scaling to 100%

  2. Deactivate forced DPI for the fonts

  3. Explicitely tell X the physical dimensions of my display, as per these instructions:
    https://wiki.archlinux.org/title/xorg#D … ze_and_DPI

  4. Reboot

The linked instructions says to do this:

Create /etc/X11/xorg.conf.d/90-monitor.conf

Put this content in the file:

Section "Monitor"
    Identifier             "HDMI-1"
    DisplaySize         708 398   # In millimeters
EndSection

Of course these are the specific data for my specific display.

Cheers smile

Johnny smile

Offline

#32 2021-11-10 12:49:07

waldauf
Member
Registered: 2012-07-15
Posts: 133

Re: Plasma scaling broken

seth wrote:
waldauf wrote:

I had the same problem. For me, the solution is this variable exported in zshrc:

export PLASMA_USE_QT_SCALING=1

.

Why do you have PLASMA_USE_QT_SCALING in your zshrc?
This applies to zshrc non-login shells, you most likely want to set the environment to whatever starts the plasma session?

You're right. It must be set globally for the whole system. U put it into /etc/profile.d/dpi.sh. I hope now it's alright. :]

Offline

#33 2021-11-10 12:57:35

waldauf
Member
Registered: 2012-07-15
Posts: 133

Re: Plasma scaling broken

johnnyn wrote:

This just hit me too in Plasma.
~

Create /etc/X11/xorg.conf.d/90-monitor.conf

Put this content in the file:

Section "Monitor"
    Identifier             "HDMI-1"
    DisplaySize         708 398   # In millimeters
EndSection

Does it work for different LCDs? I.e. at home I have two external LCD (2k and FHD) and in work one external LCD (FHD).

Offline

#34 2021-11-10 13:03:06

Jason P.
Member
Registered: 2015-02-26
Posts: 171

Re: Plasma scaling broken

johnnyn wrote:

Create /etc/X11/xorg.conf.d/90-monitor.conf

Put this content in the file:

Section "Monitor"
    Identifier             "HDMI-1"
    DisplaySize         708 398   # In millimeters
EndSection

Of course these are the specific data for my specific display.

Cheers smile

Johnny smile

I was trying the same route as you but I didn't manage to get it working. I have one laptop connected to an external monitor through USB-C.

$ xrandr -q
Screen 0: minimum 320 x 200, current 4480 x 1440, maximum 16384 x 16384
eDP connected 1920x1080+2560+360 (normal left inverted right x axis y axis) 309mm x 174mm
   1920x1080     60.03*+
   1680x1050     60.03  
   1280x1024     60.03  
   1440x900      60.03  
   1280x800      60.03  
   1280x720      60.03  
   1024x768      60.03  
   800x600       60.03  
   640x480       60.03  
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 553mm x 311mm
   2560x1440     59.95*+
   1920x1200     59.88  
   2048x1080     60.00    24.00  
   1920x1080     60.00    50.00    59.94    24.00    23.98  
   1600x1200     60.00  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1440x900      59.95  
   1280x800      59.95  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08  
$ xdpyinfo | grep -B 2 resolution
screen #0:
  dimensions:    4480x1440 pixels (309x174 millimeters)
  resolution:    368x210 dots per inch

I've tried different combinations of identifiers but neither worked:

$ cat /etc/X11/xorg.conf.d/90-monitor.conf
Section "Monitor"
        Identifier "DP-1" # Also tried "DP1" "DisplayPort-1"
        DisplaySize 553 311
EndSection

Offline

#35 2021-11-10 13:13:26

Jason P.
Member
Registered: 2015-02-26
Posts: 171

Re: Plasma scaling broken

waldauf wrote:
export PLASMA_USE_QT_SCALING=1

For me it doesn't work sadly. Not sure if .pam_environment could be also the proper place for having this.

Offline

#36 2021-11-10 13:24:50

abdulhakeem
Member
From: Chicagoland
Registered: 2016-07-31
Posts: 36
Website

Re: Plasma scaling broken

Just updated a few minutes ago and I'm getting this same scaling problem. Switched to Wayland and everything looks normal again. So I guess I'm using Wayland now /shrug

Seems like whatever change(s) Xorg made is the culprit, like others have said. Easier to just switch to Wayland instead of fiddling with Xorg config files


And the worldly life is not but amusement and diversion; but the home of the Hereafter is best for those who fear Allah, so will you not reason? {6:32}

Offline

#37 2021-11-10 13:25:07

giddie
Member
From: Birmingham, UK
Registered: 2009-03-25
Posts: 125

Re: Plasma scaling broken

Two problems:

1. Xorg calculated the DPI based on the screen size of my laptop's panel, but applied it to the whole desktop, which includes an additional monitor. The result is a very incorrect DPI unless I start Xorg with my external monitor unplugged.
2. Having reduced the size of my fonts to account for the DPI change, GTK apps now show tiny tiny fonts. You can see this when choosing the GTK theme from the KDE Settings.

I'm using the "Force font DPI: 96" setting in KDE Settings' Fonts section to solve this until the dust settles.

Last edited by giddie (2021-11-10 13:31:19)

Offline

#38 2021-11-10 13:45:41

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: Plasma scaling broken

It seems that I have a lack of knowledge of exactly what is going on with font size and dpi calculations. On my laptop where I found the unforced dpi  from the command

$ xdpyinfo | grep -B2 resolution
screen #0:
  dimensions:    1920x1080 pixels (344x193 millimeters)
  resolution:    142x142 dots per inch

- I checked manually with the screen size of

1920x1080 pixels (344x193 millimeters)

and did a simple calculation for 1920/(34.4/2.54) and it does give the correct dpi value of 142 that xorg determined before I changed anything.

So somewhere the plasma desktop is displaying the wrong size on the screen when using the 'default' value!  Forcing it to 96 in the settings I presume must therefore be be rescaling it to override a false scaling that is being set within the plasma desktop - and also the sddm greeter must be then displaying wrongly when the default 142 (on that machine) was the correct dpi value. So artificially changing the value may be adding in a scaling that is being incorrectly dealt with by the plasma desktop when the xorg changed its calculation to use the correct dpi, and not the unchanging previous value of 96 - or am I wrong?

It would be nice to see a resolution to this - is it that everyone needs to change their configs for the plasma desktop, or is there now a need for upstream changes in plasma to deal with the now correct dpi calculation that xorg uses?  After all if plasma-wayland is displaying correcly that kind of suggests that plasma in x11 may not be?

I may of course be wrong, but it looks to me that plasma was, and still is, scaling to work around the 'always same' (96 dpi) value that xorg previously used for the dpi value, and now that xorg is doing things correctly plasma should no longer be working around the incorrect value that was previously coming from xorg.  So if that is the case then plasma now has a bug that has been exposed by xorg correctly fixing its determination of the dpi value for each physical monitor?

Last edited by mcloaked (2021-11-10 14:07:48)


Mike C

Offline

#39 2021-11-10 14:50:53

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: Plasma scaling broken

As a further test I took out the sddm dpi.conf and unchecked the forced dpi setting within the plasma desktop - and rebooted -

Amazingly the sddm greeter was no longer the wrong  size - and also the desktop is now displaying correctly despite having unchecked the forced dpi -

I can only guess that by setting the forced dpi, logging out and back in - and then unsetting it and logging out and back in that the configs for that have been re-written by plasma and any previous historic config files have now been overridden, and corrected from the way they were before I changed anything.

Anyway - with neither the sddm dpi file, nor the forced dpi in plasma - it works now! Being suitably amazed by this I went to a difference computer and did the same, and that machine is also behaving correctly now!  So it seems that for my machines where the plasma configs have been in place some considerable time, that the current config files have differences which matter regarding the screen display and scaling - and by making the changes I quoted, and then reverting makes plasma, and the sddm greeter display show as they had done previous to the xorg update.  I will now try the same on remaining machines here and see if that also fixes the screen/font scaling issues.

So it would seem that plasma is working fine - and perhaps a new user created and logging in might not see the scaling issues at all? However forcing the dpi, logging out and back in and reverting to not forcing the dpi value seem to have fixed the problem!

Edit: I have now done the same changes and reverted them on a third machine and it all now works correctly again. I don't understand how this fixed my systems - but perhaps it is magic!

Bizarrely the check for the dpi value now shows:

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

which is the incorrect dpi value, and incorrect physical screen dimensions, which has now been set without my having set it to that value instead of the strictly correct dpi value that xorg seems to have calculated when the xorg package first updated to 21.1.0. But it works. I am puzzled but happy it is working again!

Last edited by mcloaked (2021-11-10 15:09:26)


Mike C

Offline

#40 2021-11-10 15:41:26

Jason P.
Member
Registered: 2015-02-26
Posts: 171

Re: Plasma scaling broken

Problem in my case at least, seems caused by Xorg considering both integrated and external monitor one single big display and doing calculations around that, which gives incorrect numbers. See this comment on a bug report: https://gitlab.freedesktop.org/xorg/xse … te_1153328

So far the only way I've found to have a usable desktop is to force 96 DPI for both global font settings and SDDM: https://bugs.kde.org/show_bug.cgi?id=445236

mcloaked wrote:

As a further test I took out the sddm dpi.conf and unchecked the forced dpi setting within the plasma desktop - and rebooted -

Amazingly the sddm greeter was no longer the wrong  size - and also the desktop is now displaying correctly despite having unchecked the forced dpi -

I did not have any of those settings and still I was having the problem. I've tried enabling them for once but then after disabling all went back to huge DPI, so I just stick with forced 96 while the issue is not fixed.

Offline

#41 2021-11-10 16:03:51

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: Plasma scaling broken

xdpyinfo calculates the output geometry from the resolution (3840x1080) and given dpi (161) and the posted results are "correct" in that sense.
I's not a good tool for this, instead check "xrandr -q" which will print the geometry obtained from the EDID

The apparent problem is however something else and that's not new:
X11 does only support one DPI per DISPLAY, not per output - so if you're on a 96/160 hybrid you need to either lower the resolution on the HiDPI output or upscale the resolution on the other output or force a fixed resolution in the middle (120 dpi)

Online

#42 2021-11-10 16:07:49

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: Plasma scaling broken

P.S.A.

Background

The DPI translates points into pixels w/ the standard actually being 72 DPI at which 1pt is defined as 1px.
Somewhen in the 90ies, monitors started to get a bit better and MS offered an alternatve 96 DPI setting to reflect that.
96 DPI then kinda became the defacto standard until Apple introduced the retina display in 2010 and today there're all sorts or displays w/ DPIs between 72 and >> 400 around.

The change

Until server version 1.20 Xorg defaulted to 96DPI - you could (and still can) change that runtime w/ "xrandr --dpi 123" but there's (afaics) no Xorg config variable to enforce a value - except the proprietary nvidia driver allows

	Option  "DPI"				"123x123"
	Option	"UseEdidDpi"			"False"

in the relevant sections (Device and iirc Screen)

Starting w/ server version 1.21 the DPI is no longer fixed at 96 but calculated from the screen geometries.

The data

There're two userspace tools to inspect screen geometries (and implicitly DPI) - xrandr and xdpyinfo.
It is important to know that xdpyinfo does NOT announce the actual output geometries, but calculates them from the given DPI and the resolution (ie. if I run 1920x1200 at 96 DPI, it'll say that the output is 20 inch by 12.5 inch - whether this is a 13" notebook or a 50" Tv)
"xrandr -q" prints the actual output dimensions (as far as provided by the EDID of the monitor) and the used resolution and you can use that to calculate the physical DPI:

DVI-I-0 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 410mm x 260mm
1920/(410/25.4) ~= 119 DPI / horiz
1200/(260/25.4) ~= 117 / vert
(1" == 25.4mm)
The problem

Clients have ever had access to two kinds of DPI - the physical one (by querying xrandr) and logical (by asking the server) and might have chosen either to render images, mapping points to pixels.
On top of that, there're all sorts of client API scaling factors to augment the DPI - if you've a HiDPI output, you should™ at some point have visited https://wiki.archlinux.org/title/HiDPI - if not, now is the time.
Last but no least, the naive approach many users will take (including this user, an undisclosed amount of years ago when he was young and dumb…er) is to simply use oversized fonts. The typical interface font range should be between 8pt and 12pt - if you're using a 24pt GUI font, that's a clear indication that you're working around the wrong DPI

The "correctestest" solution

Use the proper DPI. The logical and physical DPI should™ not fall apart and most clients (see the HiDPI wiki…) can handle higher DPIs just fine.
The Qt scaling factors should™ use the physical DPI for the UI scaling anyway - so this should™ not have been impacted, but what will have changed is the font rendering.
If your fonts are now toobig™ you're either using bogus point sizes or added some QT_SCALE_FACTOR (which will scale fonts as well - the client scale variables are a mess) - QT_SCREEN_SCALE_FACTOR* will NOT scale the font.

=> Look around at

printenv | grep -i scale

None of this addresses or relates to the problem of having multiple outputs w/ significantly different physical DPIs

Online

#43 2021-11-10 16:27:11

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: Plasma scaling broken

With all this going on, on my setup with Nvidia proprietary drivers and xorg-server 21.1.1 my DPI was "calculated" at 75x75 where as it should be 94ish. Go figure.

Offline

#44 2021-11-10 16:30:50

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: Plasma scaling broken

"xrandr -q" and xorg log?

Online

#45 2021-11-10 16:46:23

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: Plasma scaling broken

seth wrote:

"xrandr -q" and xorg log?

https://linode.aerium.hr/stuff/xrandr.log
https://linode.aerium.hr/stuff/Xorg.0.log

Now that you mention it, I was probably expecting too much, because there are 3 screens, one laptop screen 1920x1080 15.6'' (141 dpi) and two 1920x1200 24'' (94 dpi) with one of them being connected via HDMI and another via VGA. I was hoping that it would adjust the DPI to the external monitor connected via HDMI.

Last edited by karabaja4 (2021-11-10 16:47:23)

Offline

#46 2021-11-10 16:57:52

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: Plasma scaling broken

[     8.886] (II) NVIDIA(0):     "NULL"
[     8.886] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[     8.886] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[     8.886] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default

It's an optimus system, you're running on the nvidia chip but all outputs are on the intel one and on top of that

DP-1-1 connected 1920x1200+3840+0 (normal left inverted right x axis y axis) 0mm x 0mm

You'll have to get out a ruler and provide the dimensions for the output w/ a configlet, see https://bbs.archlinux.org/viewtopic.php … 2#p2002412

But even then the resulting DPI seems influenced by the 75DPI for the nvidia NULL device…
=> use the nvidia-specific edid/dpi options, see https://bbs.archlinux.org/viewtopic.php … 9#p2002449

Online

#47 2021-11-10 17:35:05

cloverskull
Member
Registered: 2018-09-30
Posts: 172

Re: Plasma scaling broken

Diverging a bit from the direction of the thread just to post my solution to this on a single monitor setup...I basically wanted things "back the way they were" so manually set a dpi of 96 with the following steps.

I created two configuration files for sddm, not sure if the second is actually needed here, but I'll post for completeness.

/etc/sddm.conf.d/dpi.conf

[X11]
ServerArguments=-dpi 96

/etc/sddm.conf.d/hidpi.conf (note that I don't actually use Wayland, nevertheless I added the setting here)

[Wayland]
EnableHiDPI=true

[X11]
EnableHiDPI=true

~/.Xresources

Xft.dpi: 96

Lastly, in System Settings -> Appearance -> Fonts, I ticked "Force font DPI:" and set it to 96.

Cheers.

Offline

#48 2021-11-10 17:58:52

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: Plasma scaling broken

mcloaked wrote:

As a further test I took out the sddm dpi.conf and unchecked the forced dpi setting within the plasma desktop - and rebooted -

Amazingly the sddm greeter was no longer the wrong  size - and also the desktop is now displaying correctly despite having unchecked the forced dpi -

I can only guess that by setting the forced dpi, logging out and back in - and then unsetting it and logging out and back in that the configs for that have been re-written by plasma and any previous historic config files have now been overridden, and corrected from the way they were before I changed anything.

Anyway - with neither the sddm dpi file, nor the forced dpi in plasma - it works now! Being suitably amazed by this I went to a difference computer and did the same, and that machine is also behaving correctly now!  So it seems that for my machines where the plasma configs have been in place some considerable time, that the current config files have differences which matter regarding the screen display and scaling - and by making the changes I quoted, and then reverting makes plasma, and the sddm greeter display show as they had done previous to the xorg update.  I will now try the same on remaining machines here and see if that also fixes the screen/font scaling issues.

So it would seem that plasma is working fine - and perhaps a new user created and logging in might not see the scaling issues at all? However forcing the dpi, logging out and back in and reverting to not forcing the dpi value seem to have fixed the problem!

Edit: I have now done the same changes and reverted them on a third machine and it all now works correctly again. I don't understand how this fixed my systems - but perhaps it is magic!

Bizarrely the check for the dpi value now shows:

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

which is the incorrect dpi value, and incorrect physical screen dimensions, which has now been set without my having set it to that value instead of the strictly correct dpi value that xorg seems to have calculated when the xorg package first updated to 21.1.0. But it works. I am puzzled but happy it is working again!

It seems there was something (well, two things) I didn't understand - firstly all files in /etc/sddm.conf.d/ are processed and not just files named xxx.conf - I had moved my dpi.conf to dpi.conf.orig but it was still being processed - removing it completely got xorg's calculated dpi back again and this was being honoured by both sddm greeter as well as plasma.  Trying to adjust the overall monitor scaling with the correct dpi was not successful in getting the plasma desktop to display as I liked. So I put the dpi.conf file back into /etc/sddm.conf.d/ and once sddm honours the specified dpi value then plasma also honours it - so with no adjustment within the plasma settings the desktop is now displaying sizes as I like them.  So for my systems it is only necessary to change the defined dpi value for sddm and then plasma behaves itself - maybe there are other solutions but this is fine for me. For multiple monitors perhaps more sophisticated adjustment is needed.

Last edited by mcloaked (2021-11-10 17:59:15)


Mike C

Offline

#49 2021-11-10 18:08:36

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: Plasma scaling broken

cloverskull wrote:

Diverging a bit from the direction of the thread just to post my solution to this on a single monitor setup...I basically wanted things "back the way they were" so manually set a dpi of 96 with the following steps.

I created two configuration files for sddm, not sure if the second is actually needed here, but I'll post for completeness.

/etc/sddm.conf.d/dpi.conf

[X11]
ServerArguments=-dpi 96

/etc/sddm.conf.d/hidpi.conf (note that I don't actually use Wayland, nevertheless I added the setting here)

[Wayland]
EnableHiDPI=true

[X11]
EnableHiDPI=true

~/.Xresources

Xft.dpi: 96

Lastly, in System Settings -> Appearance -> Fonts, I ticked "Force font DPI:" and set it to 96.

Cheers.

From my findings I wonder if you didn't force DPI to 96 in system settings whether plasma would inherit the value from where you set it in the sddm dpi file? If so then you don't need to make that change for every user on the system and it is simpler to set up.


Mike C

Offline

#50 2021-11-10 18:34:29

Jason P.
Member
Registered: 2015-02-26
Posts: 171

Re: Plasma scaling broken

Change is going to be reverted on a patch release next week.

https://gitlab.freedesktop.org/xorg/xse … te_1153655

Offline

Board footer

Powered by FluxBB