Skip to content

Rudder pedals "CH Pro Pedals" incorrectly detected as accelerometer on Linux without udev #7500

Closed
@felixhaedicke

Description

@felixhaedicke

When using SDL2 on Linux without udev enabled (e. g. in the Steam container runtime), the CH Pro Pedals are incorrectly detected as accelerometer, and not listed as a joystick. The CH Pro Pedals are a rudder pedals product.

Because it has three axes and no buttons, it is classified as an accelerometer in SDL_EVDEV_GuessDeviceClass() (see src/core/linux/SDL_evdev_capabilities.c).

Proposals for solution:

  • Make an exception for this particular device (detected by USB VID 0x068e / PID 0x00f2) not to classify as a joystick.
  • Rely on the property INPUT_PROP_ACCELEROMETER being set by the Linux kernel (since 4.0) instead of checking the number of axes / existence of buttons to detect accelerometers.

The algorithm systemd-udev uses to detect accelerometers is very similar to what SDL does. It also does not rely on the property INPUT_PROP_ACCELEROMETER, but also classifies devices with three axes and no buttons as accelerometers (see https://github.com/systemd/systemd/blob/v253/src/udev/udev-builtin-input_id.c#L185). However, for this particular product, there is a hwdb rule (see systemd/systemd@230ed4c).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions