Bug 401179

Summary: Allow lesser than 1 scale factor
Product: [Plasma] KScreen Reporter: Filipe Azevedo <pasnox>
Component: kcmAssignee: Sebastian Kügler <sebas>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: kde, nate
Priority: NOR    
Version First Reported In: 5.14.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Filipe Azevedo 2018-11-18 20:39:57 UTC
I'm using KDE Plasma and KDE SC on a macos hardware which comes with so called "retina" screen.
Using a resolution of 2880x1800 is obviously useless, because too difficult to read, the list of screen resolution is also not changeable (fixed).
Up to now i workaround the issue by using xrandr to downscale the screen to 1440x900 using a scale factor of 0.5 into an early system script.
Works fine, still i had to workaround that in kcm kscreen again to position the second external screen correctly.
ie, i have to put the position of the second screen half the width of the first screen (remember, kscreen only allow scaling from 1 to more) so that both my first screen downscale and second screen position does not get wrong.
All works so fine, but at a manual maintains cost.
I would like kscreen kcm allow less than 1 scale factor so that i can just correctly setup my screens without requiring work around / own script.


STEPS TO REPRODUCE
1. Use a mac book laptop with a retina screen and an external non retina screen
2. Try to setup your screens so that it fit your needs

OBSERVED RESULT
First retina screen is too small to be usable

EXPECTED RESULT
Be able to downscale my retina screen resolution

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KaOS Linux
KDE Plasma Version: 5.14.3
KDE Frameworks Version: 5.52.0
Qt Version: 5.11.2
Comment 1 Nate Graham 2018-11-19 21:35:52 UTC
A scale factor of 2x should make a 2880x1800 effectively into a very sharp and crisp 1440x900 screen. Why can't you just use a 2x scale factor? What am I missing here?
Comment 2 Filipe Azevedo 2018-11-20 17:11:14 UTC
Retina screens in kscreen kcm for X11 does not have the possibility to change the screen resolution.
The scale factor.... is an upscale factor, not a downscale factor.
So moving the scale factor to x2 just make it twice bigger while i want to reduce it (downscale).
Comment 3 Kai Uwe Broulik 2018-11-20 17:24:15 UTC
Wayland allows per-screen scale factors, there you can use 2x on your Retina laptop and 1x on the external screen.
Comment 4 Filipe Azevedo 2018-11-20 17:53:04 UTC
Indeed, wayland is much better in this area, still wayland is not stable at all with my mac and nouveau driver and lead to frequent freeze.
Also, using scale factor as a way to report the screen scale factor is plain wrong for user and lead to miss understood.
A scale factor is something that would scale a given size.
Wayland and X11 scale usage is totally inconsistent, and it's really wrong wrong wrong for the user switching wayland/x11.
X11 use it as an upscale feature while wayland use it to reduce the screen hardware size by the factor.
Comment 5 Nate Graham 2018-11-20 18:36:15 UTC
If you have a Mac retina screen, that means that when running at native resolution, everything will be too small. You want things to be *bigger*, which a 2x scale factor accomplishes. Using a 0.5x scale factor (for example) would make the already tiny screen content even smaller, which makes no sense.

As Kai mentioned, on Wayland you can use per-screen scale factors, which should resolve the problem.

Does everything work properly when you use the Wayland session and set a 2x scale factor for your Retina screen and a 1x scale factor for the external screen and DON'T use your xrandr hack with the script (which I guess wouldn't work on Wayland anyway)?
Comment 6 Bug Janitor Service 2018-12-05 03:44:22 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Filipe Azevedo 2018-12-08 20:05:38 UTC
Let recap things, because i have the feeling i did not emphasized enough on the issue being *dual* screens with internal screen being a retina screen and the external one a full hd screen non retina, under X11.

If you have only a retina screen - the kcm scale feature just work, but break as soon as you add another screen, simply because it's an all screens scale.
To be honest this *global* scale feature is useless, i still can't understand how it was accepted.

Note that I do know that wayland can do per screen scale factors, but i don't care because wayland/nouveau is all but stable on a mac machine.

I did disable my script (command is: xrandr --output DP-2 --scale .5x.5 --output HDMI-0 --pos 1440x0) which is basically downscaling the screen picture of the retina screen half its size and move the other screen near it so that it make a contiguous plan.
This script is executed by the user session autostart kcm - and it just do the job.
The *only* draw back is that the downscale has a lower rendering quality, but clearly acceptable for what it fix.

So, i the initial request title is somehow wrong - because in reality we may not speak about the same feature.
kscreen kcm seems to apply a xorg screen scale feature, while i do speak about xrandr scale property.
I have no idea what kscreen try to do behind the scene (but i really would like to know the details, even pointing the exact code applying the changes), but what i need is an out of the box working solution for a retina mac with external screens plugged.

Hope it help understanding correctly the issue.
Comment 8 Nate Graham 2018-12-11 15:16:40 UTC
We just restored the ability to set < 96 DPI values in the Fonts KCM, so I guess this seems reasonable too.
Comment 9 Christoph Feck 2018-12-12 00:11:16 UTC
Try:

QT_SCALE_FACTOR=0.75 kcalc

On my system (Qt 5.12.0), it does not work satisfactorily.
Comment 10 Nate Graham 2018-12-12 00:21:31 UTC
Oh gosh, you're right. In fact, every app I try it with is uselessly muddled and unusable, including 3rd-party non-KDE Qt apps. Doesn't look like we can do this until Qt improves support here. :(
Comment 11 Filipe Azevedo 2018-12-14 17:08:09 UTC
The Qt env var to scale screens is useless, because it would have to be applied correctly before even starting the plasma desktop (in reality it would be this app to change the scale) so that its inheriting apps render correctly.
The only current solution is xrandr scale feature using .5 scale factor (hence my allow less than 1 scale factor, but in the end they are not the same scale factors).
Any chance this being used instead of a global xorg things that serve nothing but create more problems ?
Xrandr can do per screen scaling, and might be a better solution until wayland impose itself. There is nothing to wait for Qt because there is no issue to fix in it.