Bug 467039 - With SDDM using Wayland, syncing settings does not send along the correct scaling as it does with X11
Summary: With SDDM using Wayland, syncing settings does not send along the correct sca...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_sddm (show other bugs)
Version: 5.27.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-08 03:04 UTC by Nate Graham
Modified: 2024-04-11 10:28 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2023-03-08 03:04:22 UTC
STEPS TO REPRODUCE
1. Have a 4k screen
2. Use SDDM in native Wayland mode (to do this on Fedora, I swapped the sddm-x11 package with the sddm-wayland-plasma package)
3. Go the SDDM KCM and Apply Plasma settings


OBSERVED RESULT
/etc/sddm.conf.d/kde_settings.conf file is written to disk containing this:

[X11]
ServerArguments=-dpi 192

That's only evaluated under X11 though, so the greeter on SDDM is drawn at 1x scale, not 2x or more as I would expect.


EXPECTED RESULT
SDDM greeter is drawn at the same scale that my Plasma session uses (either the user-chosen 200% scale, or the automatically generated 250% scale)
Comment 1 Nate Graham 2023-03-08 03:45:38 UTC
Looked into this a bit. On Wayland, we don't have a simple way to get the "I'm using high DPI scaling" setting the way we do on X11--that setting being global on X11, and per-screen on Wayland.

Instead, I found that the EnableHiDPI=true argument in the [Wayland] section of the SDDM config works properly.

Setting this value when syncing settings in the KCM probably doesn't make sense; it should instead be the default setting for SDDM on Wayland. I've submitted a PR for that: https://github.com/sddm/sddm/pull/1681.

If that's rejected, we have the following other options:
- Ask distros to set that by default in their packaging
- Always set it here when syncing settings
- Only set it here when syncing settings if the user is using any >100% scaling on any screens, which we would need to determine by parsing KScreen configs, which seems like it could be a can of worms
Comment 2 daf 2024-03-06 20:50:54 UTC
To add to this bug I've notice cursor theme and size is also not respected.
Comment 3 Firestar-Reimu 2024-03-10 15:40:44 UTC
Same Problem, Plasma 6.0 on Wayland. I have a 2560x1600 screen with 200% scaling, but the SDDM cannot sync, still 100% which is too small for me.
Comment 4 Firestar-Reimu 2024-03-19 11:21:41 UTC
(In reply to Nate Graham from comment #1)
> Looked into this a bit. On Wayland, we don't have a simple way to get the
> "I'm using high DPI scaling" setting the way we do on X11--that setting
> being global on X11, and per-screen on Wayland.
> 
> Instead, I found that the EnableHiDPI=true argument in the [Wayland] section
> of the SDDM config works properly.
> 
> Setting this value when syncing settings in the KCM probably doesn't make
> sense; it should instead be the default setting for SDDM on Wayland. I've
> submitted a PR for that: https://github.com/sddm/sddm/pull/1681.
> 
> If that's rejected, we have the following other options:
> - Ask distros to set that by default in their packaging
> - Always set it here when syncing settings
> - Only set it here when syncing settings if the user is using any >100%
> scaling on any screens, which we would need to determine by parsing KScreen
> configs, which seems like it could be a can of worms

A solution is here:

https://forums.opensuse.org/t/ui-scaling-in-sddm-no-longer-works-after-kde-plasma-6-upgrade/173350/

But I want to know that 1 year has passed and sddm 0.21.0 has released. Has this problem not solved?
Comment 5 Jakob Petsovits 2024-03-25 00:46:26 UTC
(In reply to Nate Graham from comment #1)
> Setting this value when syncing settings in the KCM probably doesn't make
> sense; it should instead be the default setting for SDDM on Wayland. I've
> submitted a PR for that: https://github.com/sddm/sddm/pull/1681.
> 
> If that's rejected, we have the following other options: (...)

So the patch got merged and a new SDDM would have been released by now. How does that affect the current status of this bug?
Comment 6 Zamundaaa 2024-03-25 14:04:17 UTC
Qt scaling doesn't really help if the compositor tells it a different scale.
I thought I had already fixed this, but it turns out I forgot to cherry-pick it to 6.0... With https://invent.kde.org/plasma/sddm-kcm/-/commit/61ab30924b9b26dafbad9f4eb3aa6e2cefe73fc1 it now works for me
Comment 7 Atticus 2024-04-04 17:06:17 UTC
System Information:
uname -a
Linux archlinux 6.8.2-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 28 Mar 2024 17:06:35 +0000 x86_64 GNU/Linux


Desktop: 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
QT Version: 6.6.3
Display Manager: SDDM
Display Server: X11 and Wayland


Problem:
1.  Login screen does not respect global scaling options under X11 or Wayland when logging in from full Powerdown mode.
2.  Login screen does respect global scaling options when logging in after resuming from Sleep mode.


Session type confirmation:
echo $XDG_SESSION_TYPE
x11

echo $XDG_SESSION_TYPE
wayland


Observed Result:
Login screen does not match global scaling options.  Icons and Text are very small.

Expected Result:
Login screen ought to match global scaling options under X11 and Wayland.
Comment 8 Zamundaaa 2024-04-04 17:52:26 UTC
This only works with the Wayland session, and if you also run SDDM under kwin_wayland. You'll have to configure it to do that yourself if your distro doesn't do it for you.
Comment 9 Atticus 2024-04-04 20:20:43 UTC
(In reply to Zamundaaa from comment #8)
> This only works with the Wayland session, and if you also run SDDM under
> kwin_wayland. You'll have to configure it to do that yourself if your distro
> doesn't do it for you.

For Arch Linux the solution is as follows:

# cd /etc/sddm.conf.d
# nano hidpi.conf

* Add the following lines to hidpi.conf

[General]
GreeterEnvironment=QT_SCREEN_SCALE_FACTORS=2,QT_FONT_DPI=192
Comment 10 Yorimirus 2024-04-11 10:28:22 UTC
So does kcm_sddm set the UI scaling on SDDM wayland now? I'm on openSUSE Tumbleweed, KDE Plasma 6.0.3, which is mentioned as the fixed version, yet I still need to create the hidpi.conf file in order for UI scaling to work.