Bug 422141 - kwin_wayland nested does not allow scale < 1
Summary: kwin_wayland nested does not allow scale < 1
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.17.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-27 17:36 UTC by Tom B
Modified: 2021-10-13 13:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom B 2020-05-27 17:36:19 UTC
SUMMARY

When running kwin_wayland nested, it does not support a command line argument --scale of < 1

STEPS TO REPRODUCE
1. Follow the instructions here: https://community.kde.org/KWin/Wayland#Starting_a_nested_KWin for a nested wayland instance
2. Set the command line switch --scale to a value less than 1 e.g. 0.5 



OBSERVED RESULT

FATAL ERROR incorrect value for scale


EXPECTED RESULT

Should allow a scale of < 1. E.g. 0.5 (50%)

When using an existing session and using the display configuration it's possible to set a scale of 0.5 so this seems to be a redundant check at startup:

The error message comes from main_wayland.cpp:612

https://github.com/KDE/kwin/blob/master/main_wayland.cpp#L612


Use case:

I have an older game that doesn't support MSAA and was trying to render it at a higher resolution and scale it down, a bit like how DSR works in the windows nvidia driver.
Comment 1 David Edmundson 2020-05-27 17:51:37 UTC
Git commit b46d148476948f30f70d0a2b58d0772d57c25942 by David Edmundson.
Committed on 27/05/2020 at 17:51.
Pushed by davidedmundson into branch 'allow_smaller_scales'.

[wayland] Allow nested mode to have a fractional scale < 1

The bug reporter presents a use case of wanting to run a game and scale
down the result.

For everyone else kwin_wayland nested is just a test tool, so I don't
see any disadvantages.

It could be useful in testing.

M  +1    -1    main_wayland.cpp

https://invent.kde.org/plasma/kwin/commit/b46d148476948f30f70d0a2b58d0772d57c25942
Comment 2 David Edmundson 2020-05-27 17:53:42 UTC
Ignore gitlab getting a bit excited there. 

Patch on review https://invent.kde.org/plasma/kwin/-/merge_requests/28
Comment 3 Vlad Zahorodnii 2021-10-13 13:41:18 UTC
The relevant fix has been merged. Not sure why the bug report wasn't closed.