Skip to content
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

HID device stops working sometimes #255

Open
MatejKovacic opened this issue Jan 10, 2025 · 16 comments
Open

HID device stops working sometimes #255

MatejKovacic opened this issue Jan 10, 2025 · 16 comments

Comments

@MatejKovacic
Copy link

Quite often HID device (mouse, keyboard) stops working. Sometimes it helps to click "Reset HID device", but sometimes I need to ssh to NanoKVM and reboot it...

What are the solutions?

@DaisukeMinagawa
Copy link

I have the same issue.

@MatejKovacic
Copy link
Author

Found something interesting. It seems that it happens where the target computer (computer connected to NanoKVM) starts screensaver (i. e. lock current session).
Could be some change of a resolution or something?

@DaisukeMinagawa
Copy link

@MatejKovacic It is not caused by the screen saver or locking the current session. I encountered the problem while using grab shell of Linux.
I'll try to display mode to MJPEG.

@MatejKovacic
Copy link
Author

Correct, found out that session got locked, abut HID worked.

I am using my own Wireguard VPN. I found out that sometimes connection drops a little, I also go disconnected from ssh session, but in general no bigger problems.

@DaisukeMinagawa
Copy link

@MatejKovacic I found HID does not work after mounting .iso image.

@stvorl
Copy link

stvorl commented Jan 11, 2025

I found, than in fully working high-level OS (Windows, Linux, etc) mounting and unmounting ISO working well, HID not ceased.

This issue happens only in low-level apps (UEFI/BIOS setup, GRUB loader console and so on), and, looks like, may not reproduce on some motherboards.

Anyway, you can still mount ISO image, then reboot controlled PC, re-enter low-level app, and now HID is working again, while image is mounted too.

Looks like, when we're mounting disk, unit is re-connecting its "USB-hub-with-keyboard-and-mouse-and-disk" emulation device (to force controlled PC to re-detect devices on it, because there is no another way), and there is some troubles in device introduction logic on unit, interfered with low-level HID device detection on PC.

@MatejKovacic
Copy link
Author

Now it seems to me that it is more or less random behavior. With no clear patterns. But happens quite often.

@stvorl
Copy link

stvorl commented Jan 11, 2025

Now it seems to me that it is more or less random behavior. With no clear patterns. But happens quite often.

What OS is under control while it happens?
Are you sure it is HID issue? Can it be just video stream interruption due to poor communication?
I found some cases in #257. Does it help to reopen WebUI in browser?

@MatejKovacic
Copy link
Author

OS under control is Ubuntu. It was not restarted, connection was not lost, because I can ssh to NanoKVM.

@MatejKovacic
Copy link
Author

Sometimes helps to reopen webui, sometimes "reset HID" helps, but more often I need to reboot NanoKVM.

@stvorl
Copy link

stvorl commented Jan 11, 2025

I had exactly same looking situation, but real issue was in video streaming freeze.
I found that sometimes, when connection is poor (like ping losses and so on), video seems to be suspended forever (till WebUI reopening) but HID commands was still delivering to controlled device.

And I can still SSH to KVM (because connectivity returns quickly), and even existing SSH connection not breaks (because I'm not using it right in time when I was busy by punching frozen WebUI, when connection was shortly in hang)

Reopening WebUI in another tab will restore video streaming and I can read text I blind typed on terminal recently. Did you try to blind write some text in terminal before WebUI reload, and then check for it after?

Reopening WebUI can also point to some frontend and browser issue, or OS related browser issue. Sure, when you reboot the unit, it will cause reopening WebUI too.

Maybe to test with another browser, non-webkit? Like, Firefox (gecko)?

@mcury1985
Copy link

mcury1985 commented Jan 12, 2025

Same problem here.
One thing that I've been doing to mitigate the issue is disconnect the keyboard from the host.
By disconnecting the USB keyboard from the host, I don't need to reboot nanoKVM or reset HID anymore.

@MatejKovacic
Copy link
Author

Maybe to test with another browser, non-webkit? Like, Firefox (gecko)?

I tested Chromium and Firefox. When HID stops working, it is the same.

@stvorl
Copy link

stvorl commented Jan 13, 2025

@mcury1985, @MatejKovacic
This is really bad. I didn't test the unit for a long time work, just for hour-two, on about few motherboards and RPi. Maybe this is reproducing with mine too, maybe not, I'll try tightly next week. Maybe this issue is reproducing only on crossing with specific motherboards.

If your controlled PC is linux-based, it need to be checked with dmesg and lsusb commands on next such event (i mean, HID disconnect), using directly connected keyboard, in order to observe USB bus errors and USB device "Sipeed gadget" presence.

I think, this would be useful for maintainers, and musthave for their response. If they'll come down to read and handle this, 'course. 🤭

@mcury1985
Copy link

mcury1985 commented Jan 13, 2025

If your controlled PC is linux-based,

Its both Windows and Linux (EndeavourOS which is based on Arch Linux).
Controlled PC is dual boot.
The problem happens when I try to switch the OS pressing F8 to show boot options or DEL to get into the BIOS when booting from OS to the other.
The only way it always work is by unplugging the USB keyboard from the host (controlled PC).

Perhaps not related to this problem, not sure, but a little explanation about my system:
You can ask me, well, why don't you use GRUB.. I don't like GRUB, I use two hard drives, one for each OS, both of them have their own EFI partition.. This avoid the Windows update problem messing with my Linux.
Linux is systemd-boot btw.

@wj-xiao
Copy link
Collaborator

wj-xiao commented Jan 16, 2025

We've fixed the “Reset HID” in the version 2.1.5.

Please update to the latest version and try resetting the HID if it's not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants