#1008602 debian-edu-config: Xfce/MATE in X2Go sessions very sluggish with Compositing enabled in xfwm

#1008602#5
Date:
2022-03-29 11:30:18 UTC
From:
To:
Package: debian-edu-config
Severity: normal
Version: 2.12.20

Currently, Xfce by default has compositing enabled for new user
profiles. This is basically ok.

However, if I try to connect to a combi-server via an X2Go thinclient,
the enabled compositing in xfwm makes the whole X2Go session very
sluggishly and virtually unusable.

A real fix for this could be provided in Xfce4 itself (see librda,
Remote Desktop Awareness library). Until that has landed in Xfce (I
might provide a patch for Xfce some time), we should consider
disabling compositing in Xfce4-

Same applies for the MATE desktop environment. Compositing should be
disabled by default, as well.

This makes the desktop environments look more simple, but they work
out-of-the-box then when accessed via X2Go thinclients.

This is probably very debatable... Maybe it needs to be covered by
documentation instead?

Mike

#1008602#10
Date:
2022-03-30 08:19:40 UTC
From:
To:
[ Mike Gabriel, 2022-03-29 ]
related settings submenu (so that users know how to toggle it depending
on their use case).

Maybe it could be added to the Desktop chapter:
https://wiki.debian.org/DebianEdu/Documentation/Bullseye/HowTo/Desktop

Wolfgang

#1008602#15
Date:
2022-10-26 21:29:18 UTC
From:
To:
Hello,
Here is possible workaroud for it:
https://bugzilla.redhat.com/show_bug.cgi?id=1954754#c2

To turn off globally (can be overridden by user), I created:
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml  with this added:

<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfwm4" version="1.0">
  <property name="general" type="empty">
    <property name="use_compositing" type="bool" value="false"/>
  </property>
</channel>

Best Regards,
Juri Grabowski

#1008602#20
Date:
2022-10-27 10:36:14 UTC
From:
To:
I tested this and it works for me.
But only for the users that make the first login after this configuration
is done. For the users that already made the first login, it seems like the
old settings have been cached somehow and this does not fix it.

However it should be possible to write a simple script that edits
`.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml` on each user account
and modifies this setting ("use_compositing").

#1008602#25
Date:
2022-10-27 12:41:48 UTC
From:
To:
Hi Dashamir,

We could fix this for Debian Edu by some hacky-wacky approach.

But the real fix would be: XFCE4 recognizes that it is running in an
NX-based X2Go session and disables compositing automatically.

For this, we have librda in Debian (RDA - Remote Desktop Awareness).

We use that for MATE desktop at some places, but we could certainly
send a patch to XFCE4 upstream and XFCE4 maintainers in Debian.

Actually, we need to do the same for marco (MATE's window manager).

@Dashamir: how are your C programming skills? Could you work on
patches for xfwm4 and marco? With some guidance?

Greets,
Mike

#1008602#30
Date:
2022-10-27 15:42:25 UTC
From:
To:
Is there no way for the NX-based X2Go to handle compositing properly?
I think this should be the real fix.

#1008602#35
Date:
2022-10-27 15:54:22 UTC
From:
To:
Hi,

Nope. That is a won't fix. Compositing decreases performance by many
(milli)seconds (latency) per round trip. Compositing is for local
hardware, not for remote connections.

Another "fix" would be using the next generation X2Go backend X2Go
KDrive. But that's not in Debian, yet. But also with KDrive (where
Compositing works), it would be advisable to disable it for
performance sake.

Mike

#1008602#40
Date:
2022-10-27 16:04:41 UTC
From:
To:
Maybe you are right. I am not an expert on these issues (I don't even know
what "compositing" is).
It just seems to me that RDP is doing fine with it (at least I don't notice
any issues), but maybe it is a wrong perception.

#1008602#45
Date:
2022-10-27 16:22:57 UTC
From:
To:
Hi,

in another project I am currently working on an Enterprise Desktop
based on MATE and we test stuff via xRDP and see so so so many
graphical glitches (rectangles not filled with the window color, but
desktop background shining through, etc.).

So, I am not so convinced about xRDP (at least on openSUSE 15.4 and in
combination with MATE desktop's window manager).

Greets,
Mike

#1008602#50
Date:
2023-05-13 13:40:15 UTC
From:
To:
Hello together,
on existing setups you can use following Xsession script, if
x2goserver-xsession is installed:

cat <<'EOF'>/etc/x2go/Xsession.d/57xfce4-session_bug_1008602_workaround
BASESTARTUP=$(basename "$STARTUP" | cut -d\  -f1)
if [ "$BASESTARTUP" = x-session-manager ]; then
    BASESTARTUP=$(basename $(readlink /etc/alternatives/x-session-manager))
fi
case "$BASESTARTUP" in
  xfce4-session|startxfce4)
	/usr/bin/xfconf-query -c xfwm4 -p /general/use_compositing -s false
    ;;
esac
EOF

But, like Mike wrote it's just a workaround, the prefferable solution is
to patch xfwm4 to use librda, because so users can use compositing if
it's possible.

Best Regards,
Juri Grabowski

#1008602#55
Date:
2023-09-06 11:35:41 UTC
From:
To:
Hi,

for MATE this is now fixed in bookworm/testing/unstable (bookworm with
upcoming point release).

See
https://salsa.debian.org/debian-mate-team/marco/-/commit/0f6ecbf7ad89cac1d76f0225b7aa75f125e2101c

For Xfce4, there is an upstream patch, that needs to be included in
Debian's xfwm.
https://gitlab.xfce.org/xfce/xfwm4/-/merge_requests/134

Mike