Skip to content

fix: stop GRD restarts wedging RDP handover - #122

Merged
catinspace-au merged 1 commit into
mainfrom
fix/rdp-nice-needrestart-gpu
Oct 25, 2026
Merged

catinspace-au merged 1 commit into
mainfrom
fix/rdp-nice-needrestart-gpu

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

RDP handover on a desktop VM kept wedging until a reboot, and keys repeated under build load. Two causes, both in the rdp-server role.

  • needrestart restarted the system GRD after unattended-upgrades bumped a library it links, which orphans the live Remote Login session. Every converge restarted it too. GRD is now excluded from needrestart (Ubuntu) and only restarted at the end of a converge when no handover daemon is running.
  • The role counted virtio as hardware encode and removed the Nice=-10 drop-ins on virgl VMs, so GRD ran at nice 0 behind builds. Nice=-10 now goes on both units on every host, and key repeat delay is 800 ms.

Also in here:

  • hardware encode probed the way GRD uses it (VA-API H.264 plus a hardware Vulkan device, or NVENC) and reported. vaapi-check retired with a tombstone. The Intel VA driver install warns instead of failing when multiverse or RPM Fusion is missing
  • TLS opt-ins: a hardened self-signed cert (FQDN, P-384, 10 years) and a supplied cert and key. Every mode is checked as GRD's user before grdctl points at it, and fingerprints land in /etc/gnome-rdp/rdp-tls-fingerprint
  • opt-in polkit rule giving remote wayland/x11 sessions the console defaults. It asks logind for the session Type, so SSH (tty) never matches
  • an aborted converge no longer leaves apt-daily and unattended-upgrades off until reboot. A 4h transient timer restarts them and system_cleanup cancels it on a normal finish

Checked on the target VM after a reboot: both GRD daemons at NI -10, vaapi-check gone, needrestart line present, key delay 800, and port 3389 serving the hardened cert with a fingerprint matching the file. Under a 32-job release build (rustc at nice 19 in a CPUWeight 30 slice) GRD waited ~0 ms/s while hypervisor steal was low. Spikes to ~390 ms/s only came with 18-27% Proxmox steal, which is host-side and under the repeat delay.

NOT checked: an RDP disconnect and reconnect, typing under load by a person, the polkit rule loaded in polkit, the new pre_task actually running, and molecule. Those stay on #121, along with hyperi-infra's desktop_user rdp_tls.yml still pointing GRD at its own cert and restarting it.

Refs #121

unattended-upgrades bumped a library GRD links, needrestart restarted the system daemon, and the live Remote Login session was orphaned until reboot. Every converge restarted GRD too. GRD is now excluded from needrestart and only restarted at the end of a converge when no handover daemon is running.

Nice=-10 goes on both GRD units on every host. The role counted virtio as hardware encode and removed it on virgl VMs, so GRD ran at nice 0 behind builds and key-ups landed late. Key repeat delay is 800 ms. Hardware encode is now probed the way GRD uses it (VA-API H.264 plus a hardware Vulkan device, or NVENC) and reported, and vaapi-check is retired.

TLS gets two opt-ins: a hardened self-signed cert (FQDN, P-384, 10 years) and a supplied cert and key. Every mode checks the pair as GRD's user before grdctl points at it, and the fingerprints land in /etc/gnome-rdp/rdp-tls-fingerprint. An opt-in polkit rule gives remote wayland/x11 sessions the console defaults, never SSH.

A converge that aborts no longer leaves the apt-daily timers and unattended-upgrades off until reboot. A 4h transient timer restarts them, and system_cleanup cancels it on a normal finish.

Refs #121
@catinspace-au
catinspace-au merged commit 628794c into main Oct 25, 2026
18 checks passed
@catinspace-au
catinspace-au deleted the fix/rdp-nice-needrestart-gpu branch October 25, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant