Skip to content

Commit 9fe2c29

Browse files
author
Derek
committed
feat(rdp): add PipeWire frame rate optimization for software encoding
Reduce video capture frame rate from 25fps to 15fps via PipeWire config. This helps reduce CPU load when VA-API hardware encoding is unavailable (e.g., VirGL VMs where VirGL doesn't expose H.264 encoding). For dev workloads (VSCode, terminals, web browsing), 15fps is sufficient and reduces encoding overhead. Users can adjust to 20-25fps if scrolling feels choppy. Config deployed to /etc/pipewire/pipewire.conf.d/99-rdp-optimize.conf
1 parent 24f6021 commit 9fe2c29

1 file changed

Lines changed: 40 additions & 1 deletion

File tree

ansible/roles/dfe_rdp/tasks/dconf.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,48 @@
3030
- ansible_facts['distribution'] in ['Fedora', 'Ubuntu']
3131
- dfe_has_gnome
3232

33+
# ============================================================================
34+
# PIPEWIRE VIDEO FRAME RATE OPTIMIZATION
35+
# ============================================================================
36+
# Reduce video capture frame rate to lower CPU encoding load for software H.264
37+
# This helps when VA-API hardware encoding is not available (e.g., VirGL VMs)
38+
# Default PipeWire video rate is 25fps, we reduce to 15fps for dev workloads
39+
# (text editing, terminals, web browsing don't need high frame rates)
40+
41+
- name: Create PipeWire config directory
42+
ansible.builtin.file:
43+
path: /etc/pipewire/pipewire.conf.d
44+
state: directory
45+
mode: '0755'
46+
when:
47+
- ansible_facts['distribution'] in ['Fedora', 'Ubuntu']
48+
- dfe_has_gnome
49+
50+
- name: Deploy PipeWire RDP optimization config
51+
ansible.builtin.copy:
52+
dest: /etc/pipewire/pipewire.conf.d/99-rdp-optimize.conf
53+
mode: '0644'
54+
content: |
55+
# DFE RDP Optimization - Reduce video frame rate
56+
# Lower frame rate = less CPU encoding load for software H.264
57+
# Good for dev work (VSCode, terminals) - text doesn't need 60fps
58+
# Change default.video.rate.num to 20 or 25 if scrolling feels choppy
59+
context.properties = {
60+
default.video.rate.num = 15
61+
default.video.rate.denom = 1
62+
}
63+
register: pipewire_rdp_config
64+
when:
65+
- ansible_facts['distribution'] in ['Fedora', 'Ubuntu']
66+
- dfe_has_gnome
67+
3368
- name: Display dconf status
3469
ansible.builtin.debug:
35-
msg: "GNOME Remote Desktop configured via grdctl (system service mode) - animations disabled for RDP performance"
70+
msg: |
71+
GNOME Remote Desktop optimizations applied:
72+
- Animations disabled for RDP performance
73+
- PipeWire video rate reduced to 15fps (saves CPU on software H.264 encoding)
74+
- Reconnect RDP session for frame rate change to take effect
3675
when:
3776
- ansible_facts['distribution'] in ['Fedora', 'Ubuntu']
3877
- dfe_has_gnome

0 commit comments

Comments
 (0)