ThomasVon2021/blikvm

[Bug] [BliKVM v1] [v1.2.2] skipping keypresses

vladie opened this issue · 35 comments

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

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

blikvm ui 1.2.2

just updated to 1.4.0 but problem still persists

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.

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.

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.

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.

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

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

微信图片_20240514150332
I use the chorme

Screenshot 2024-05-14 at 10 17 42

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

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.

can you please fix this in new version ?

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

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

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.

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

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.

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

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

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?

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

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.

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.

yes of course, waiting for the fix

截屏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](https://github.com/ThomasVon2021/blikvm/files/15391445/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.

Suggest upgrading to latest version (v1.4.5-alpha or greater). Please let us know if the problem persists, or has since been resolved.

root@blikvm(rw):/opt/bin/blikvm# python3 /opt/bin/blikvm/script/update.py alpha
Welcome to use the upgrade script. Please confirm that you have used git related commands before upgrading the script to ensure that update.by is in the latest state.
Board type: BoardType.V3_PCIE
The latest release tag for blikvm is v1.4.6
The local version is v1.4.0
Upgrading v1.4.0 ==> v1.4.6
Download package: release-alpha.tar.gz please wait...
Download progress: 1.00%
......
Download progress: 99.00%
Download progress: 100.00%
release-alpha.tar.gz downloaded to /tmp/kvm_update/release-alpha.tar.gz successfully.
Download release package success, start to install, please wait 60s...
cp: cannot stat '/mnt/exec/release/config': No such file or directory
Traceback (most recent call last):
File "/tmp/kvm_update/release/install_release.py", line 155, in
main()
File "/tmp/kvm_update/release/install_release.py", line 143, in main
subprocess.check_output(cmd, shell = True, cwd=gArgs.releasepath )
File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'cp -R /mnt/exec/release/config /tmp && systemctl disable kvmd-janus && systemctl disable kvmd-hid && systemctl disable kvmd-main && systemctl disable kvmd-video && bash install-kvmd-web.sh && cp package.json /usr/bin/blikvm/package.json' returned non-zero exit status 1.
Traceback (most recent call last):
File "/opt/bin/blikvm/script/update.py", line 222, in
main()
File "/opt/bin/blikvm/script/update.py", line 202, in main
output = subprocess.check_output(cmd, shell = True, cwd=install_path)
File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'python3 install_release.py --alpha=true' returned non-zero exit status 1.

tried to install by directly downloading release from github, but it requires some /mnt/exec which i doesn't have

installed successfully
needed to run ./install-kvmd-web.sh
before python3 install_release.py --releasepath=./
which is not mentioned in your docs

now web server is not working so i cannot test anything :(

I just updated the update.py script. Please update it before taking a look. The above method did not fully update and the update was successful

i've already updated manually
bug still persist :(

but overall UI experience much better than in 1.4.0 !!!

If you have time, I may need to remotely debug with you in order to troubleshoot