-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gulikit King Kong Controller hang #36
Comments
If you can, could you please use kdump to create a memory dump and at least post the backtrace here? This will save tremendous amount of time that will otherwise be wasted on trying to reproduce the kernel panic. |
I tried doing a kdump following https://wiki.archlinux.org/title/Kdump and https://www.kernel.org/doc/html/latest/admin-guide/kdump/kdump.html but I still can't seemed to get the crash dump after spending hours on it, when it crash, the caps lock led is no longer blinking but I still don't see the crash dump file in the specified location, I also can't find the logs on why this happened. I did
Without the |
Did you try the Maybe also try switching to a console before you attempt to crash the system. |
Yes, I put that within the initramfs using mkinitfs but I don't seemed to find it in the journal log when it crash, not sure why.
I also try crashing it in TTY2, and it also stuck the same way it did with X11, it did not go to the new console started from kexec, it just freezes. |
Does crashing with sysrq trigger trigger the kdump properly? I guess something might went wrong during the crash kexec() and made it freeze. Maybe you could also try other methods like getting a backtrace via the serial port or pstore dump. If everything fails you might need to run the kernel in a VM and attach a debugger. |
No, I did
But I don't know how to use serial port or pstore dump. Hmm, the last probably sounds as hard. Is there an easier way like say I get to use a live rescue disk that I can easily plug on my laptop and crash it there to get the kdump? That way I can just run the live rescue disk and after it crash save the file to my disk or somewhere then I can send it here. |
Now after I updated kernel to Kernel log
Not sure if this is the correct place to report this since this is coming from |
Mainline log `5.18.0-rc7-1-mainline`
|
Looks like there's a division-by-zero error somewhere near |
Not sure, I never tweaked it myself. But I thought it was null pointer dereference? I can't see how is it division by zero. |
Because
|
I believe other people faced the same issue. https://bbs.archlinux.org/viewtopic.php?id=276196 Lately I could connect using bluetooth (wired still kernel panic), my mouse can still move but the computer does not seemed to respond to any other inputs like mouse buttons and keyboard presses after like few seconds. Logs
I tried blacklisting Looks like joycond-cemuhook is working, not sure why those files are missing but I guess because I power off too frequently due to kernel panics. But now it seemed to run although I haven't get it working for yuzu yet. Looks like it does work but a bit slow and laggy, but I have to configure it in yuzu to get it working. |
still happen, same here with gulikit kingkong 2 pro, I wonder if it happens with the official switch pro Linux fedora 5.18.16-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 3 15:44:49 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux |
@jorgelukas you can try the method I suggested, blacklist |
I have debugged this hang and have found out that the # This patches the kernel driver with the changes in https://github.com/nicman23/dkms-hid-nintendo/commit/7f984edd
diff -Naur linux-5.19.3/drivers/hid/hid-nintendo.c linux-5.19.3-fix/drivers/hid/hid-nintendo.c
--- linux-5.19.3/drivers/hid/hid-nintendo.c 2022-08-21 06:20:09.000000000 -0700
+++ linux-5.19.3-fix/drivers/hid/hid-nintendo.c 2022-08-22 14:44:11.876342940 -0700
@@ -794,7 +794,14 @@
&ctlr->left_stick_cal_x,
&ctlr->left_stick_cal_y,
true);
- if (ret) {
+
+ /* check whether read succeeded and perform plausibility check for retrieved values */
+ if (ret ||
+ ctlr->left_stick_cal_x.min >= ctlr->left_stick_cal_x.center ||
+ ctlr->left_stick_cal_x.center >= ctlr->left_stick_cal_x.max ||
+ ctlr->left_stick_cal_y.min >= ctlr->left_stick_cal_y.center ||
+ ctlr->left_stick_cal_y.center >= ctlr->left_stick_cal_y.max
+ ) {
hid_warn(ctlr->hdev,
"Failed to read left stick cal, using dflts; e=%d\n",
ret);
@@ -813,7 +820,14 @@
&ctlr->right_stick_cal_x,
&ctlr->right_stick_cal_y,
false);
- if (ret) {
+
+ /* check whether read succeeded and perform plausibility check for retrieved values */
+ if (ret ||
+ ctlr->right_stick_cal_x.min >= ctlr->right_stick_cal_x.center ||
+ ctlr->right_stick_cal_x.center >= ctlr->right_stick_cal_x.max ||
+ ctlr->right_stick_cal_y.min >= ctlr->right_stick_cal_y.center ||
+ ctlr->right_stick_cal_y.center >= ctlr->right_stick_cal_y.max
+ ) {
hid_warn(ctlr->hdev,
"Failed to read right stick cal, using dflts; e=%d\n",
ret); Recompiling the kernel with the above patch allows the GuliKit controller to work without installing |
@JohnoKing Interesting, if you are free, do you mind sharing you did you debug it and test it out? Did you recompile the linux kernel with that patch? If it works, should I go and send a patch to linux kernel? I am not familiar with that. |
To debug the hang, I created a diff of the kernel and dkms versions of hid-nintendo.c with the following command:
After that, I tried applying the various individual changes in the kernel version to the dkms version of hid-nintendo, seeing what worked and what would cause a crash. These changes would be tested by recompiling the dkms driver, unplugging the GuliKit controller, unloading hid-nintendo-dkms with Script (dropdown):# Hopefully this becomes unnecessary when Steam updates to support kernel 5.16+.
# Until then Steam itself cannot use hid-nintendo.
if [[ $(id -u) != 0 ]]; then
echo "This script must be run as root!"
exit 1
fi
if [[ -w /etc/modprobe.d/blacklist.conf.disablesteam ]] && [[ -w /usr/lib/udev/rules.d/89-joycond.rules.disablesteam ]]; then
# Enable hid-nintendo and joycond-cemuhook
mv /etc/modprobe.d/blacklist.conf /etc/modprobe.d/blacklist.conf.enablesteam
mv /etc/modprobe.d/blacklist.conf.disablesteam /etc/modprobe.d/blacklist.conf
modprobe hid-nintendo
mv /usr/lib/udev/rules.d/89-joycond.rules /usr/lib/udev/rules.d/89-joycond.rules.enablesteam
mv /usr/lib/udev/rules.d/89-joycond.rules.disablesteam /usr/lib/udev/rules.d/89-joycond.rules
udevadm control --reload-rules
udevadm trigger
echo "Enabled hid-nintendo and joycond-cemuhook support"
elif [[ -w /etc/modprobe.d/blacklist.conf.enablesteam ]] && [[ -w /usr/lib/udev/rules.d/89-joycond.rules.enablesteam ]]; then
# Enable Steam support
mv /etc/modprobe.d/blacklist.conf /etc/modprobe.d/blacklist.conf.disablesteam
mv /etc/modprobe.d/blacklist.conf.enablesteam /etc/modprobe.d/blacklist.conf
modprobe -r hid-nintendo
mv /usr/lib/udev/rules.d/89-joycond.rules /usr/lib/udev/rules.d/89-joycond.rules.disablesteam
mv /usr/lib/udev/rules.d/89-joycond.rules.enablesteam /usr/lib/udev/rules.d/89-joycond.rules
udevadm control --reload-rules
udevadm trigger
echo "Enabled Steam support"
else
# Should not happen
echo "INTERNAL ERROR"
exit 128
fi
# Later addition: For debugging, sync the filesystem in case the compiled kernel module hangs
sync After I determined which change in the kernel version caused the hang, I uninstalled hid-nintendo-dkms and applied the resulting patch to the Linux kernel. Then I compiled the patched kernel and installed it, then rebooted the system. I plugged in the GuliKit controller in Nintendo Switch mode and got no hang with the patched kernel driver (I tested the controller in yuzu with the patched kernel and it worked just fine).
I'm not familiar with sending patches to the Linux kernel either. In the case of the patch (which is from nicman23/dkms-hid-nintendo#25), it looks like it was supposed to have been sent over a year ago, but it still hasn't been submitted :/. |
Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]>
Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Changes in v2: - Move the plausibility check to joycon_read_stick_calibration() and have that function return -EINVAL if the check fails. - In the plausibility check, change >= to ==. hid_field_extract() never returns a negative value, so a scenario involving min > center or center > max is impossible. - To reduce code duplication, move the code for setting default calibration values into a single function called joycon_use_default_calibration(). Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]>
Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Changes in v2: - Move the plausibility check to joycon_read_stick_calibration() and have that function return -EINVAL if the check fails. - In the plausibility check, change >= to ==. hid_field_extract() never returns a negative value, so a scenario involving min > center or center > max is impossible. - To reduce code duplication, move the code for setting default calibration values into a single function called joycon_use_default_calibration(). Changes in v3: - Unbreak warning string to conform to coding style. - Change joycon_use_default_calibration() to accept a struct hid_device pointer instead of a struct joycon_ctlr pointer. Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]>
Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]>
The bugfix for the GuliKit controller hang is now set to be included in Linux 6.1. See: |
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]>
BugLink: https://bugs.launchpad.net/bugs/1994179 [ Upstream commit 50503e3 ] Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]>
Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [SamarV-121#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com
Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [SamarV-121#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com
Arne Wendt writes: Cheap clone controllers may (falsely) report as having a user calibration for the analog sticks in place, but return wrong/impossible values for the actual calibration data. In the present case at mine, the controller reports having a user calibration in place and successfully executes the read commands. The reported user calibration however is min = center = max = 0. This pull request addresses problems of this kind by checking the provided user calibration-data for plausibility (min < center < max) and falling back to the default values if implausible. I'll note that I was experiencing a crash because of this bug when using the GuliKit KingKong 2 controller. The crash manifests as a divide by zero error in the kernel logs: kernel: divide error: 0000 [SamarV-121#1] PREEMPT SMP NOPTI Link: nicman23/dkms-hid-nintendo#25 Link: DanielOgorchock/linux#36 Co-authored-by: Arne Wendt <[email protected]> Signed-off-by: Johnothan King <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/gvpL2G6VwXGJPvxX5KRiu9pVjvTivgayug_jdKDY6zfuAaAqncP9BkKLosjwUXNlgVVTMfJSKfwPF1K79cKAkwGComyC21vCV3q9B3EXNkE=@protonmail.com
I believe this is merged into linux but opening an issue here since it was mentioned in https://github.com/DanielOgorchock/joycond
I am using gulikit king kong controller with nintendo switch mode, but when I connect it to my computer, it freezes. There was once I upgraded the kernel (linux-zen) without reboot and it seemed to work fine, I guess some modules wasn't modprobed then it will work fine (no freeze) and detected a pro controller in yuzu but I am not sure which module.
I got that log when I connect it through bluetooth, but on wired the computer freeze and keyboard caps lock led kept blinking.
Not sure if this is related but I got quite a bit of it in the journalctl logs.
uname -a
I am not quite sure how to figure out what causes the computer to freeze but it happens after I changed the mode to switch controller, IIRC last time I saw something related to
failed to probe ...
mentioningnintendo
in the journalctl but I can't it anymore.If any more details is needed, feel free to say what information is needed, I guess it won't be easy to reproduce without the same hardware.
There are 4 modes for the controller, switch, xinput, dinput, android and switch is the only one that freezes the computer.
The text was updated successfully, but these errors were encountered: