Discussion:
[kwin] [Bug 391778] New: FreeRDP second Full-Screen Monitor is hidden
(too old to reply)
Robert Cheramy
2018-03-12 20:22:01 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

Bug ID: 391778
Summary: FreeRDP second Full-Screen Monitor is hidden
Product: kwin
Version: 5.12.1
Platform: Debian testing
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: multihead
Assignee: kwin-bugs-***@kde.org
Reporter: ***@cheramy.net
Target Milestone: ---

When using freerdp in multiple monitor mode (Full Screen), the second monitor
is not displayed under KDE. This works with other Window Managers (fvwm,
openbox, gnome, cinnamon).
A bug is filled on the FreeRDP side:
https://github.com/FreeRDP/FreeRDP/issues/2707

It would be great if KWin Developers and FreeRDP Developers could talk together
about the issue and find a fix for it :-)
--
You are receiving this mail because:
You are watching all bug changes.
b***@kde.org
2018-03-12 20:24:28 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

***@gmail.com changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com

--- Comment #1 from ***@gmail.com ---
I'm also experiencing this issue.
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-12 20:44:09 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

Martin Flöser <***@kde.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED

--- Comment #2 from Martin Flöser <***@kde.org> ---
I read through the complete bug report on github and don't see anything
indicating that this is a bug in KWin. What we see in the bug report is FreeRDP
having problems with fullscreen and with many, many window managers. In fact
there are workarounds command line switches like "openbox". This is for me a
sign that the issue must be with FreeRDP. Especially given that standard X11
functionality like checking in _NET_SUPPORTED what the WM provides has not been
implemented.

From time to time it happens that bugs are reported that KWin is wrong. Every
time when we investigated this, we observed, that:
a) the client is wrong
b) if other window managers made the client work, it was KWin implementing the
specs correctly

I'm sorry, but my experience tells me, that this is not a bug in KWin. If it
were a bug in KWin, there would be other applications affected as well.

So until someone proves me that KWin is wrong, by e.g. providing a test case
which highlights the wrong behavior, I'm following my instincts and set this
bug as invalid.

Unfortunately I'm not able to try to reproduce to show that FreeRDP is wrong as
I don't have any server to connect to.
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-12 20:44:21 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

Martin Flöser <***@kde.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Component|multihead |xrandr
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-12 20:54:27 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #3 from Martin Flöser <***@kde.org> ---
Furthermore I want to add that relying on the _NET_WM_FULLSCREEN_MONITORS is
quite questionable. To quote the spec: "The indices are from the set returned
by the Xinerama extension."

Now there is just no xinerama extension used anymore. Today we use xrandr to
configure multiple screens. I have no idea what these indices are that FreeRDP
uses, but KWin (and probably any other window manager) doesn't know anything of
Xinerama. KWin does have support for this protocol, but that's probably just
for legacy support.
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-12 21:03:19 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

Martin Flöser <***@kde.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://github.com/FreeRDP/
| |FreeRDP/issues/2707
--
You are receiving this mail because:
You are watching all bug changes.
Robert Cheramy
2018-03-12 22:13:28 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #4 from Robert Cheramy <***@cheramy.net> ---
Thank you for taking your time to evaluate the Bug.

I've tried to look into the source code of FreeRDP, but I have no idea of X11
Programming an gave up in the end. I'll have to wait until FreeRDP Developers
fix this.
--
You are receiving this mail because:
You are watching all bug changes.
b***@kde.org
2018-03-13 09:00:24 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

***@thincast.com changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@thincast.com

--- Comment #5 from ***@thincast.com ---
There seem to be some misunderstandings in this issue.
I'm a developer of FreeRDP, so let me clear up some things:
* The 'openbox' switch is not really part of freerdp but was suggested by a
contributor in that thread.
This was due to another bug we had in FreeRDP with fullscreen switching, when
we migrated to _NET_SUPPORTED et al. That one has already been dealt with.

* There still is the `/multimon:force` switch, which forces old X11 behaviour
for a WM with broken support for the new standards. (this software is used on
many custom distris, some have really weired configurations)

* We do support _NET_SUPPORTED, as already stated. The other paths are a
fallback if the WM does not support these.

* Testing this with xfreerdp is quite easy, you only need to install `xrdp`
locally and connect to it with `xfreerdp /v:localhost /multimon`
(<ctrl>+<alt>+<Return> switches between fullscreen and window mode)

Maybe I'm missing something here, but I've tested the current 2.0 release
candidates and master against debian and fedora with cinnamon, openbox, xfce,
gnome and kde/plasma.
Only kde/plasma exposes these issues.
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-13 18:14:18 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #6 from Martin Flöser <***@kde.org> ---
I'm not going to test, sorry. I don't have the time to get this setup as I lack
the FreeRDP domain knowledge.

What I would be interested in, is:
* screenshot of the issue
* xprop and xwininfo of the window
* output of qdbus org.kde.KWin /KWin supportInformation
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-13 18:43:44 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #7 from Martin Flöser <***@kde.org> ---
@armin: do you really use _NET_WM_FULLSCREEN_MONITORS? If yes, I would like to
ask how you think that is supposed to work given that no X server uses xinerama
any more. It's till exposed, but in truth it's xrandr. I assume the problem
here is that the indices don't match and that it might be pure chance in the
other DEs to work.
--
You are receiving this mail because:
You are watching all bug changes.
b***@kde.org
2018-03-14 08:42:57 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #8 from ***@thincast.com ---
(In reply to Martin Flöser from comment #7)
Post by Martin Flöser
@armin: do you really use _NET_WM_FULLSCREEN_MONITORS? If yes, I would like
to ask how you think that is supposed to work given that no X server uses
xinerama any more. It's till exposed, but in truth it's xrandr. I assume the
problem here is that the indices don't match and that it might be pure
chance in the other DEs to work.
Yes, we use that for the multimonitor fullscreen case.
I (or more precisely a colleague) have not found another way to tell the WM to
a) set a window fullscreen and
b) which monitors to use for that

