← 목록으로

xrdp-riscv64-bpi-f3-opensuse-tumbleweed

xrdp-riscv64-bpi-f3-opensuse-tumbleweed

xrdp 0.10.6 dynamic-resize and persistent-session interoperability patches for Banana Pi BPI-F3 (riscv64) on openSUSE Tumbleweed.

Keywords

Keywords: #opensuse #suse #tumbleweed #riscv64 #risc-v #bpif3 #bananapi #spacemitk1 #xrdp #rdp #rdpedisp #displaycontrol #sesman

Overview

This repository fixes RDP window resizing for clients which complete the DRDYNVC handshake but do not send DisplayControl monitor-layout updates to an xrdp/Xorg session. It also backports upstream session discovery so saved sessions survive an xrdp-sesman restart.

It provides the reviewed patch set and a pinned source build script. This is a source-only repository: no prebuilt binaries, packages, tags, or GitHub Releases are distributed.

Technical Design

The resize failure had three parts: fragmented DRDYNVC messages were not reassembled correctly, DisplayControl was opened before the Xorg backend resize queue existed, and the local sesman path did not send the logged-on notification expected by some modern clients.

xrdp 0.10.6 also keeps its session registry only in xrdp-sesman memory. Restarting the manager can orphan an existing Xorg desktop and create a second desktop for the same user. On LXQt, the duplicate login can leave pcmanfm-qt attached to the older display, which removes the expected wallpaper, desktop menu, and file-manager windows from the newer display.

The patch set therefore:

  1. Backports the upstream DRDYNVC multi-chunk reassembly fix.
  2. Advertises compiled-in graphics-pipeline support during RDP negotiation.
  3. Sends INFOTYPE_LOGON_PLAINNOTIFY without bulk compression after the display server attaches.
  4. Opens DisplayControl only when both DRDYNVC and the user session are ready.
  5. Preserves early EGFX initialization and prevents duplicate channel setup.
  6. Backports the complete upstream xrdp-sesman restart discovery series and its xrdp 0.10.6 API prerequisites from PR #3346.

Target Profile

  • Upstream version: xrdp 0.10.6
  • Upstream tag commit: 440a538149561ec8e8e57552ab8f2e0e3f273cd5
  • Board: Banana Pi BPI-F3 / SpacemiT K1
  • Architecture: riscv64
  • Operating system: openSUSE Tumbleweed
  • Backend: xorgxrdp

Included Files

  • build_xrdp_riscv64_bpi_f3_opensuse_tumbleweed.sh downloads the pinned upstream release, verifies its SHA-256 digest, applies all three patches, and stages the compiled result under a temporary DESTDIR without installing xrdp on the host.
  • patches/0001-fix-dynvc-multichunk.patch is the upstream DRDYNVC reassembly backport.
  • patches/0002-xrdp-defer-displaycontrol-until-session-attach.patch contains the session-attach and DisplayControl interoperability fix.
  • patches/0003-sesman-preserve-sessions-across-manager-restart.patch is the complete upstream xrdp-sesman restart discovery backport.

Build

The build result is staged under dist/ and does not overwrite RPM-managed xrdp files. By default, the script installs missing build dependencies with zypper; use --skip-deps when they are already present.

git clone https://github.com/itinfra7/xrdp-riscv64-bpi-f3-opensuse-tumbleweed.git
cd xrdp-riscv64-bpi-f3-opensuse-tumbleweed
sudo ./build_xrdp_riscv64_bpi_f3_opensuse_tumbleweed.sh

The output files are:

  • dist/xrdp-0.10.6-patched-riscv64-staged.tar.gz
  • dist/xrdp-0.10.6-patched-riscv64-staged.tar.gz.sha256

Install

Install the distribution packages first so configuration, xorgxrdp, PAM, systemd integration, and RDP audio remain package-managed:

sudo zypper install xrdp xorgxrdp pipewire-module-xrdp

Log out all xrdp desktops before the first patched installation. Verify the local build, stop xrdp, and overlay only the compiled program files; existing files under /etc/xrdp are not replaced.

cd dist
sha256sum -c xrdp-0.10.6-patched-riscv64-staged.tar.gz.sha256
sudo systemctl stop xrdp.service xrdp-sesman.service
sudo tar -xzf xrdp-0.10.6-patched-riscv64-staged.tar.gz -C / \
    ./usr/bin/ ./usr/sbin/ ./usr/lib64/xrdp/ ./usr/libexec/xrdp/
sudo ldconfig
sudo systemctl start xrdp-sesman.service xrdp.service

This overlay intentionally leaves RPM-managed configuration unchanged. A later xrdp package upgrade can replace the patched program files; rebuild and reinstall the patch set after such an upgrade.

Workflow

  1. Check the openSUSE Tumbleweed and riscv64 target.
  2. Retrieve xrdp 0.10.6 and verify its pinned SHA-256 digest.
  3. Verify and apply the three patches in order.
  4. Regenerate the Autotools build system for the added sesman sources.
  5. Build with stack protection, FORTIFY_SOURCE=3, PIE, RELRO, immediate binding, and LTO.
  6. Stage xrdp under a temporary DESTDIR without installing it into /usr or /etc.
  7. Produce a normalized staged archive under dist/ for local inspection or packaging.

Validation

  • All three patches apply cleanly to the xrdp 0.10.6 release source.
  • The patched source was built on openSUSE Tumbleweed for riscv64.
  • The staged ELF set was checked for PIE, RELRO, immediate binding, NX, stack protection, and fortified libc calls.
  • Live xorgxrdp sessions accepted client-window resize events without reconnecting.

Scope

This repository does not publish or replace host-specific xrdp.ini, sesman.ini, desktop selection, wallpaper, audio, authentication, firewall, or session-policy configuration. The restart backport preserves sessions created by the patched xrdp-sesexec; it cannot recover a session which was already orphaned by an older binary.

Credits

The xrdp project provides the upstream RDP server and protocol implementation. Denis Skvortsov authored the upstream DRDYNVC reassembly fix, and matt335672 authored the xrdp-sesman restart discovery series backported here.

itinfra7 is credited for the session-attach analysis, DisplayControl interoperability patch, riscv64 validation, and openSUSE source build workflow.

글을 불러오고 있습니다.