question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HID descriptor problems when attached to some hardware KVM swtiches

See original GitHub issue

Description

Spun off from https://github.com/mtlynch/tinypilot/issues/78#issuecomment-783755302

Some hardware KVM switches seems to “take issue” with the combined mouse and keyboard HID descriptors provided through TinyPilot’s use of libcomposite gadget behaviors. One particular case is interesting, because at least one

What’s the behavior that you expect?

Keyboard & Mouse are able to be activated through init-usb-gadget script, and successfully pass through the KVM switch hardware to the end device

What’s happening instead?

Only one device descriptor can be activated at a time, or neither will pass through.

What are the steps to reproduce this behavior?

  1. Attach TinyPilot to KVM swtich
  2. Observe “missing” keyboard / mouse on end device
  3. See errors in TinyPilot logs regarding writes of keypresses

Research

I’ve collected some notes in this Gist.

  • Kernel logs showing the difference in reports. Notice, the strings are missing when passing through the CKLau 🤔
  • When both HID devices are activated, there is no kernel message. This seems to indicate an issue within the switch hardware/firmware, though due to a specific compatibility issue only yet observed here. Could be a HID definition compliance issue, or could be something more obscure like report_length misalignment. 🤷
  • Included a full HID dump from a hardware combo device which “seemingly” has no issues when directly attached to the KVM switch.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
WarheadsSEcommented, Jun 13, 2021

@mtlynch My apologies that it took me so long to get back to you.

You’re spot on. This is looking more like a firmware limitation of the CKLau switch itself, isolated down to the support endpoint count.

1reaction
WarheadsSEcommented, Mar 31, 2021

I haven’t forgotten this @mtlynch, just been a busy month!

Read more comments on GitHub >

github_iconTop Results From Across the Web

476700 – Loss of USB HID devices when switching with a KVM
Description of problem: when switching a KVM on and off the USB keyboard and mouse are no longer recognized. This hardware was certified...
Read more >
[SOLVED] HDMI KVM switch results in loss of keyboard and ...
I have a Sea Wit 2-port HDMI KVM switch (supports EDID), and at initial startup of my Lenovo T470s laptop everything works perfectly...
Read more >
KVM Switch Common Problems & Fixes! (2 & 4 Port) - YouTube
Having issues with your new A2U KVM switch ? It may be related to sound, video, and mouse & keyboard,.or it may be...
Read more >
Lvl1 KVM troubleshooting help - Level1Techs Forums
Can be used on windows 10 to keep them there. Can you try the mouse on a usb3 port? If you use the...
Read more >
The Best KVM Switches for 2022 - PCMag
Also, the USB 2.0 nature of the USB ports is fine for connected peripherals like a keyboard, mouse, or printer, but we wouldn't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found