SteamOS icon indicating copy to clipboard operation
SteamOS copied to clipboard

Steam Frame: 2 ms rx_reorder_timeout causes stream loss from Linux hosts (rtw89 does not restrict retries)

Open genericJE opened this issue 1 month ago • 2 comments

Your system information

  • Steam client version: headset 1792099137 (Steam Frame, beta channel linux_arm64_beta); host 1779918128 (publicbeta, classic ubuntu12 client)
  • SteamOS version: Steam Frame OS 0.5.6, build 20261015.6141207, kernel 6.18.0-g83913f38113c, deckard-hw-support 20261009.1-1
  • Opted into Steam client beta?: Yes (headset), Yes (host)
  • Opted into SteamOS beta?: No
  • Have you checked for updates in Settings > System?: Yes

Host: Fedora 44, Zen kernel 7.2.11 (for rtw89 debugfs), RX 9070 / RADV, SteamVR 2.17.10 public, Steam Frame Wireless Adapter (28de:2432) on the in-tree rtw89_8852cu, fw 0.27.129.4, regdom DE, holo-realtek-firmware-toggles 1.4-1 installed from the SteamOS repo and confirmed used by Steam ("Successfully set low latency mode"). Adapter about 2 m from the play area, -50 to -55 dBm at the adapter, 6 GHz ch 37, 160 MHz.

Related: ValveSoftware/SteamVR-for-Linux#965 (vrlink reset storms on Linux hosts, where the adapter TX power finding and most of the Linux host data live) and ValveSoftware/SteamVR-for-Linux#946 (Linux host support). Filing here because the setting in question ships in the headset OS (deckard-hw-support), not in SteamVR. All scripts used below (capture, scorer, UDP link tests, the headset override unit, the adapter register tool) are at https://github.com/genericJE/steam-frame-stream-tools.

Please describe your issue in as much detail as possible:

Expected: streaming from a Linux PC over the Steam Frame Wireless Adapter is as stable as the radio link allows.

What happens: with a strong link (-50 dBm, 2 spatial streams, MCS 6-9) and the bitrate fixed at 100 Mbit/s, the game "BONEWORKS" shows 110 to 177 FEC retries and 3 to 5 abort episodes per minute in the headset's vrlink log, several decoder hard resets per session and visible cut-outs. Bitrate, GPU load, NetworkManager, dongle power save, scans and USB were ruled out over several sessions; iw station dump on the adapter shows 0 retries / 0 failed, but as others found in ValveSoftware/SteamVR-for-Linux#965 those counters are not implemented for this driver.

My hypothesis. The headset ships /usr/lib/modprobe.d/ath12k.conf (package deckard-hw-support) with rx_reorder_timeout=2,2,2,2, and the comment in that file says the 2 ms window is chosen because the dongle "has restricted retries severely in order to prioritize low-latency video streams". On a Linux desktop host the in-tree rtw89 driver does not restrict anything: reading the adapter's registers over debugfs (read_reg) gives the firmware defaults of 32 retries (R_AX_TXCNT 0xC62C) and a maximum A-MPDU air time of 5280 µs (R_AX_AMPDU_AGG_LIMIT 0xC610). So a frame that fails once is retried later than the headset is willing to wait; the headset acks it on air but has already moved its reorder window on, and vrlink sees a hole it has to FEC-retry or abort on. That would explain why the link looks clean from both ends' MAC counters while vrlink keeps losing data, and why the loss follows load rather than signal.

Evidence. All sessions BONEWORKS, same room, same adapter position, scored from the headset's journalctl -t vrlink (FEC "substantive retry" lines; "Aborting stream" lines closer than 1 s grouped into episodes). "Dongle tune" = the two rtw89 registers above written to 512 µs and 6 retries through debugfs write_reg. "Helper" = holo-realtek-firmware-toggles set-low-latency-mode on, invoked by Steam.

Headset reorder timeout Host side Bitrate (fixed) FEC retries / min Abort episodes / min Decoder hard resets Length
2 ms (stock) nothing 100 110 to 177 2.7 to 3.4 39 in 43 min two sessions
2 ms (stock) helper 100 115 5.4 7 5.7 min
2 ms (stock) helper + dongle tune 100 80 3.0 2 13 min
driver default (100/100/100/40 ms), override on the headset nothing 100 2.75 0.26 14 154 min
driver default (override) helper + dongle tune 100 0.60 0.05 0 19 min
driver default (override) helper + dongle tune 200 0.98 0.14 0 21 min

