Skip to content

Releases

xmorpheo 0.2.0

Choose a tag to compare

@kakra kakra released this 27 Nov 01:27
f4e9bd6

A feature release that lets a device entry depend on the HID driver, so configurations stay correct when another driver renames the axes of the same device.

New

  • driver limits a device entry to one HID driver. A driver may replace the report descriptor of a device and so give the same fields other usages. hid-tmff2 does this for the Thrustmaster T300 RS: it names the pedals Rz, Z, and Y, while the wheel itself, under hid-generic, names them Y, Rz, and Slider. An entry with driver only applies with that driver bound, and wins over an entry without one. See CONFIG.md.
  • xmorpheo list shows the bound driver of each device, and xmorpheo template adds it as a commented driver key.

Fixes

  • The T300 RS example only applies with hid-tmff2. Under hid-generic, it swapped brake and gas instead of brake and clutch. examples/t300rs-swap-pedals.toml now has driver = "tmff2".
  • Switching drivers detaches a program that no longer matches. When a driver bound to a configured device but no entry matched it with that driver, the udev rule kept the old program attached. It now detaches it.

Tested hardware

Upgrading

make
sudo make install
sudo xmorpheo attach --all --replace

If you copied the T300 RS example into /etc/xmorpheo/conf.d, add driver = "tmff2" to it, or copy it again.

xmorpheo 0.1.2

Choose a tag to compare

@kakra kakra released this 22 Nov 04:05
1e00795

A bugfix release for devices that pad their input reports, with the Thrustmaster T300 RS now tested.

Fixes

  • Reports longer than the descriptor says are rewritten. Some devices pad every input report to the size of their USB endpoint. The T300 RS sends 64 bytes for a report that its descriptor declares with 15. xmorpheo only rewrote reports of exactly the expected length, so on such devices it was attached but changed nothing. It now follows the HID core: longer reports are rewritten, and shorter ones still stay untouched.

Tested hardware

Upgrading

make
sudo make install
sudo xmorpheo attach --all --replace

A game profile that was set up for the unswapped pedals while 0.1.1 was attached may need its brake and clutch bindings checked once the swap takes effect.

xmorpheo 0.1.1

Choose a tag to compare

@kakra kakra released this 16 Nov 18:44
594cebd

A bugfix release that makes replacing and rebinding safer. Thanks to an external code review for pointing out most of these.

Fixes

  • attach --replace keeps a working program when something fails. The new link is pinned under a temporary name first, then the old one is detached and the new one is moved into place. If any step before that fails, the old program keeps running. Tested with a broken formula on real hardware.
  • udev keeps the previous program on a failed rebind if the report descriptor did not change, for example after a typo in the config. A changed or unreadable descriptor still detaches it, as before, because the old tables would not fit anymore. The journal says which of the two happened.
  • An empty source = {} table is rejected with a clear message instead of crashing the planner.
  • Tolerances must be finite and at least 0. Infinite values were accepted before, and the error message for NaN was misleading.

Smaller changes

  • The error of a failed bind is logged only once.
  • udev remove stays quiet for devices without a configuration.

xmorpheo only ever touches its own pins below /sys/fs/bpf/xmorpheo. Other HID-BPF programs on the same device, like those of udev-hid-bpf, are left alone.

Upgrading

make
sudo make install
sudo xmorpheo attach --all --replace

New in this release: xmorpheo keeps the report descriptor of each attached device in /run/xmorpheo/state. Like the pins, it is gone after a reboot.

xmorpheo 0.1.0

Choose a tag to compare

@kakra kakra released this 16 Nov 02:03
97e16b3

The first release of xmorpheo: response curves and axis remapping for HID joysticks, gamepads, and wheels on Linux, applied in the kernel with HID-BPF.

xmorpheo rewrites the axes in the raw input reports, before any driver or hidraw reader sees them. So the curves work for every consumer of the device: native games through evdev and SDL, drivers like xpadneo, and games in Proton or Wine that read the device through hidraw. The device keeps its vendor and product ID and its report descriptor, so games keep their bindings.

This is an early release. It works well on the devices below, and feedback from early adopters with other sticks, pads, and wheels is very welcome.

Features

  • Response curves as formulas, like (1 - k) * x + k * pow(x, 3), with deadzones, clamping, and named constants. The syntax follows the stateless part of the ETS2 controls.sii expressions.
  • Inverted, swapped, pinned, and combined axes. For example, two triggers on one rotation axis, or swapped pedals.
  • Integer math in a small, device-agnostic BPF program, fitted to within half a step of the exact formula by default.
  • Drop-in configuration in /etc/xmorpheo/conf.d, like systemd, with overrides and masking.
  • A udev rule that attaches when a driver binds to a configured device, and xmorpheo attach --replace for configuration changes.
  • evdev fuzz and flat set to 0 by default, so curved axes keep their full resolution.
  • xmorpheo curve shows a curve as text, CSV, or a gnuplot plot with its error.

Tested devices

  • VKB Gladiator EVO L and R, over USB.
  • Xbox Wireless Controller (Series X|S) over Bluetooth LE with xpadneo, including combined triggers.

The example for swapping the pedals of a Thrustmaster T300 RS (hid-tmff2, PC mode) is not tested on the device yet. Reports from other devices are very welcome.

Requirements

Linux 6.11 or newer with CONFIG_HID_BPF and BTF. For building: Rust, clang, bpftool, and the libelf and zlib development files.

make
sudo make install

See the quickstart in the README, and docs/PACKAGING.md for distribution packages.

Caution

On force feedback devices, an inverted or swapped axis can make a game drive the device with full force against its stops. Read "Safety and Liability" in the README before configuring a wheel or a force feedback stick.

Known limits

  • Formulas are sums of parts in one variable each, without state. Products of two axes, filters, and toggles are not possible. See docs/FORMULAS.md.
  • Buttons are not remapped.
  • xmorpheo never changes the report descriptor, so an axis keeps the range of its field.
  • The configuration format may still change before 1.0.

AI transparency

I developed xmorpheo with substantial help from Claude Code by Anthropic. I made the design decisions, reviewed every change, and tested on my own devices. See "AI Transparency" in the README.