ba2ceb2e

By: ananjiani <ananjiani@noreply.codeberg.org>

fix(steammachine): keep the Bluetooth radio out of USB autosuspend (#350)

## Symptom

An external controller (Switch Pro Controller) dropped and re-paired every few minutes. The kernel log showed the link being torn down mid-traffic:

```
Bluetooth: hci0: ACL packet for unknown connection handle 2
nintendo 0005:057E:2009.00XX: joycon_enforce_subcmd_rate: exceeded max attempts
```

Each reconnection produced a fresh `hidraw` device, which is the "dropping" you notice:

```
11:30:17  nintendo ...:2009.0014
11:32:40  nintendo ...:2009.0015
11:57:21  nintendo ...:2009.0023
12:38:44  nintendo ...:2009.0027
12:42:03  nintendo ...:2009.0029
```

## Cause

The Bluetooth radio is an **integrated Valve USB device** (`28de:1401`), and `btusb` enables USB autosuspend by default (`enable_autosuspend=Y`). The adapter genuinely sleeps:

```
power/control            auto
runtime_suspended_time   3,238,298 ms
runtime_active_time      4,053,263 ms
```

Waking it mid-session tears down the radio link.

The revealing contrast is the Steam Controller:

```
1-3  Steam Controller Puck   control=on     <- protected, never drops
1-5  Bluetooth (28de:1401)   control=auto   <- autosuspended
```

So the working controller is the one that happens to be exempt. **No udev rule sets that** — something does it at runtime, most likely `powerbuttond` or `steamos-manager`. The protection is incidental, not declarative.

## Change

Pins the Bluetooth radio out of autosuspend, scoped to `idProduct 1401` so it cannot affect the Steam Controller puck or any other Valve device.

## Verification

Confirmed at runtime first, before making it declarative:

```bash
echo on > /sys/bus/usb/devices/1-5/power/control
```

The controller stopped dropping. This PR makes that survive a reboot.

Co-authored-by: Ammar <ammar.nanjiani@gmail.com>
Reviewed-on: https://codeberg.org/ananjiani/infra/pulls/350

Total

11m22s

Time to Start Worker time Duration Time to finish Idle
Config 0s 1s 1s 1s 0s
Eval 1s 5m27s 5m27s 5m29s 0s
Build 5m29s 2m15s 5m53s 11m23s 4m34s
Suite 0s 7m44s 11m22s 11m23s 4m35s

Timeline

Config Eval Build Compressed gap
0s1m2m3m4m5m11m