Re: Output from "info ps2k"
Posted: 15. Nov 2013, 00:29
That's been working so far. I'll let you know how it does over an extended period. I've been using the graphical Vbox manager, which does not appear to support setting this via the UI. I'd suggest that it (along with debug) be added as "advanced" settings for a machine; it would make it easier to explore and tweak these things.michaln wrote:Yes. 'VBoxManage modifyvm <vmname> --keyboard usb'Daniel.Glasser wrote:Is it possible to switch Vbox to provide an emulated USB rather than PS2 keyboard?
Yes, I've sent long sequences of scan codes that way.BTW I don't know if you noticed that it's possible to send a larger sequence of scan codes with a single command.
The make/break codes are, in effect, scancodes. For example, delete-down (make) is 0x0e, delete-up (break) is 0x8e.Okay, that sounds like very good evidence that the guest is simply losing keystrokes. When it's a make code, it can be repeated, but when it's a scan code, it causes real trouble.When typing in the guest, I have now noticed a lot of lost make scans; that is, I type a character, and nothing happens in the terminal (or editor) window I'm working in. It happens with a similar frequency to the lost break codes.
Here's something interesting... This is the result from running "Showkey" and then holding the left-shift down for about 4 seconds, releasing it, then holding the left-shift down for another 4 seconds, releasing it, and then doing the same (for less time) with the "caps lock" key. Note that multiple scan codes are being reported for each of these, and they're all "make" codes until the key is released, where the scan code is the make code ORed with 0x80 (this is using the USB keyboard mode):Please try the 'showkey' utility in the guest, perhaps 'showkey -s'. It would also be interesting to know whether the same problem with losing keystrokes occurs in X11 and in a full-screen virtual terminal? What I'm trying to find out is whether it's the Linux kernel losing the scan codes or something (much?) higher up the chain.
Code: Select all
$ sudo showkey -s
kb mode was ?UNKNOWN?
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]
press any key (program terminates 10s after last keypress)...
0x9c
0x2a
0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a
0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a
0x2a 0x2a 0x2a 0x2a 0x2a 0x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3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a
0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a
0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0x3a 0xba
$
I wasn't thinking the protocol would be better, but if it is, as I suggested, a problem with how Ubuntu is dealing with the virtual keyboard controller, the USB keyboard uses a completely different path into the Linux "keyboard". Since USB is delivered in packets, it's less likely that the keyboard code will mess things up because code that talks to the PS2 keyboard controller is out of the path the data is coming in through.That's assuming the USB keyboard protocol is better than the PS/2 protocol... which is sadly not true (USB is a step backwards in so many ways it's not even funny). The USB protocol is completely different and the model falls apart unless there is a slow human hand touching the keys. It's certainly worth trying though.It's looking more and more to me that a virtual USB keyboard emulation option would be a good thing to add (if it's not there already, and I've just not found it.)
I assume that the command "'VBoxManage modifyvm <vmname> --keyboard ps2", or something like it, is how I would switch the keyboard back to PS2.
Thanks for the attention and help so far; I think we're zeroing in on the problem, and may have a work-around.