Bug 461367 - xfreerdp /multimon Does Not Work with Legacy Scaling set to "Apply Scaling Themselves"
Summary: xfreerdp /multimon Does Not Work with Legacy Scaling set to "Apply Scaling Th...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-x11-nested (show other bugs)
Version: 5.26.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-03 17:16 UTC by Stephen Ackerman
Modified: 2023-06-13 01:35 UTC (History)
1 user (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 Stephen Ackerman 2022-11-03 17:16:27 UTC
SUMMARY
When running xfreerdp with the /multimon option, nothing is displayed when x11 scaling is set to "Apply scaling themselves." Setting back to "Scaled by the system" results in xfreerdp properly displaying windows.

STEPS TO REPRODUCE
1. Configure multiple (4K?) displays to 130% scaling
2. Set "Legacy Applications" to "Apply scaling themselves"
3. Run xfreerdp and connect to a remote system with the /multimon option

OBSERVED RESULT
No windows are displayed

EXPECTED RESULT
Both screens display a full-screen xfreerdp window

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Mainline Linux 6.0.6 + Debian config
(available in About System)
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
Monitor configuration: 2x 4K (3840x2160) LG Monitors at 130% scaling
`xfreerdp /monitor-list` specifies 
        [0] 3832x2160   +3839+0
        [1] 3832x2160   +0+0
Comment 1 Stephen Ackerman 2022-11-15 07:16:44 UTC
With Plasma 5.26.3, things are much improved, but still not usable.

Now, xfreerdp reports 
xfreerdp /monitor-list 
      * [0] 3840x2161   +3839+0
        [1] 3840x2161   +0+0

Seems that display 0 is 1 pixel off, and this causes xfreerdp to only display 1 window, instead of 2. (It appears to be trying to create a single window that spans both displays, instead of 2 windows; 1 for each separate display).
Comment 2 Stephen Ackerman 2022-11-18 21:59:50 UTC
https://invent.kde.org/plasma/kwin/-/merge_requests/3215/

Seems like this PR may have some relevance to this issue, as it deals with X11 rounding issues, and being off by 1 pixel seems like it could possibly be a rounding problem.
Comment 3 David Edmundson 2022-11-22 16:06:30 UTC
It does sound relevant. Please let us know if that doesn't fix the issue
Comment 4 Stephen Ackerman 2022-12-08 00:44:00 UTC
Testing with Debian 5.26.4, and it still reports: 

xfreerdp /monitor-list 
      * [0] 3840x2161   +3839+0
        [1] 3840x2161   +0+0

Is this expected to be fixed in 5.26.x, or 5.27?
Comment 5 Stephen Ackerman 2023-02-05 20:17:39 UTC
With Plasma 5.26.90 (I believe that's 5.27 Beta, and should have the fix?) + Frameworks 5.102.0 + Qt 5.15.8, I get the following:

xfreerdp /monitor-list 
      * [0] 3840x2160   +3839+0
        [1] 3840x2161   +0+0

Looks like the same output as 5.26.4. The second monitor is one pixel too large vertically, and the offset for the first monitor is reported as one pixel too small horizontally.
Comment 6 Stephen Ackerman 2023-02-05 20:36:48 UTC
Did a bit more testing, and with 5.26.90, and it looks like even with scaling enabled, xfreerdp /multimon is just completely broken and unusable now.

Whichever screen the mouse is on will (buggily) render halfway correctly with lots of flickering. The other screen will instead render as both images side-by-side, and not filling the screen,  as if it's trying to render the texture for both windows/screens into each window separately. Results in a completely unusable experience with scaling on or off.
Comment 7 Stephen Ackerman 2023-03-02 01:54:42 UTC
Further testing with Debian Frameworks 5.103 + Plasma 5.27.0-1 (shows as 5.26.90 in System Settings? Looks like 5.27.2 is pending a release into Testing) revealed the following behavior:

The off-by-one-pixel issue went away if I used 125% scaling instead of 130%, as inspired by Plasma X11 only allowing 6.25% scaling increments (eg, 125% / 131.25%). Could not get 131.25% to enter into Plasma Wayland's config menu.

The rendering issue is still present. The expected behavior is one window stretched across both screens.

The current behavior is whichever screen has the mouse renders correctly, while the other renders both "screens" side-by-side, centered vertically.

Expected:
+---+---+
| 1 | 2 |
+---+---+

Actual:
+-----+---+
| 1 2 | 2 |
+-----+---+

That would be with the mouse on Screen 2, it switches around when the mouse is on screen 1.
Comment 8 Stephen Ackerman 2023-06-13 01:35:36 UTC
Still an issue with Plasma Wayland under Debian Testing packaged:

Plasma 5.27.5
Frameworks 5.103.0
Qt 5.15.8
Mesa 22.3.6

Kernel 6.3.7 (Mainline + Debian Config)