Motion evdev: Difference between revisions

IMU device needs uaccess tag so add example udev rule.
m (Mention that axis may change in the future.)
(IMU device needs uaccess tag so add example udev rule.)
Line 6: Line 6:


The HID Nintendo kernel driver exposes 2 evdev devices, one for the buttons and another (IMU) for the accelerators/gyroscopes. Do note that Joy-Cons will have 2 devices each (4 in total).
The HID Nintendo kernel driver exposes 2 evdev devices, one for the buttons and another (IMU) for the accelerators/gyroscopes. Do note that Joy-Cons will have 2 devices each (4 in total).
The IMU input device does not automatically get tagged with `uaccess` while the "regular" device is. If you do not see an IMU device listed in Dolphin's devicelist add the following udev rule to /etc/udev/rules.f/99-hidnintendo.rules. reload udev rules with "udevadm control --reload-rules" and reconnect the device(s).
<pre>
KERNEL!="event*", GOTO="imuend"
ATTRS{id/vendor}=="057e", ATTRS{id/product}=="2009", ATTRS{name}=="*IMU*", TAG+="uaccess"
ATTRS{id/vendor}=="057e", ATTRS{id/product}=="2006", ATTRS{name}=="*IMU*", TAG+="uaccess"
ATTRS{id/vendor}=="057e", ATTRS{id/product}=="2007", ATTRS{name}=="*IMU*", TAG+="uaccess"
ATTRS{id/vendor}=="057e", ATTRS{id/product}=="200e", ATTRS{name}=="*IMU*", TAG+="uaccess"
ATTRS{id/vendor}=="057e", ATTRS{id/product}=="2017", ATTRS{name}=="*IMU*", TAG+="uaccess"
LABEL="imuend"
</pre>


It took me a bit of time figuring out which axis corresponds with the right motion control in dolphin. '''These axis might change in the future when evdev standardizes them.
It took me a bit of time figuring out which axis corresponds with the right motion control in dolphin. '''These axis might change in the future when evdev standardizes them.