https://bugs.kde.org/show_bug.cgi?id=527555

            Bug ID: 527555
           Summary: RemoteAccess mode: some connections never get a
                    picture because the portal session never starts
    Classification: Plasma
           Product: KRdp
      Version First 6.8.0
       Reported In:
          Platform: Other
                OS: Other
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

Created attachment 197477
  --> https://bugs.kde.org/attachment.cgi?id=197477&action=edit
journal of one failing connection

With krdpserver in RemoteAccess mode (portal path, no --plasma), about one
connection in six never gets a picture. The client authenticates and stays
connected, but no frame is ever sent. Disconnecting and connecting again works.

In every failing connection the log shows "Initializing Freedesktop Portal
Session" and "Switched to greeter successfully", but never "Started Freedesktop
Portal session". In working connections that line follows 300-400 ms later and
the PipeWire stream starts.

Switching the seat to the greeter makes the user session's KWin lose DRM access
("Failed to find a working output layer configuration: EACCESS"), and every
client then logs "There are no outputs - creating placeholder screen",
xdg-desktop-portal-kde included. In working connections that happens within a
few ms of "Switched to greeter". In the failing one it came about 200 ms later,
while the portal request was already in flight, and the portal session never
started.

My guess (not verified in the code): krdpserver asks for SwitchToGreeter before
its portal session has started. If the outputs go away at the wrong moment, the
portal request never completes. Starting the portal session, or at least the
virtual monitor stream, before switching to the greeter might avoid it.

"Tried to make uncreated stream active" (KPipeWire) is logged on every
connection, including working ones, so it doesn't seem to be the cause.

STEPS TO REPRODUCE
1. Plasma Login Manager with autologin (Relogin=false), Plasma Wayland session.
2. krdpserver --mode RemoteAccess --certificate ... --certificate-key ...
(KRDP_DISABLE_H264=1, PAM users), portal remote-desktop permission granted for
org.kde.krdpserver.
3. Connect with FreeRDP (xfreerdp3 /size:1600x900), wait 20 s, disconnect.
Before the next try, hand the seat back to the user session (loginctl activate
+ unlock-session; without it the session stays locked on the greeter).
4. Repeat. 4 of 23 connections got no picture; the first connection after a
pause failed more often.

OBSERVED RESULT
Client connected, no picture; krdpserver never logs "Started Freedesktop Portal
session".

EXPECTED RESULT
Every connection gets the desktop on the virtual monitor.

SOFTWARE/OS VERSIONS
Arch Linux ARM (aarch64), Raspberry Pi 5, headless (HDMI-A-1 forced on with
video=...D)
KDE Plasma 6.8.0, KWin 6.8.0, KRdp 6.8.0, KPipeWire 6.8.0
xdg-desktop-portal 1.22.1, xdg-desktop-portal-kde 6.8.0, plasma-login-manager
6.8.0
PipeWire 1.6.9, FreeRDP 3.32.2 (server), client FreeRDP 3.15 (Linux) and Royal
TSX (macOS)
Kernel 6.18.57 (linux-rpi)

ADDITIONAL INFORMATION
Attached: journal of one failing connection (21:00:17) followed by a working
one (21:01:00), with
QT_LOGGING_RULES=org.kde.krdp*.debug=true;kpipewire*.debug=true.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to