Repository navigation
Description
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.
5月 03 21:43:08 mi kernel: hid-generic 0005:045E:02E0.0006: unknown main item tag 0x0
5月 03 21:43:08 mi kernel: input: Pro Controller as /devices/pci0000:00/0000:00:08.1/0000:02:00.3/usb1/1-4/1-4:1.0/bluetooth/hci0/hci0:1/0005:045E:02E0.0006/input/input21
5月 03 21:43:08 mi kernel: hid-generic 0005:045E:02E0.0006: input,hidraw5: BLUETOOTH HID v9.03 Gamepad [Pro Controller] on 80:30:49:10:6b:d0
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.
Failed to find catalog entry: Invalid argument
uname -a
Linux mi 5.17.5-zen1-1-zen #1 ZEN SMP PREEMPT Wed, 27 Apr 2022 20:56:14 +0000 x86_64 GNU/Linux
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 ... mentioning nintendo 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.
Activity
dogtopus commentedon May 3, 2022
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.
pickfire commentedon May 4, 2022
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
-pI can access the system fine, but when the system crash, it doesn't seemed to update the display, the display still freezes so I am not sure if it is doing anything.dogtopus commentedon May 4, 2022
Did you try the
kdump-save.servicementioned on the arch wiki?Maybe also try switching to a console before you attempt to crash the system.
pickfire commentedon May 5, 2022
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.
dogtopus commentedon May 5, 2022
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.
pickfire commentedon May 6, 2022
No, I did
echo c > /proc/sysrq-trigger, and also try crashing the system by turning on the controller on nintendo switch mode. It works as in the caps lock led no longer blinks, but the screen is still stuck so I can't do anything.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.
pickfire commentedon May 21, 2022
Now after I updated kernel to
5.17.9-zen1-1-zenit seemed like I no longer get kernel panic. But my computer still hangs.Kernel log
Not sure if this is the correct place to report this since this is coming from
hid_nintendobut this repository seemed to bejoycond.pickfire commentedon May 21, 2022
Mainline log `5.18.0-rc7-1-mainline`
dogtopus commentedon May 21, 2022
Looks like there's a division-by-zero error somewhere near
nintendo_hid_event. Wild guess: something is wrong in the calibration data?pickfire commentedon May 21, 2022
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.
dogtopus commentedon May 21, 2022
Because
pickfire commentedon Jul 16, 2022
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
hid_nintendowithblacklist hid_nintendoin/etc/modprobe.d/hid_nintendo.confand installhid-nintendo-dkms(from archlinuxcn repo) https://github.com/archlinuxcn/repo/blob/master/archlinuxcn/hid-nintendo-dkms/PKGBUILD, then it seemed to work now by using that along with joycond, still can't get joycond-cemuhook to work so no motion, but it didn't kernel panic this time with the dkms version, it also works with yuzu.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.
jorgelukas commentedon Aug 16, 2022
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
pickfire commentedon Aug 17, 2022
@jorgelukas you can try the method I suggested, blacklist
hid_nintendoand usehid-nintendo-dkmsinstead, that one at least it won't hang, at least still usable.JohnoKing commentedon Aug 22, 2022
I have debugged this hang and have found out that the
hid-nintendo-dkmsdriver works because it contains the changes from this commit: nicman23/dkms-hid-nintendo@7f984ed (cf. nicman23/dkms-hid-nintendo#25). For some reason the kernel version of thehid_nintendodriver lacks those changes, which results in the hang when the GuliKit controller is in Nintendo Switch mode. Thus, while the hang can be avoided by usinghid-nintendo-dkms, it's also possible to patch the kernel driver to avoid the hang. Patch against Linux 5.19.3:Recompiling the kernel with the above patch allows the GuliKit controller to work without installing
hid-nintendo-dkms.142 remaining items
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility
HID: nintendo: check analog user calibration for plausibility