The override is options ath12k rx_reorder_timeout=0,0,0,0 in /etc/modprobe.d/ath12k.conf on the headset (0 = driver default), followed by a reboot; the value is only read when the radio starts. The 154 minute session was the first time the stream felt right from this PC. The last two rows are the best I've had so far: 12 FEC retries in 20 minutes at 100 Mbit/s. At 200 Mbit/s (233 Mbit/s on the host interface, close to the ~295 Mbit/s a UDP flood gets through this link) it stayed playable, with the rate control dropping to MCS 4 and the host socket to the adapter overflowing a few hundred times, so that row is the ceiling rather than a recommendation. The two measures look additive: the headset override alone gets most of the way, the dongle tune alone only about a third.

Further observations that fit the hypothesis:

  • The loss follows load, not signal. In the 2 ms session with the dongle tune, the FEC retry rate was about 5x higher while the stream carried ~145 Mbit/s than while it sat under 100 Mbit/s in menus, with RSSI flat at -50 to -53 dBm the whole time (correlation with bitrate 0.5, with signal 0.1).
  • Pacing removes it. A synthetic UDP burst test (host to headset, 1400 byte packets, 90 Hz bursts) showed the same loss pattern on a weaker day, and it disappeared when the packets inside each burst were paced below the air rate. On a stronger link the synthetic test no longer loses anything, only the real stream does.
  • The power asymmetry from ValveSoftware/SteamVR-for-Linux#965 is real here too, measured from the headset side: with a 150 Mbit/s test stream running, the headset's ath12k (htt_stats type 10) hears the adapter's data at -52 to -57 dBm and its ACKs at -56 to -66, per-chain RSSI swinging between -58 and -88 within seconds, while the host hears the headset at -53. The adapter's txpwr_table shows [reg6_pwr_type] 0, 7 dBm single chain / 4 dBm two chain, chip max 16 / 13. I have not tried the reg6_pwr_override patch from that thread yet. My reading is that the power class decides how often the first transmission fails and the reorder window decides what happens after that, so the two issues stack.
  • QoS marking does not reach the radio from this host. driver_vrlink.enableQoS was on in every session and vrlink logs the data link starting with the QoS option, but all 17.6 million packets the adapter sent today left on TID 0 (mac80211 per-TID counters). The comment in ath12k.conf says the vrlink packets are tagged VI on the dongle side; from a Linux host they are not, so the per-AC timeout values would not help here either.

Why I'm filing this rather than just keeping the override. Every headset OS update (2026-10-06, 2026-10-07 and 2026-10-15 builds) deletes /etc/modprobe.d/ath12k.conf along with the sshd enable and the sudoers drop-in, so the fix has to be re-applied and the headset rebooted a second time after each update. That is fine for me as a test rig, not as the way to use the product.

Caveats. Single sessions of 5 to 21 minutes per row, one PC, one headset, one game. The "packets per FEC retry" figure (p50 ~31 in every configuration) probably reflects FEC group granularity rather than how much was lost on air, so I can't say anything about hole sizes. None of this is backed by air captures.

Questions. Does the SteamOS or Windows host driver actually cap retries / aggregate length for the adapter, and if so could that live in holo-realtek-firmware-toggles so other hosts get the same behaviour? Alternatively, would a longer reorder window on the headset (even 10 to 20 ms, or per AC as the original comment in the file considered) be an acceptable trade-off when the peer is not a known-restricted dongle? I'm happy to run tests. The scripts (capture, scorer, UDP link tests, the headset override unit, the register tool) are at https://github.com/genericJE/steam-frame-stream-tools; the capture bundles (host telemetry at 1 Hz, SteamVR logs, headset vrlink journal) are available on request.

