** Description changed:
- Description:
+ 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.
+ 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.
- Steps to reproduce:
+ 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.
+ Expected result: KDE Plasma desktop appears after login.
- Actual result: Black screen. No desktop components (kwin, plasmashell)
+ Actual result: Black screen. No desktop components (kwin, plasmashell)
ever start.
---
- Root cause:
+ Note on configuration:
+ This was reproduced with a customised startwm.sh calling startplasma-x11
directly. The default xrdp package ships a startwm.sh that delegates to
/etc/X11/Xsession instead. The root cause — DISPLAY and XAUTHORITY not being
propagated to the systemd user session — is not specific to either path, and
the issue is expected to affect users on the default path as well. However,
this has not been independently verified on a pristine default install and
would benefit from confirmation by the maintainer.
- 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.
+ ---
+ Root cause:
- 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():
+ 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). When ksmserver requests kglobalaccel via
D-Bus, systemd starts it as a background service using its own environment —
which does
+ not include DISPLAY or XAUTHORITY, since xrdp never propagates these to the
systemd user session.
+
+ Without DISPLAY, kglobalaccel crashes immediately 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:
+ Confirmed with:
systemctl --user status plasma-kglobalaccel.service
- # Shows: Active: failed (Result: core-dump) ... signal=SEGV ... CPU: ~24ms
+ # Active: failed (Result: core-dump) ... signal=SEGV ... CPU: ~24ms
- And:
systemctl --user show-environment | grep DISPLAY
- # Shows: DISPLAY not set, or empty
+ # DISPLAY is empty or unset
- 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.
+ The crash triggers a 120-second D-Bus timeout during which ksmserver
+ hangs waiting for kglobalaccel. After the timeout, KDE is broken and the
+ session never 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.
+ All other KDE services are unaffected because they are launched as direct
child processes of ksmserver and inherit DISPLAY automatically. kglobalaccel is
unique
+ in going through the systemd activation path.
---
- Workaround:
+ Workaround:
- Edit /etc/xrdp/startwm.sh and replace the bottom section with the
- following:
+ Add the following to /etc/xrdp/startwm.sh before the /etc/X11/Xsession call
(or before startplasma-x11 if customised), and remove any unset XDG_RUNTIME_DIR
line
+ (it prevents startplasma-x11 from locating the D-Bus session socket):
- # Propagate xrdp session display info to systemd user services
+ # Propagate display info to systemd user services (required for
kglobalaccel)
systemctl --user set-environment DISPLAY=$DISPLAY
XAUTHORITY=$HOME/.Xauthority
- # Pre-start kglobalaccel before plasma to avoid D-Bus activation timeout
+ # Pre-start kglobalaccel 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)
+ # Clear stale D-Bus address — do NOT unset XDG_RUNTIME_DIR
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.
+ Proposed fix for the package maintainer:
+ Apply the above block to the startwm.sh shipped in the xrdp package for
Ubuntu 24.04, placing it before the exec /etc/X11/Xsession line. 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
+ Notes:
+ - Does not affect XFCE or GNOME sessions over xrdp
+ - The "black screen" symptom is shared with many unrelated xrdp issues,
which is why this root cause has not previously been reported
+ - Cross-reference to upstream xrdp report:
(https://github.com/neutrinolabs/xrdp/issues/3809)
--
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