emilyst / hid-nx-dkms

Alternative Linux kernel HID driver for Nintendo Switch controllers
GNU General Public License v2.0
40 stars 6 forks source link

Calibration data failing to be loaded on the Pro Controller #8

Open nfp0 opened 1 year ago

nfp0 commented 1 year ago

Calibration data is failing to be loaded on the Pro Controller, as the log messages seem to indicate:

nx 0005:057E:2009.0005: unknown main item tag 0x0
nx 0005:057E:2009.0005: hidraw3: BLUETOOTH HID v80.01 Gamepad [Pro Controller] on e8:48:b8:c8:20:00
nx 0005:057E:2009.0005: controller MAC = 98:B6:E9:3E:FB:16
nx 0005:057E:2009.0005: using user cal for left stick
nx 0005:057E:2009.0005: using user cal for right stick
nx 0005:057E:2009.0005: Failed to read left stick cal, using defaults; e=-22
nx 0005:057E:2009.0005: Failed to read right stick cal, using defaults; e=-22
nx 0005:057E:2009.0005: using user cal for IMU
input: Pro Controller (IMU) as /devices/pci0000:00/0000:00:01.3/0000:06:00.0/usb1/1-10/1-10:1.0/bluetooth/hci0/hci0:2/0005:057E:2009.0005/input/input24
input: Pro Controller as /devices/pci0000:00/0000:00:01.3/0000:06:00.0/usb1/1-10/1-10:1.0/bluetooth/hci0/hci0:2/0005:057E:2009.0005/input/input23
emilyst commented 1 year ago

Hi, thanks for this report. I've noticed this happening as well, but irregularly, ever since I merged in https://github.com/emilyst/hid-nx-dkms/commit/5df3aa676463f11141554388d099cf169db6c75f. Presumably this means the first-party hardware is reporting implausible calibration values sometimes. I haven't had a moment to track down whether this is a hardware issue or something on my end.

I should probably print out the supposedly implausible using hid_dbg somewhere to get a better handle on it. I'll try to do that sometime soonish.

In any case, one question—have you noticed any actual calibration issues, such as drift?

nfp0 commented 1 year ago

In any case, one question—have you noticed any actual calibration issues, such as drift?

I have not noticed any drift. Why? Does the calibration also include values for deadzones?

But I noticed that, despite the log messages saying it failed to load user calibration, some form of calibration still seems to be present. I say this because with this dkms module, the joystick is usable, while if I blacklist hid_nintendo, the joystick is very badly calibrated, almost unusable.