Steps for reproducing this issue:

  1. Linux host with the Steam Frame Wireless Adapter on the in-tree rtw89_8852cu driver, SteamVR with driver_vrlink.automaticBandwidth false and targetBandwidth 100, headset on its stock OS.
  2. Over SSH on the headset, confirm cat /sys/module/ath12k/parameters/rx_reorder_timeout prints 2,2,2,2.
  3. Play a demanding title (BONEWORKS here) for 10 minutes; count substantive retry and Aborting stream lines in journalctl -t vrlink on the headset. Expect on the order of 100 FEC retries per minute even at -50 dBm.
  4. Put options ath12k rx_reorder_timeout=0,0,0,0 in /etc/modprobe.d/ath12k.conf on the headset, reboot it, confirm the parameter now prints 0,0,0,0 (kernel log: rx reorder timeout BE=100 BK=100 VI=100 VO=40), repeat step 3. Expect the retries to drop by one to two orders of magnitude.
  5. Optional, host side on a kernel with CONFIG_RTW89_DEBUGFS: echo "0xC610 0x107f3f3f 4" > /sys/kernel/debug/ieee80211/phyN/rtw89/write_reg and echo "0xC62C 0x06060000 4" > .../write_reg (read the current values with read_reg first; the lower bytes of 0xC610 are other limits, and both revert on every re-association). This improved things a little at 2 ms and noticeably at the driver default.

genericJE avatar Oct 18 '26 07:10 genericJE

I think going from 2ms to the stock 100ms, if anything actually took that long, would be incredibly awful for streaming anything, so I guess most of the improvement would come from increasing to 3ms or 4ms while avoiding the worst case scenario...

Also, the 0.512 ms aggregate airtime cap is an interesting change, it won't have any impact at higher data rate transfers, because aggregation will hit the Linux 64 count cap before it hits this airtime cap. It will only have an impact at roughly 865 Mbit/s and below. And even then, I think a more direct fix is to reduce Linux's 64 count cap to the Windows override of 16. Although I don't think the airtime cap is hurting in that case, since at the 288 Mbit/s it's actually shorter than even 16. Maybe it's a better approach overall? The default 5ms cap is basically never going to get hit at 64Mbit/s.

It's interesting to see the transmission attempt count limit. The windows driver applies per-rate caps, and its firmware applies them. Oddly enough the Linux firmware (yeah, they are different, which on the surface is unsurprising except...) ignores the command to apply similar limits and the driver doesn't set them. I haven't tried reducing this to compensate.

