Public bug reported:
Description:
On Ubuntu 24.04 LTS with KDE Plasma, connecting via RDP produces a permanent
black screen. The RDP login screen works but no desktop ever appears. This
affects
any user running KDE Plasma over xrdp with a fresh session.
Steps to reproduce:
1. Install Ubuntu 24.04 LTS with KDE Plasma desktop
2. Install xrdp (sudo apt install xrdp)
3. Connect via any RDP client
4. Log in successfully
5. Observe: black screen, no desktop
Expected result: KDE Plasma desktop appears after login.
Actual result: Black screen. No desktop components (kwin, plasmashell)
ever start.
---
Root cause:
On Ubuntu 24.04, KDE has migrated kglobalaccel (the global keyboard shortcuts
service) from a directly-launched process to a systemd-activated D-Bus service
(plasma-kglobalaccel.service). This means when ksmserver requests
kglobalaccel, it goes via D-Bus → systemd rather than being spawned directly.
The xrdp session startup script (/etc/xrdp/startwm.sh) has access to DISPLAY
and XAUTHORITY when it runs, but these are never propagated to the systemd user
session environment. As a result, when systemd starts
plasma-kglobalaccel.service, the service has no DISPLAY and immediately crashes
with SIGSEGV in
QXcbIntegration::initialize():
#0 QXcbIntegration::initialize() — libQt5XcbQpa.so.5
#1 QGuiApplicationPrivate::eventDispatcherReady()
#2 QCoreApplicationPrivate::init()
#3 QGuiApplicationPrivate::init()
#4 QGuiApplication::QGuiApplication()
This can be confirmed with:
systemctl --user status plasma-kglobalaccel.service
# Shows: Active: failed (Result: core-dump) ... signal=SEGV ... CPU: ~24ms
And:
systemctl --user show-environment | grep DISPLAY
# Shows: DISPLAY not set, or empty
The crash triggers a 120-second D-Bus activation timeout, during which
ksmserver hangs waiting for kglobalaccel to claim its bus name. After the
timeout, KDE is
in a broken state and no desktop renders.
A secondary issue exists in the current startwm.sh: the line unset
XDG_RUNTIME_DIR prevents startplasma-x11 from locating the D-Bus session
socket, causing it to
block indefinitely in poll() — confirmed via cat /proc/<pid>/wchan.
Note: other KDE services are unaffected because they are spawned as direct
child processes of ksmserver and inherit DISPLAY automatically. kglobalaccel is
unique
in going through the systemd activation path.
---
Workaround:
Edit /etc/xrdp/startwm.sh and replace the bottom section with the
following:
# Propagate xrdp session display info to systemd user services
systemctl --user set-environment DISPLAY=$DISPLAY XAUTHORITY=$HOME/.Xauthority
# Pre-start kglobalaccel before plasma to avoid D-Bus activation timeout
systemctl --user reset-failed plasma-kglobalaccel.service 2>/dev/null || true
systemctl --user start plasma-kglobalaccel.service
sleep 1
# Clear stale D-Bus address — do NOT unset XDG_RUNTIME_DIR (needed by
startplasma-x11)
unset DBUS_SESSION_BUS_ADDRESS
startplasma-x11
Proposed fix for the package maintainer:
Apply the above change to the startwm.sh shipped in the xrdp package for
Ubuntu 24.04. This is a small, targeted fix that does not require upgrading to
a newer
upstream xrdp version and would resolve the issue for all Ubuntu 24.04 users
running KDE Plasma over xrdp.
---
Package versions:
- xrdp: 0.9.24-4
- libkf5globalaccel-bin: 5.115.0-0ubuntu5
- Ubuntu: 24.04.4 LTS (Noble Numbat)
- KDE Plasma: 5.27.11
---
Notes for triaging:
- This issue does not affect XFCE or GNOME over xrdp, as those desktop
environments do not use systemd-activated D-Bus services in the same way during
session
startup
** Affects: xrdp (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2154770
Title:
Summary: xrdp + KDE Plasma on Ubuntu 24.04: black screen on login
due to DISPLAY not propagated to systemd user environment
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xrdp/+bug/2154770/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs