Files
ultix/12-fix-rdp-bigres.sh
T
mrcharles ed367ca0e5 RDP big-monitor fix + HUD: EGFX frame budget for 5160x2160 (#611)
Jump-from-iPad showed color bars/cut sides at the big external monitor.
Headless freerdp UAT proved the server clean at 5160x2160 on all codecs
and mid-session resize; mitigation raises the EGFX compressed-frame
budget via systemd drop-in, applied by 12-fix-rdp-bigres.sh (idempotent,
restart-guarded). Human UAT pending.

Detail: https://projects.knownelement.com/issues/611#note-3341
2026-09-01 12:17:28 -05:00

36 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# 12-fix-rdp-bigres.sh — xrdp EGFX big-resolution fix (Redmine #611)
#
# Symptom: Jump Desktop from iPad -> big external monitor (5160x2160)
# showed color bars / cut sides. Root cause candidate: default EGFX
# compressed-frame budget truncates large frames at this width.
# freerdp UAT at 5160x2160 (all codecs + mid-session resize) is clean;
# this mitigation raises the budget for the Jump client path.
#
# Idempotent: run as root on ultix-streaming.
set -euo pipefail
DROPIN=/etc/systemd/system/xrdp.service.d/bigres.conf
mkdir -p "$(dirname "$DROPIN")"
cat > "$DROPIN" <<'EOF'
[Service]
Environment=XRDP_GFX_MAX_COMPRESSED_BYTES=33554432
Environment=XRDP_GFX_FRAMES_IN_FLIGHT=2
EOF
systemctl daemon-reload
# bounce only when nobody is connected: check for active RDP sessions first
ACTIVE=$(pgrep -c -f 'Xorg.*xrdp/xorg.conf' || true)
if [ "${ACTIVE:-0}" -gt 0 ]; then
echo "Active RDP X sessions: $ACTIVE — NOT restarting; apply at next bounce with:"
echo " systemctl restart xrdp-sesman xrdp"
else
systemctl restart xrdp-sesman xrdp
sleep 2
systemctl is-active xrdp xrdp-sesman
fi
grep -q XRDP_GFX_MAX_COMPRESSED_BYTES "$DROPIN" && echo "drop-in present: $DROPIN"