Windows also sets a 3ms (actually 2.816ms) packet lifetime which is also missing on Linux (meaning there's no cap, and only other caps apply). So it makes me wonder if using a 3ms limit on the headset would help in that regard too... Although the headset's wifi only knows that something is missing once something arrives after it, so it's not exactly a 1:1 mapping.

EliteTK avatar Oct 18 '26 11:10 EliteTK

Independent confirmation on a different host, a different GPU vendor and a different game, plus a host-side way to measure it that needs no ssh to the headset.

Setup. Both arms are the same evening, same room, same adapter position, three hours apart; rx_reorder_timeout is the only thing changed between them.

  • Host: Linux Mint 22.3, kernel 7.0.0-42-generic, NVIDIA RTX 4080, driver 595.99.02
  • SteamVR build 26389675 (2.19.1 beta)
  • Headset: Steam Frame, SteamOS 0.5.6 build 20261022.6153909, kernel 6.18.0-g83913f38113c
  • Adapter: Steam Frame Wireless Adapter on rtw89_8852cu, fw 0.27.125.0, 6 GHz ch 37, 160 MHz
  • Power class reg6_pwr_type 0 (VLP), OFDM_2TX 4 dBm — same as yours
  • Low-latency helper not active in either session (EDCA c300 = 0x005ea42b both times), no dongle tune
  • Game: Half-Life: Alyx, native, buildid 26446291

Third-party patches here, unchanged across both arms. @EliteTK's SteamVR patcher on vrcompositor, vrserver and driver_vrlink.so, and three of the five patches from his patch-hlvr on Alyx: libscenesystem.so (instance allocator crash on barnacle splatter, #983), libnetworksystem.so (Snappy undefined behaviour, #405/#1023/#986) and librendersystemvulkan.so (staging buffer cleared all at once, causing stutter). So the absolute numbers are not stock, but nothing in this stack changed between the sessions.

Result. 94.6 min of play at 2,2,2,2 versus 83.5 min at the driver default (rx_reorder_timeout=0,0,0,0 in /etc/modprobe.d/ath12k.conf, then a reboot).

2 ms (stock) driver default
Reset video stream 236 (2.47/min) 1, during connection setup, two seconds before the game's first log line — 0 during play
reset bursts of >=10 8 0
retransmit request for unknown message 777 0
render target per eye 3476 3727
tx median 85.1 Mbit/s 98.1 Mbit/s
signal min / median -68 / -54..-59 dBm -69 / -57 dBm

At the "before" rate about 206 resets were due in the second session. None occurred during play, at a higher pixel count and 15% more throughput, with the same host GPU load (69% vs 58-72% median, encoder 23% in both).

Host-side frame telemetry. driver_vrlink.log carries a per-interval [ProblemAttribution] report, which makes this measurable from the PC alone. Summed over each session (510,899 frames before, 451,724 after), per 10,000 frames:

2 ms default
ClientRxLoss 6290.3 6.0 1041x lower
StreamReset + ClientResetRequest 7.5 0.0 gone
PreDecodeSlow + AudioClientDrop 56.3 0.0 gone
RetransmitRequested, all requests 1029.9 1656.9 +61%
RetransmitRequested, requests that cost a frame 104.4 41.8 -60%
NetworkSlow 347.6 408.5 +18%

Every player-visible outcome improved by 30 to 98%; the largest were NotDecoded (18.7 -> 0.3), NotDisplayed (54.6 -> 19.9) and NotEncoded (96.3 -> 31.5).

RetransmitRequested going up is the clearest confirmation of your hypothesis. The log line retransmit request for unknown message is a request for a frame the host has already moved past — the headset asked too late — and that went 777 -> 0. The counter RetransmitRequested counts all requests, and that went up 61% — while the requests that actually cost a frame went down 60%. 89.9% of requests were harmless before, 97.5% after. With a 100 ms window the headset waits for a late frame, asks in time, and gets it. With 2 ms it gave up, declared the data lost and reset the stream: hence ClientRxLoss 6290, StreamReset, ClientResetRequest and 236 resets.

Against the concern that a wider window adds latency: among the outcomes a retransmit request contributed to, DisplayedLate fell from 26.0 to 14.5 per 10,000 frames (-44%) and NotDisplayed from 40.8 to 10.6 (-74%). Waiting for a late frame is cheaper than resetting the stream. Only DegateSkipped rose, 1.8 to 1.9, the smallest of them. The +18% on NetworkSlow fits the same picture — the waiting is booked as delay instead of as loss.

Reproducing it from the host:

python3 - "$HOME/.steam/debian-installation/logs/driver_vrlink.txt" <<'PY'
import re, sys
from collections import Counter
raw = open(sys.argv[1], errors='replace').read()
n = sum(int(m) for m in re.findall(r'\[ProblemAttribution\] (\d+) frames', raw))
for label, pat in (('outcomes', r'\d+ frames, outcomes: (.*)'), ('causes', r'causes: (.*)')):
    c = Counter()
    for m in re.findall(r'\[ProblemAttribution\] ' + pat, raw):
        for k, v in re.findall(r'([A-Za-z]+) (\d+)', m): c[k] += int(v)
    print(f'{label} ({n} frames):')
    for k, v in c.most_common(): print(f'  {k:20s} {10000*v/n:8.1f} per 10k')
PY

Your dead-counter finding holds here too. iw station dump reported tx_retries 0 and tx_failed 0 across the whole 94.6 minute session, making the radio look blameless while ClientRxLoss sat at 6532 per 10,000 frames.

Caveats. n=1 per arm. The render resolution was not held constant (3476 vs 3727 px/eye) and throughput was 15% higher in the "after" session; both work against the conclusion rather than for it. The override is wiped by every headset OS update, as you noted.

Edited shortly after posting: the frame counts first given (491,990 / 436,867) left out intervals logged as no problems or with an empty outcomes: list. The session totals are 510,899 and 451,724; the per-10,000 rates above are corrected accordingly, about 3-4% lower in both arms, which leaves every comparison unchanged. The retransmit harm split was added.

MAC addresses, IP addresses, SSID, hostname, PIDs, serial numbers and username removed.

Seamot71 avatar Nov 06 '26 23:11 Seamot71