Skip to content

tf: experimental capture route for the game's own TrueForce (#74, #121) - #122

Closed
mescon wants to merge 2 commits into
masterfrom
tf/capture-route
Closed

mescon wants to merge 2 commits into
masterfrom
tf/capture-route

Conversation

@mescon

@mescon mescon commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Draft until it has been felt on hardware.

Why: under logi-launch, Logitech's library drives a direct-drive wheel through Proton's raw HID at 1 kHz, and the wheel answers each packet. Each packet crosses winedevice and the single-threaded wineserver. A Wine benchmark using uhid virtual devices puts that at roughly double wineserver's load: 7.2% to 15.1% of a core, compared with the reporter's 23.8%. The raw joystick path costs the same as the normal one, so it is not the cause.

What: a tfroute=capture games.conf key.

  • The launcher sets hidraw=0, texture=none, tfsim=1 and the game's relay, then writes a captured.<id> session marker.
  • It warns when the SDK proxy is missing from the prefix.
  • The SDK proxy copies the game's SetTorqueTF samples to logi-tf-sim, which streams them natively. The kernel merges its own force in, and nothing is synthesised.
  • The default route (sdk) is unchanged.

Tested:

  • Workspace: 1286 tests pass, clippy -D warnings is clean, shellcheck is clean.
  • A launcher dry run with a fake prefix produced the right plan, PROTON_ENABLE_HIDRAW=0, and a marker created and removed.

Still to test on hardware:

  • Does AC EVO keep calling SetTorqueTF when the library cannot open the wheel?
  • Does wineserver CPU drop?
  • How does it feel compared with the default route?

Logitech's library streams 1,000 packets a second through Proton's raw
HID, and the wheel answers each one; every packet crosses winedevice and
the single-threaded wineserver, which on some setups stalls AC EVO and
ACC (#74, #121). Measured in isolation: the raw joystick path costs the
same as the normal one, the library's write-and-echo stream is the load.

games.conf `tfroute=capture` keeps raw HID off so the library never
opens the wheel, and carries the game's own TrueForce through the SDK
proxy to logi-tf-sim instead, which streams it natively with the
driver's force merged in. A captured.<id> session marker tells the
daemon to synthesise nothing for that game, so the wheel gets the
game's haptics or silence. The launcher warns when the proxy is missing
from the prefix. Experimental until felt against the default route.
systemd-run --user resolves the command on the user manager's PATH, not
the session's, so a daemon earlier on the game's PATH was reported while
the installed one ran. Resolve the binary before handing it over.
@sonarqubecloud

Copy link
Copy Markdown

@mescon

mescon commented Sep 24, 2026

Copy link
Copy Markdown
Owner Author

Closing: hardware testing showed the premise fails twice over. AC EVO sends no SetTorqueTF samples (its texture on Windows comes from G HUB, fed by the Escape RPM), and it refuses the unsigned SDK proxy this route needs. The one sound fix from this branch (the launcher starting the logi-tf-sim it reports) moved to #123, with guards against the proxy in those games.

@mescon mescon closed this Sep 24, 2026
@mescon
mescon deleted the tf/capture-route branch September 24, 2026 15:04
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