host: hid-steam claims the virtual Steam Controller 2 #1368

Open
opened 2026-09-22 03:03:44 +00:00 by luxus · 1 comment
Member

Symptom

A Steam Controller 2 captured on a client (Shield, USB or Puck) shows up in Steam and passes Steam's own controller test: buttons, sticks, trackpads, gyro, haptics. In a game the same pad is only partly usable, and the buttons that do fire do not match a controller plugged into the host.

What is not the cause

  • The transport works. Steam's tester reads the virtual pad's hidraw and sees every control.
  • The Puck is not required. A wired 28DE:1302 session on the same host does the same thing.
  • A missing Steam layout is not sufficient. Applying the layout that works on the real pad does not make the game match.

Cause

hid-steam on current kernels (observed: 7.3, module aliases 28DE:1302, 1304, 1305) binds the virtual pad and publishes its own evdev gamepad (steam_ibex_* maps). Steam Input keeps the hidraw node, which is why the tester is fine. The game also sees the kernel gamepad, so some buttons come from hid-steam and the rest do not follow the Steam Input layout.

That contradicts the host's assumption, still written on the udev rule and in steam_controller2: mainline hid-steam stopped at the Deck, so the virtual SC2 was hid-generic and Steam was the only consumer. A real Puck or wired pad on the machine is the same driver, but Steam's client-open path mutes it. The virtual pad answers feature GETs from canned state, so that handshake does not mute the kernel node.

Direct play therefore has one consumer. The stream has two.

Fix

On the virtual device only (vhci_hcd, and the uhid fallback whose phys is punktfunk/triton/*), force hid-generic before hid-steam binds. Leave a real controller on hid-steam.

Out of scope: the virtual pad still reports a canned serial (FVPF1302…), so Steam will not pick the real pad's saved layout by itself. That is a separate change.

## Symptom A Steam Controller 2 captured on a client (Shield, USB or Puck) shows up in Steam and passes Steam's own controller test: buttons, sticks, trackpads, gyro, haptics. In a game the same pad is only partly usable, and the buttons that do fire do not match a controller plugged into the host. ## What is not the cause - The transport works. Steam's tester reads the virtual pad's hidraw and sees every control. - The Puck is not required. A wired `28DE:1302` session on the same host does the same thing. - A missing Steam layout is not sufficient. Applying the layout that works on the real pad does not make the game match. ## Cause `hid-steam` on current kernels (observed: 7.3, module aliases `28DE:1302`, `1304`, `1305`) binds the virtual pad and publishes its own evdev gamepad (`steam_ibex_*` maps). Steam Input keeps the hidraw node, which is why the tester is fine. The game also sees the kernel gamepad, so some buttons come from `hid-steam` and the rest do not follow the Steam Input layout. That contradicts the host's assumption, still written on the udev rule and in `steam_controller2`: mainline `hid-steam` stopped at the Deck, so the virtual SC2 was `hid-generic` and Steam was the only consumer. A real Puck or wired pad on the machine is the same driver, but Steam's client-open path mutes it. The virtual pad answers feature GETs from canned state, so that handshake does not mute the kernel node. Direct play therefore has one consumer. The stream has two. ## Fix On the virtual device only (`vhci_hcd`, and the uhid fallback whose phys is `punktfunk/triton/*`), force `hid-generic` before `hid-steam` binds. Leave a real controller on `hid-steam`. Out of scope: the virtual pad still reports a canned serial (`FVPF1302…`), so Steam will not pick the real pad's saved layout by itself. That is a separate change.
Owner

Thanks for the captures on #1369. Read against our tree and hid-steam on master, they rule two things out.

  • Lizard mode. Steam's writes reach the pad: every client replays them on the controller and turns lizard mode off itself every 3 s. Your tester shows gyro, and the pad streams gyro only after Steam's IMU write lands.
  • hid-steam. Its keyboard/mouse node comes from the pad's own report descriptor and stays for a cable and for a stream. It moves only when the pad sends report 0x40.

What's left is how the virtual pad answers Steam's queries. Every feature query is answered from a fixed table, never by the pad. Two answers look off: attribute 0x0A (bootloader build time in SDL's list) carries a slot id, and capabilities (0x02) is 0. The firmware build time is fixed too, and an older fake date once made Steam treat the pad as needing an update. #1375's serial alone probably doesn't fix this: the game gets no Steam Input actions at all, not the wrong layout.

Could you capture these on lea?

  1. The real pad on lea's USB while the Shield streams Deadlock, with the pad not connected to the Shield. Does it play? That separates the session from the virtual pad.
  2. During a stream with Deadlock in front: sudo evtest /dev/input/event18 while you touch the left pad, and adb logcat -d -s Sc2Capture | grep 'report id'. That separates the pad's own mouse mode from a Steam layout.
  3. ~/.steam/steam/logs/controller.txt from a cable run and a stream run, each from a fresh Steam start to Deadlock in front.
  4. usbmon captures of the same two runs (sudo modprobe usbmon, then sudo tshark -i usbmonN -w …), with the host at RUST_LOG=info,pf_inject=debug. Any query the cable answers differently from our table is the candidate.
  5. A stream with #1375 on both ends.
Thanks for the captures on #1369. Read against our tree and hid-steam on master, they rule two things out. - **Lizard mode.** Steam's writes reach the pad: every client replays them on the controller and turns lizard mode off itself every 3 s. Your tester shows gyro, and the pad streams gyro only after Steam's IMU write lands. - **hid-steam.** Its keyboard/mouse node comes from the pad's own report descriptor and stays for a cable and for a stream. It moves only when the pad sends report `0x40`. What's left is how the virtual pad answers Steam's queries. Every feature query is answered from a fixed table, never by the pad. Two answers look off: attribute `0x0A` (bootloader build time in SDL's list) carries a slot id, and capabilities (`0x02`) is 0. The firmware build time is fixed too, and an older fake date once made Steam treat the pad as needing an update. #1375's serial alone probably doesn't fix this: the game gets no Steam Input actions at all, not the wrong layout. Could you capture these on lea? 1. The real pad on lea's USB while the Shield streams Deadlock, with the pad not connected to the Shield. Does it play? That separates the session from the virtual pad. 2. During a stream with Deadlock in front: `sudo evtest /dev/input/event18` while you touch the left pad, and `adb logcat -d -s Sc2Capture | grep 'report id'`. That separates the pad's own mouse mode from a Steam layout. 3. `~/.steam/steam/logs/controller.txt` from a cable run and a stream run, each from a fresh Steam start to Deadlock in front. 4. `usbmon` captures of the same two runs (`sudo modprobe usbmon`, then `sudo tshark -i usbmonN -w …`), with the host at `RUST_LOG=info,pf_inject=debug`. Any query the cable answers differently from our table is the candidate. 5. A stream with #1375 on both ends.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unom/punktfunk#1368