testsAndMisc/linux_configuration
Krzysztof kuhy Rudnicki 3ae53499e6 g29 shifter: detect PS4 mode (046D:C260) instead of failing silently
On the 2026-09-15 and 2026-09-17 boots the wheel enumerated as 046D:C260
(PS3/PS4 selector in PS4 position, bound by hid-generic). The BPF udev
rule, the ensure unit and its hotplug rule all keyed on C24F, so the unit
failed once with "no G29 found" and nothing was said; 1st/3rd stayed on
the firmware's bad decode until the selector was flipped a day later.

- fixes/g29_wheel_mode.sh (new, sourced): classify the HID bus as
  native/ps4/compat/absent; root-safe desktop notification via
  /run/user/*/bus + sudo -u.
- --ensure: absent -> exit 0; ps4/compat -> exit 1 + critical
  notification; native -> attach. --status prints the mode first.
- g29-shifter-bpf.service: Restart=on-failure, RestartSec=5min so a
  notification lost before the session bus exists at boot is re-sent.
- 99-g29-shifter-ensure.rules: also fires on C260.
- tests/test_fix_g29_shifter.bats: 13 tests against a fake sysfs tree.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVfC2T6DyvCFqse9A99zef
2026-09-18 10:47:18 +02:00
..
.githooks Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00
.github Cache prettier's verdict so a push stops paying Node startup 2026-09-11 21:03:57 +02:00
boot_recovery Cap extensionless scripts, and split the one that was hiding 2026-08-23 19:13:40 +02:00
C/atop_agg atop_agg: split atop_agg.c 478 -> 204 + state + emit 2026-08-17 10:49:46 +02:00
diagnostics Dissolve linux_configuration/scripts/ and single_use/ 2026-08-23 18:53:30 +02:00
docs g29 shifter: detect PS4 mode (046D:C260) instead of failing silently 2026-09-18 10:47:18 +02:00
dwm Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00
features Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00
feedback-appimage Dissolve linux_configuration/scripts/ and single_use/ 2026-08-23 18:53:30 +02:00
fixes g29 shifter: detect PS4 mode (046D:C260) instead of failing silently 2026-09-18 10:47:18 +02:00
fresh-install Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00
gaming Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00
i3 Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00
i3blocks Put the screen-locker status back on the i3 bar 2026-08-29 22:55:24 +02:00
installers Extract digital-wellbeing; the directory-depth cap now enforces 2026-08-23 20:57:51 +02:00
lib Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00
meta Dissolve linux_configuration/scripts/ and single_use/ 2026-08-23 18:53:30 +02:00
misc Grade against 3.14 too, not just run on it 2026-08-29 11:50:39 +02:00
periodic_background Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00
tests g29 shifter: detect PS4 mode (046D:C260) instead of failing silently 2026-09-18 10:47:18 +02:00
utils Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00
zsh Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00
.gitignore Dissolve linux_configuration/scripts/ and single_use/ 2026-08-23 18:53:30 +02:00
install_core_system.sh Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00
test_results.log Re-point paths for the ~ reorganisation (home-tidy) 2026-09-11 20:50:19 +02:00