ThomasVon2021 / blikvm

Open and cost-effective "KVM-over-IP". BliKVM comes in 4 different models, v1 CM4, v2 PCIe, v3 HAT and v4 Allwinner, based on Raspberry Pi and Allwinner SoC.
https://thomasvon2021.github.io/blikvm/
GNU General Public License v3.0
355 stars 30 forks source link

Blikvm v1 skipping keypresses #164

Open vladie opened 1 month ago

vladie commented 1 month ago

I have blikvm v1 connected to linux server All works fine except that it skips keypresses with some probability For example if i enter 'hello world' in linux console (through web interface of blikvm, i'm using google chrome as client) i can see 'helo wrld' entered or 'hell wold' If i typing faster - probability of keypress skipping is increasing

ThomasVon2021 commented 1 month ago

May I ask if you are using blikvm ui or pikvm ui?

vladie commented 1 month ago

blikvm ui 1.2.2

vladie commented 1 month ago

just updated to 1.4.0 but problem still persists

ThomasVon2021 commented 1 month ago

Is it under the local area network or the public network? Is the delay significant? Are you familiar with using a browser to view messages? Every time you press a button, the browser can view it through the viewing tool.

vladie commented 1 month ago

Local area network, no delay at all. Yes i can view browser log but i can't find anything related to keypresses in that log.

ThomasVon2021 commented 1 month ago

It's not a log, it's a message sent by the browser. I can provide you with a screenshot when I have a device. The log is not open normally. Of course, if you have an additional SD card, you can burn a pikvm image and test it to confirm whether it is a hardware or software issue.

vladie commented 1 month ago

you can send me instructions what debug information you need, i will do it. my cm4 have embedded disk, no sd cards. but i can ssh to it and install package or change config values.

ThomasVon2021 commented 1 month ago

Browser viewing tool, view messages in network options. Flash the pikvm os you can see this guide: https://wiki.blicube.com/blikvm/en/flashing_os/#download-the-image

vladie commented 1 month ago

where this 'messages' in firefox ? i opened developer tools -> network and see http requests, but no messages mentioned

ThomasVon2021 commented 1 month ago

微信图片_20240514150332 I use the chorme

vladie commented 1 month ago
Screenshot 2024-05-14 at 10 17 42

i've attached screenshot i typed 'workwork', but wokwok appeared in output

ThomasVon2021 commented 1 month ago

After reviewing the relevant code, it was found that the two commands are within the same polling cycle, and the later ones will overwrite the previous ones. A fast typing speed can cause this problem.

vladie commented 1 month ago

can you please fix this in new version ?

ThomasVon2021 commented 1 month ago

If you directly connect the physical keyboard to the controlled computer with a faster printing speed, see if it will be lost.

vladie commented 1 month ago

i've setup OS on this computer without blikvm - by connecting physical keyboard and monitor - without any issues - no keypresses are lost

ThomasVon2021 commented 1 month ago

Do another test, use the assignment and paste function, click on the keyboard logo in the upper left corner, and see if it will be lost.

vladie commented 1 month ago

Works without losing keypresses, but it sends keypresses not very fast - one by one

ThomasVon2021 commented 1 month ago

Ok,can you connect KVM to a desktop system like Windows for testing and see if it will be lost. I see if all systems have issues. I tested and controlled the Windwos system on my end, and even though I pressed it quickly, there were no issues.

vladie commented 1 month ago

my computer runs MacOS, maybe this is different from yours ? maybe browser keypresses works differently in different OSes. i've tried firefox and chrome today (on mac) and both have lost keypresses problem

ThomasVon2021 commented 1 month ago

It refers to the controlled computer connected to KVM. My computer is also macos

ThomasVon2021 commented 1 month ago

my computer runs MacOS, maybe this is different from yours ? maybe browser keypresses works differently in different OSes. i've tried firefox and chrome today (on mac) and both have lost keypresses problem

How is the testing situation?

vladie commented 1 month ago

Will try to setup intel nuc today/tomorrow, connect blikvm to it and report results, i have no other computers now to test with.

vladie commented 1 month ago

just finished setup ubuntu 24.04 server to intel nuc mini pc. results are the same as with previous computer (amd 7950x based pc) - it skipping keypresses in console.

ThomasVon2021 commented 1 month ago

I checked the code again for any suspicious areas, but I'm not sure. Thank you very much for your cooperation. I plan to provide you with a specially validated version. Do you have time to cooperate with the testing.

vladie commented 1 month ago

yes of course, waiting for the fix

ThomasVon2021 commented 1 month ago
截屏2024-05-21 22 38 40

After several days of investigation, I speculate that it is an issue with the USB polling rate of the controlled machine. The regular training frequency is 125Hz, which means there is an interval of 4ms per second. I have forcibly added a setting in the software that can modify this interval. The usage method is to click on the logo 10 times in a row, open the hidden project menu, set a reasonable value for the second item, such as 10, and then log in to operate. Can be tested sequentially: 1, 2, 4, 6, 8, 10, 12, 15. Take a look at the effect kvm-link.zip I have uploaded the kvm-link.zip file. After downloading, unzip it to obtain the kvm-link. Replace this file with the kvm link in the/usr/bin/blikvm/path, and then restart the system to run.