From 475ff70a2a519a29ddbc08ec59588103f72d781c Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Tue, 18 Aug 2026 09:29:22 +0200 Subject: [PATCH] fix(pad): the virtual DualSense wore a placeholder USB serial no real pad has MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `UsbDevice::default` in the vendored server fills iSerialNumber with the string "Serial". A real DualSense reports none — this file's own doc comments assert that twice — and ALSA bakes the value into the card id, so the pad presented as `…DualSense_Wireless_Controller_Serial-00` where the hardware gives `…DualSense_Wireless_Controller-00`. PipeWire then carries the difference into every node name and into `device.serial`. Clearing it makes every name a matcher can key on byte-identical to a physical pad's. Scope, honestly: this is fidelity, not a fix for anything currently broken. It was written when the `_Serial` infix was a suspect for the dead haptics; it is not the cause. GE-Proton's winepulse leg has since been observed matching `alsa_output.usb-Sony_Interactive_Entertainment_DualSense_Wireless_Controller_Serial-00.Default__Speaker__sink` with the placeholder present, so nothing depends on this today. It removes a gratuitous difference from real hardware rather than fixing a symptom. Also NOT a fix for UCM profile selection, though that was my first reading: `alsa-ucm-conf` keys on `${CardComponents}` (`USB054c:0ce6`), so `DualSense-PS5.conf` matched with the placeholder still present. Which profile a card lands on is decided by verb priority, not by its name. The comment records that so it is not re-derived. Gated with `cargo clippy -p pf-inject --all-targets -- -D warnings` in `punktfunk-rust-ci:latest` (linux/amd64): exit 0. --- crates/pf-inject/src/inject/linux/dualsense_usbip.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/pf-inject/src/inject/linux/dualsense_usbip.rs b/crates/pf-inject/src/inject/linux/dualsense_usbip.rs index 78356ff5..560849b1 100644 --- a/crates/pf-inject/src/inject/linux/dualsense_usbip.rs +++ b/crates/pf-inject/src/inject/linux/dualsense_usbip.rs @@ -522,6 +522,17 @@ fn build_device( dev.configuration_max_power = 250; // 500 mA in 2 mA units dev.set_manufacturer_name("Sony Interactive Entertainment"); dev.set_product_name("DualSense Wireless Controller"); + // A real DualSense reports **no iSerialNumber**, but the vendored server's `UsbDevice::default` + // fills in the placeholder string "Serial" — which ALSA bakes into the card id and PipeWire into + // the node names: `…DualSense_Wireless_Controller_Serial-00` where the hardware gives + // `…DualSense_Wireless_Controller-00`. Clear it so every name a matcher can key on is + // byte-identical to a physical pad's. + // + // ⚠ This is fidelity, NOT a fix for UCM selection — measured on .41 2026-08-18, `alsa-ucm-conf` + // keys on `${CardComponents}` (`USB054c:0ce6`), so the DualSense UCM matched with the + // placeholder still present. Do not re-derive that: the profile a card lands on is chosen by + // verb priority, not by its name. + dev.unset_serial_number(); dev // Interface 0 — Audio Control (no endpoints). -- 2.54.0