Bug 410632 - Scale Factor 1 is actually 2 on a HiDPI screen
Summary: Scale Factor 1 is actually 2 on a HiDPI screen
Status: RESOLVED FIXED
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.16.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Kügler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-06 00:03 UTC by Raphaël Jakse
Modified: 2021-11-17 18:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raphaël Jakse 2019-08-06 00:03:30 UTC
SUMMARY

I have been using Plasma on an Elitebook 840 G3 laptop with a WQHD (HiDPI) screen, with X11.

I'm using this screen without scaling, and instead zooming the text everywhere I need to read things. I also adjusted the font sizes in the settings so the texts in the UI are not too small. I am doing that because I regularly use external screens with regular DPI.

I connected a 4K TV screen, disabled the internal screen, and set the scaling factor to 1.3 (anyway, something else other than 1). So far so good.

I then disconnected the TV screen and wanted to restore the scaling factor to 1. To my surprise, this has the same effect than setting the scaling factor to 2. This can be seen by invoking the disconnect screen (Ctrl+Alt+Del).

I created a new user to test this behavior on a clean session. By default, the scaling factor is obviously set to something else than 1, probably 2. In the settings, the scaling factor is 1. setting to 1.1 makes things smaller. I am unable to actually obtain a screen factor of 1.

in the ~/.config/kdeglobals file, I can see:

[KScreen]
ScaleFactor=1
ScreenScaleFactors=eDP-1=1;DP-1=1;HDMI-1=1;DP-2=1;HDMI-2=1;

If I remove this section, the scaling factor is still 1 in the settings, 2 in reality. The system behaves as if 1 was some sort of unset value, and the default "detected" scaling factor is used instead of 1.

STEPS TO REPRODUCE
1. On an Hi DPI laptop, set the scaling factor to 1.1.
2. Then, set it to 1.

OBSERVED RESULT

The real scaling factor is something else than 1.

EXPECTED RESULT

the real scaling factor should match the setting : 1.
A default scaling factor different from 1 is fine. On my screen, 2 is picked, but this is a bit too much. 1.5 would be the perfect theoretical value if this was flawless. 2 is still probably better than 1 however. 


The current workaround is to set the scaling factor to 1.1, but I will need to be able to set it to 1 whenever I plug a non Hi DPI screen to the computer.

Wayland would be the perfect solution to this problem, but bug #373907 is a deal breaker for me.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed
KDE Plasma Version: 5.16.3
KDE Frameworks Version: 5.60
Qt Version: 5.13
Comment 1 Nate Graham 2019-08-06 17:24:30 UTC
> I'm using this screen without scaling, and instead zooming the text everywhere
> I need to read things. I also adjusted the font sizes in the settings so the
> texts in the UI are not too small. I am doing that because I regularly use
> external screens with regular DPI.
I understand thy you're doing this, but please understand that it's not a supported setup and the kinds of bugs you're seeing are an unavoidable result. I would recommend trying out the Wayland session, which supports mixed scale factors for different screens out of the box with no hacks required. If you're holding off because Wayland doesn't support fractional scaling yet, the good news is that it's on the way (see patch https://phabricator.kde.org/D22468)!
Comment 2 Raphaël Jakse 2019-08-07 06:51:01 UTC
Hello Nate,

Fractional scaling on Plasma and Wayland is very good news. I was holding off because of this and support for middle click paste.

I actually tried the Wayland session after this bug report and saw that apps are run in XWayland by default, so I actually have a fully functional desktop there. I'll probably keep using it. And I fully understand that my X11 setup is not supported. It's more like a hack that I grown accustomed to.

However, I still think that there is a bug in the UI in the case an X11 session is used that should be solved. Hack or not, I don't see why setting the scaling factor to exactly 1 should not be possible. 

If it says scaling factor=1 in the settings, the scaling factor should be 1, not 2. It seems that 1 currently means "auto", which seems wrong. It took me time to try to understand what was going on. On my computer, it is impossible to set scaling factor=1, though the UI is pretending I can. It does not make sense. It seems for me that an option should me added, "Auto", which is the current behavior of "1".

I don't have this issue on the Wayland session, where scaling factor 1 is actually 1.
I'm happy with the Wayland session now, which I discovered thanks to this issue, but I still think that this bug should be fixed as long as the Xorg session is used by default in most distros.
Comment 3 Raphaël Jakse 2019-08-08 13:20:38 UTC
This was fixed on today's update.
Comment 4 David Conner 2021-11-17 18:52:54 UTC
(In reply to Raphaël Jakse from comment #3)
> This was fixed on today's update.

I'm experiencing a nearly identical bug. In particular, this is happening: "If I remove this section, the scaling factor is still 1 in the settings, 2 in reality. The system behaves as if 1 was some sort of unset value, and the default "detected" scaling factor is used instead of 1."

I also had the config section show up in ~/.config/kdeglobals.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Garuda(Arch) Tumbleweed
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88
Qt Version: 5.13