I know there is a lot of stuff on high to set DPI scaling for SDDM correctly, but I am currently having kind of an opposite problem:

I have a laptop with a very high resolution display using Tumbleweed with KDE and (some time ago) fiddled with the DPI/scaling/resolution settings and whatnot:

  1. Using a different screen resolution than the default. This worked best to my experience (SDDM was tiny, but I only use it to type in my password, so that’s okay) with some minor issues - the laptop resolution sometimes reverting to the default when I plug in a second monitor, for instance. The problem was that this stopped working at some point (I was not able to set the desired resolution for some reason) but I think this issue is fixed.
  2. Using kwin’s screen scaling feature. This also works but has the problem that a) windows on other monitors are scaled as well and b) I had issues with virtualbox
  3. Using custom font DPI settings and icon sizes. Works as well without the virtualbox issue but has the same problem as 2 plus it looks ugly
  4. Editing /etc/sddm.conf and setting an SDDM DPI value. This works with the same problems as 2 and 3

My goal right now is to revert everything to the default settings, i.e. super small everything on my laptop, and then using method 1 again since this worked best for me. The problem I face is that if I revert the steps listed above, I suddenly get a very huge SDDM login screen and a ridiculously scaled plasma desktop (konsole does not fit on screen). Heck, SDDM gets SMALLER, if I set the DPI value in /etc/sddm.conf to 192!

My guess is that I have somewhere overridden a default scaling/DPI setting that I’m missing out right now. Are there any other locations that I can look at to get an idea why everything is so large on my laptop?

Oh and on a side note: why does the SDDM DPI setting influence how kwin_x11 draws the window decorations? This seems odd to me…

I have played with DPI settings a lot. The best fit for me is to set screen size in /etc/X11/xorg.conf.d/50-monitor.conf. That is somewhat tedious as the size is in mm there and the DPI is calculated then. So I had to do the reverse calculation, ie have a target of, say 144 dpi (150%) and calculated screen size from that. My actual dpi is 162 or so but that looks odd. As the gnome folks simply ignore the monitor setting, I also have to set dpi in ~/.Xresources via Xft.dpi:144 along with cursor size. Lastly I set dpi in Firefox for making its UI elements not hurt my eyes.

The pro is that you can set screen size per monitor and thus override any automagically calculated defaults for any of your monitors.

Add something like this ( get the 122 value from what works in KDE ) to /etc/sddm.conf

ServerArguments=-dpi 122

This than works for the entire DE launched from SDDM.

That is actually what I’m currently doing and it works. It has the issue though, that when I plug in a second monitor (or video projector), everything on that monitor is super big.

Hm, I had a simple working solution before. This seems to be not very flexible. But I checked whether I had something set like this and this is apparently not the case.

Okay, here’s an update. I disabled the SDDM arguments (EnableHiDPI and ServerArguments), now window decorations and KDE applications are very large, but other applications (like Thunderbird, LibreOffice) are NOT - they are displayed as expected (super tiny on my laptop display). This leads me to believe that there is an issue with my kwin settings somewhere. I deleted the ~/.cache/kwin folder, but that did not change a thing.

I am still confused as why SDDM is rendered BIGGER if I set the DPI value to a SMALLER value? I.e. set it to 96, everything is huge, set it to 192, everything looks normal?

What is your output from?

xrdb -query | grep dpi

Does any file in /etc/X11/ contain a string resembling the following?

-nolisten tcp -dpi
xrdb -query | grep dpi

does not show anything, however there is output if I run the following in /etc/X11:

grep -rnw . -e "-nolisten tcp"
./xinit/xserverrc:38:    args="$args -nolisten tcp"
./xdm/Xservers:18::0 local /usr/bin/X -nolisten tcp -br vt7 -keeptty
./xdm/SUSEconfig.xdm:81:        sed -ri 's%(.*/usr/bin/X):blank:]]*(-(no|)listen:blank:]]*tcp:blank:]]*|)%\1 -nolisten tcp %g' ${file}.SuSEconfig

Nothing is found if I search for “dpi”, though.

I think this might actually be a font DPI setting. If I disable everything I know related to DPI settings, KDE applications look “normal”, but actually their symbols are very small and generally the text looks like it barely fits into place.

Have you checked the settings in System Settings > Fonts? You can always hit the ‘Defaults’ button and then ‘Apply’.

BTW, what does the following return?

xdpyinfo | grep -B 2 resolution

Yep, did that, changed nothing. Would that also affect SDDM settings?

This returns the expected DPI settings - if I change /etc/sddm.conf to use some DPI value, it displays it (e.g. 192x193), if I comment that out, it shows 96x96. Is there a command line tool or something, which can display KDE system settings? Would be nice to query that.

kcmshell5 xserver

shows only xdpyinfo output, same as shown by the Xserver section in KInfoCenter.

The misbehaving apps are all gnome/gtk. That is why I pointed out, you could try to set Xft.dpi in your ~/.Xresources . There is, however, a problem if you have multiple monitors of very different dpi.

Hm, I think the “misbehaving” apps are actually the KDE ones - meaning some configuration is stored somewhere, overriding the defaults. If xdpyinfo reports a DPI of 96x96, KDE fonts should not be scaled to a DPI of 200+, if I don’t have the “force DPI for fonts” checkbox enabled in the KDE configuration center.

Add this ( change 122 to whatever DPI you desire ) in /etc/sddm.conf

ServerArguments=-dpi 122

Yes, that’s my current setup (using a DPI value of 192). This works but gives me the issue that when I plug in, say, a video projector, everything on that second screen is scaled to that DPI value as well. My ideal solution would be to disable any DPI scaling (i.e. everything is set to the default value) and then simply use a different resolution on my laptop than the preferred one. E.g. on my laptop the default resolution is 3840x2160, so I would just chose 1920x1080 for a nice display of everything. But I seem to be overlooking a certain setting which messes up my windows when I set all options I know of to the default value.

Thanks to the answers so far though, I appreciate the help.

This thread has become kind of stale but I just wanted to give an update. Apparently the issue is not a certain setting that I made, but seems to be a problem with QT and my hardware (Dell XPS 9370 with 4K display) - I did the crazy thing to wipe everything and install a fresh Tumbleweed snapshot with KDE and the same problem (QT apps and KDE windows are scaled way too large) is still persistent. That leads me to believe that the calculation of DPI settings (probably the font in my case) is incorrect in this situation. As mentioned above, this can be fixed by forcing a DPI value in sddm.conf.

Interestingly, this problem does not occur, when I start a Wayland session with Plasma. Here, everything is scaled nicely and even Virtualbox plays along very well. I did not test using a projector so far and there are some minor issues (e.g. the search bar in the add mini programs menu does not work, but I think these are well known problems already), but this is not a show stopper for me so far. I will therefore stick with Wayland for the moment. Would love to have virtual workspaces and activities in Plasma Wayland, though :wink:

Thanks for all the help, I think this issue is now settled. If for some reason Wayland does not work for me, I’ll switch back to X and fix the DPI value in sddm.conf, that is a good fallback solution.