Simon Gardling c4c9dd7e50
All checks were successful
Build and Deploy / mreow (push) Successful in 1m6s
Build and Deploy / yarn (push) Successful in 1m7s
Build and Deploy / muffin (push) Successful in 1m6s
forza-trigger: patch dualsense-controller for vibration freq propagation
Live strace on yarn during gameplay revealed the daemon was correctly
calling effect.vibration(freq=35) on slip events, but the OUT report
on the wire showed mode=0x26 (VIBRATION) with byte 31 (param9 =
frequency) = 0. The controller firmware treats freq=0 as "no
oscillation" — trigger sits silent in vibration mode. That's why the
user reported "doesn't react to slipping or anything" even after the
pedal-off early-return fix.

Root cause is in dualsense-controller 0.3.1 itself:
  - WriteStates.__init__ registers individual write-states for trigger
    effect params 1-7 only. params 8/9/10 are not registered.
  - update_out_report copies from per-state values to the OutReport,
    again only params 1-7.
  - The OutReport dataclass DEFINES params 1-10 (with defaults of 0)
    and Usb01OutReport.to_bytes writes all 10 to the wire.
  - effect.vibration() puts frequency in param9 — silently dropped.
  - Same hits effect.machine() (params 8,9,10) and effect.galloping()
    (param10). effect.feedback/weapon/bow only use params 1-7 so
    they happen to work.

Fix is a small upstream-style patch added under patches/dualsense-
controller/ and wired into the dualsense-controller derivation in
hosts/yarn/forza-trigger/python-packages.nix via the patches attr:
in update_out_report, after the param7 assignments, read param8/9/10
directly from the parent TriggerEffect state value (which already
carries them correctly from the call site through _set_value).

Verified post-patch by source-reading the installed library:
  out_report.left_trigger_effect_param9 = self.left_trigger_effect.value.param9
  out_report.right_trigger_effect_param9 = self.right_trigger_effect.value.param9
  (and 4 more for left/right param8/10)

Build-sandbox tests (54/54) pass via the forza-trigger-tests build
gate; full yarn NixOS closure builds clean.

Filing upstream against yesbotics/dualsense-controller-python is the
follow-up; until then this is a local patch.
2026-05-07 14:38:12 -04:00
2026-05-04 20:33:27 -04:00
2026-05-05 12:40:11 -04:00
2026-05-05 12:40:11 -04:00
2026-05-06 10:32:58 -04:00
2026-05-04 14:46:41 -04:00
2026-05-03 00:35:48 -04:00
2026-04-22 07:28:56 -04:00
2026-05-06 18:53:36 -04:00
2026-04-25 22:24:36 -04:00
2026-04-23 20:23:37 -04:00

My NixOS configs

Hosts

  • mreow: My personal Framework 13 laptop
  • yarn: Machine I usually just play games on. Boots into SteamOS-like interface.
  • muffin: Homeserver, runs various services.

Desktop/Laptop

What do I use?

Browser: Firefox 🦊 (actually Zen Browser :p)

Text Editor: Doom Emacs

Terminal: ghostty

Shell: fish with the pure prompt

WM: niri

Background

  • Got my background from here and used the command magick input.png -filter Point -resize 2880x1920! output.png to upscale it bilinearly
Description
Unified NixOS flake for mreow, yarn, muffin
Readme 8 MiB
Languages
Nix 77.5%
Python 17.2%
Shell 3.5%
Emacs Lisp 1.8%