I understand that from a WM perspective multi monitor handling is done with the
randr extension and xinerama, but I could not find anything replacing this
atom.

I'd be more than happy to fix that in a more modern way, but the depths of X11
still have surprises whenever touched. (as I do that not really often)
--
You are receiving this mail because:
You are watching all bug changes.
b***@kde.org
2018-03-14 09:16:58 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #9 from ***@thincast.com ---
Created attachment 111393
--> https://bugs.kde.org/attachment.cgi?id=111393&action=edit
xprop, xwininfo, qdbus output and screenshot

Attached the desired information.
The screenshot shows that the window is fullscreen only on the first (left) of
a 2 monitor setup.
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-14 18:31:49 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #10 from Martin Flöser <***@kde.org> ---
(In reply to armin.novak from comment #8)
Post by b***@kde.org
I'd be more than happy to fix that in a more modern way, but the depths of
X11 still have surprises whenever touched. (as I do that not really often)
I would create a dedicated window for each screen.
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-14 18:47:48 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #11 from Martin Flöser <***@kde.org> ---
What I noticed is that the xprop output is lacking the fullscreen monitor
property.

This should create a debug message:
"fullscreenMonitors update failed. request higher than number of screens."

Could someone please enable the Debug category for KWin and check
xsession-errors for this message?
--
You are receiving this mail because:
You are watching all bug changes.
Robert Cheramy
2018-03-16 21:09:37 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #12 from Robert Cheramy <***@cheramy.net> ---
Created attachment 111453
--> https://bugs.kde.org/attachment.cgi?id=111453&action=edit
Output of kwin debug messages

Here is the Output of KWIN with Debug activated (I activated everything using
kdebugsettings) when starting freerdp in fullscreen mode. I also checked
.xsessions-error (which is empty as I started kwin --replace from the console.
There are no other messages generated ther when I start freerdp), and did not
find the error "fullscreenMonitors update failed. request higher than number of
screens.".
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-17 05:20:17 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #13 from Martin Flöser <***@kde.org> ---
Thanks for the debug output.
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-17 10:41:39 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #14 from Martin Flöser <***@kde.org> ---
The combination of the xprop and the debug output would mean that KWin is not
getting the callback from our windowing system library. I checked on
build.kde.org and the code area is not test covered. I'll try to add a test
case.
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-17 11:00:39 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #15 from Martin Flöser <***@kde.org> ---
I found a bug explaining why the property is not set, but it would not explain
why the window is not shown correctly
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-17 11:03:19 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #16 from Martin Flöser <***@kde.org> ---
(In reply to Martin Flöser from comment #15)
Post by Martin Flöser
I found a bug explaining why the property is not set, but it would not
explain why the window is not shown correctly
-> BUG #391960
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-18 08:10:01 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #17 from Martin Flöser <***@kde.org> ---
Could someone please run:
xev -root

then start freerdp and bring it into the broken state and attach the output of
xev? This should show which events are sent from freerdp, maybe that helps to
see what's going on.
--
You are receiving this mail because:
You are watching all bug changes.
Robert Cheramy
2018-03-18 09:13:17 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #18 from Robert Cheramy <***@cheramy.net> ---
Created attachment 111472
--> https://bugs.kde.org/attachment.cgi?id=111472&action=edit
Output of xev -root when Runing freerdp in Fullscreen mode with multiple
Monitors

Hope this helps.
--
You are receiving this mail because:
You are watching all bug changes.
Martin Flöser
2018-03-18 10:42:10 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778
Post by Robert Cheramy
Hope this helps.
Yes it does, now I understand the problem.

FreeRDP first sends the _NET_WM_FULLSCREEN_MONITORS and afterwards the change
to fullscreen. Due to BUG #391960 this is not applied when FreeRDP switches to
fullscreen. If the command process would be the other way around, I'm quite
certain it would work. But I'm also quite confident that my fix to BUG #391960
will fix the problem.
--
You are receiving this mail because:
You are watching all bug changes.
b***@kde.org
2018-03-19 10:53:47 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #20 from ***@thincast.com ---
You're correct, setting fullscreen first and the monitors afterward is working
with kwin too.

(In reply to Martin Flöser from comment #19)
Post by Martin Flöser
Post by Robert Cheramy
Hope this helps.
Yes it does, now I understand the problem.
FreeRDP first sends the _NET_WM_FULLSCREEN_MONITORS and afterwards the
change to fullscreen. Due to BUG #391960 this is not applied when FreeRDP
switches to fullscreen. If the command process would be the other way
around, I'm quite certain it would work. But I'm also quite confident that
my fix to BUG #391960 will fix the problem.
--
You are receiving this mail because:
You are watching all bug changes.
Robert Cheramy
2018-03-21 20:14:45 UTC
Permalink
Raw Message
https://bugs.kde.org/show_bug.cgi?id=391778

--- Comment #21 from Robert Cheramy <***@cheramy.net> ---
Thank you very much Martin for your help!
--
You are receiving this mail because:
You are watching all bug changes.
Loading...