Skip to content

daemon: feed the frame ring from publishes when no producer reports flow - #42

Merged
joshuatam merged 1 commit into
fix/fps-limiterfrom
fps-ring-publish-fallback
Nov 1, 2026
Merged

joshuatam merged 1 commit into
fix/fps-limiterfrom
fps-ring-publish-fallback

Conversation

@utkarshdalal

@utkarshdalal utkarshdalal commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #41.

Problem

#41 feeds the app's frame ring only from the shim's producer reports (note_produced), so a cap above the panel reads as what the session produced. A session whose frames never go through the ICD shim sends no reports at all: Xwayland GL titles (zink on the xlib winsys, which is every GL game in the container), GDI windows, software renderers. For those the publish path was the only frame count, and with it silent the HUD and the session telemetry read 0.0 fps while the game runs. Seen on the RP6 with SteamWorld Dig 2 on the #41 daemon: HUD 0.0, SurfaceFlinger presenting 42 to 60 fps.

Fix

  • LAST_PRODUCER_REPORT_MS is stamped by every producer report. The publish path counts a frame whenever no report arrived within the last second (PRODUCER_REPORT_GRACE_MS), and goes quiet as soon as reports flow. Shim sessions keep display: the mode is the display's rate, the cap is at acquire, and generation follows the multiplier #41's semantics exactly.
  • The first report of a connecting counter (previous == 0) no longer replays its whole backlog into the ring: those frames were counted by the publish path while no reports flowed, so replaying them was a one-off jump of up to MAX_PRODUCED_PER_MESSAGE.

Verification (RP6, payload 20261101.4 stack: gamescope#26, xserver#1+#2 Xwayland, #41 shim, this daemon)

The frame ring is fed from the shim's producer reports so a cap above the
panel reads as what the session produced. A session whose frames never go
through the ICD shim (Xwayland GL, GDI, software rendering) sends no
reports, so with the publish path silent its fps read 0.0 (SteamWorld Dig 2
under gamescope). Count publishes whenever no report arrived within the
last second; once reports flow the publish path goes quiet. The first
report of a connecting counter no longer replays its backlog, since those
frames were counted by the publish path already.
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.

2 participants