VirtualBox

Opened 9 years ago

Last modified 4 years ago

#13884 new defect

Keys repeat in guest VM (Windows 7 Pro 32 bit OS)

Reported by: kjoyce Owned by:
Component: guest control Version: VirtualBox 4.3.22
Keywords: Cc: kjoyce@…
Guest type: other Host type: Windows

Description

Periodically the keys will repeat in the VirtualBox guest OS. I am running 4.3.22 r98236 with VirtualBox guest additions and the extension pack for the same version.

This has been happening for many months. I was following a discussion in https://forums.virtualbox.org/viewtopic.php?f=8&t=55373&sid=5dede60332149c70efbe3c8be4fcfd97&p=313722#p313722 but it was suggested to open a ticket for the issue.

The problem does not occur on the host, only the guest. I just had the issue occur at 2/23/2015 9:40 AM, tried to check the vbox.log but did not see anything that I could relate to the problem. I have attached the logs. The

Attachments (4)

Logs.zip (74.7 KB ) - added by kjoyce 9 years ago.
vbox logs
2015-03-24 07_02_47-Keyboard Message Looker.png (33.0 KB ) - added by kjoyce 9 years ago.
VirtualBox.7z (186.1 KB ) - added by kjoyce 9 years ago.
Virtualbox minidump
VBox_log__RickCHodgin.zip (19.8 KB ) - added by RickCHodgin 9 years ago.

Download all attachments as: .zip

Change History (57)

by kjoyce, 9 years ago

Attachment: Logs.zip added

vbox logs

comment:1 by Mihai Hanor, 9 years ago

Does it happen with VirtualBox 4.3.26? How often does it occur? Does the repeating stop on its own? How long does it last? Or does it continue to repeat indefinitely? How do you stop it? Does it occur with all your guests? Does it happen when the guest is not running the Guest Additions? Do you feel any lag/delay when you type something in the guest?

comment:2 by kjoyce, 9 years ago

Hi,

I am not sure if it happens with 4.3.26. I just installed it. I did not see anything in the fixes that indicated there was a change for the problem. I will update if it occurs or if it does not. Regarding the other questions (answers embedded):

Does the repeating stop on its own?

No I have to hit another key to make it stop.

How long does it last?

It will last until I hit another key.

Or does it continue to repeat indefinitely?

Yes it would go indefinitely

How do you stop it?

It will last until I hit another key

Does it occur with all your guests?

yes with all guests (my guests are Windows 7 and Windows XP)

Does it happen when the guest is not running the Guest Additions?

yes all the guest are running Guest Additions and extensions

Do you feel any lag/delay when you type something in the guest?

No there is no lag in the keyboard response

I'll let you know if or when it happens now that I installed 4.3.26. Let me know if there is anything you want from the system when it happens.

Thanks

Last edited 9 years ago by Frank Mehnert (previous) (diff)

comment:3 by Mihai Hanor, 9 years ago

You wrote on the forums that you have upgraded to 4.3.24, but your issue sounds identical to #2613, which in theory was fixed in 4.3.24.

comment:4 by kjoyce, 9 years ago

I am now on 4.3.26 as of this weekend. I will monitor and post an update if I notice the problem in the current version.

comment:5 by kjoyce, 9 years ago

I checked https://www.virtualbox.org/ticket/2613 and I don't think these are the same. Most of the comments and reports in that ticket relate to the host, host keys or control keys like ALT, CTRL and so on. My issue is and key on the guest. It could be a letter, the backspace the ENTER.it does not matter.

I will update if 4.3.26 makes a difference

comment:6 by kjoyce, 9 years ago

I was hopeful but unfortunately the problem just happened. I was typing and the letter "e" started repeating. It could be any letter or keyboard character.

Let me know if there is any logs or traces that can be created to help debug the issue.

comment:7 by Mihai Hanor, 9 years ago

Are you saying that it's enough for you to touch one key, only once, to trigger the issue? That you don't need to do multiple key pressing, consecutive or simultaneous key pressing, to trigger it? And that it doesn't involve any of the special keys, such as Shift, Alt, Ctrl?
How do you use the keyboard and what are you doing in the VM when it happens? Are you switching between two or more VMs?

comment:8 by kjoyce, 9 years ago

Yes that is correct. I am typing a word and then a character in the word will start repeating. It may be a number, letter even punctuation. Any character on the keyboard can do it. It is not limited to a specific key or key stroke. Sometimes it is in the middle of the word, sometimes the last character. it is difficult to tell when it is going to happen and is really frustrating when I am reviewing my email in Outlook and I press the delete key to delete the current message and it starts deleting emails. The problem does not just occur in Outlook it is any application running in the guest.

I am only running 1 VM. It normally happens when I am typing in an application but as indicated above it could happen when I am in email and I press the delete key. There are no special keys being used. No CTRL, ALT, Shift or function keys.

comment:9 by Mihai Hanor, 9 years ago

If you are willing, grab keylook.exe from #2613 and attempt to reproduce the problem, but stop the repeating key before it floods the whole keylook window, not to erases the previous key events. Attach a screenshot of the keylook window. The keylook window must always be the active window when you're typing in the guest, otherwise it's not of any use.

comment:10 by kjoyce, 9 years ago

The issue is not reproducible at will. It takes some time to reproduce. I was able to get the issue to happen and get the keylook output before it filled the buffer window. I will attach the screenshot. I pressed the letter e and the problem happened. I believe I hit the ESC to stop it.

comment:11 by Mihai Hanor, 9 years ago

Get Process Explorer, run it as Administrator, right click the running VM process (there are multiple VirtualBox.exe processes, choose the one with the highest memory usage) and select Create Dump -> Create Minidump, then archive the memory dump and attach it here. You don't need to reproduce the problem.

Last edited 9 years ago by Mihai Hanor (previous) (diff)

comment:12 by kjoyce, 9 years ago

Here is the minidump

by kjoyce, 9 years ago

Attachment: VirtualBox.7z added

Virtualbox minidump

comment:13 by Mihai Hanor, 9 years ago

Also, when you manage to trigger the issue again, please check if moving the VM window in background (out of focus, by clicking the desktop, the taskbar or some other window on the host) stops the key repeating.

comment:14 by kjoyce, 9 years ago

I run the window in full screen but I will see if switching from full screen on the guest to the host stops the repeat. I am not sure what will happen. I usually try to stop it from repeating on the guest versus leaving the guest to go to the host. Normally I click the keyboard to stop the character from repeating. I will try using the mouse to navigate when it happens to see if the repeat continues.

comment:15 by kjoyce, 9 years ago

If the issue occurs on the virtualbox guest, any key or mouse click stops it from repeating. Since I can't really reproduce at will (it happens frequently but not based a set of steps) I can't run in a vm window. I run in full screen so I can only use the mouse to switch to the host by selecting the virtualbox menu on the toolbar.

Let me know if there is anything else you wanted me to try.

comment:16 by Mihai Hanor, 9 years ago

Does it stop repeating when you click inside the guest OS? Or just the mini-toolbar? Do you type intensively inside the guest when the issue is triggered?
So you don't have the wrong expectations, you should know that I don't work at Oracle and I'm not a software developer, but I've managed to help a few times.

Last edited 9 years ago by Mihai Hanor (previous) (diff)

comment:17 by kjoyce, 9 years ago

It only happens inside the guest OS. This is where I am typing when it happens. I only work on the guest in full screen mode. I am working in the guest the majority of the time. I have not tried clicking the min tool bar, since I auto hide that and it is not readily available on the screen. I suspect clicking it will also stop the repeating key. Typically any mouse click or keyboard click resolves the issue.

comment:18 by kjoyce, 9 years ago

Any additional updates or information needed for this?

It would be nice to get it resolved.

comment:19 by RickCHodgin, 9 years ago

I'm using VirtualBox 4.3.26 r98988 on a Linux Mint 17 AMD-based 64-bit host, running a Windows Sever 2003 32-bit guest.

This has been happening to me for several weeks as well. It took me a while to figure out what the cause was because at first I thought it was an issue with Visual Studio. But periodically I see the behavior in other software as well.

In summation, I have observed when I'm in an app and I press the Shift+Down arrow (so as to select a block of text for the clipboard), the fact that it is rendering the text in real-time in a WYSIWYG causes the key to stick even after I let it go. Sometimes it will scroll 10 lines, most times it scrolls to the end of the document (sometimes more than 1,000 lines further down), which is the point at which it ultimately stops drawing the WYSIWYG long enough to "recover" from whatever cycle it's trapped in causing the repeat.

It's very frustrating.

I've also noticed that other keys seem to be repeating when there are active UI updates, but only minimally. In Visual FoxPro, for example, there is a command called BROWSE which lets you look at a data set. This command can be typed in from the command window manually. After typing BROWSE and pressing Enter, VFP begins to bring up the BROWSE window. It takes a fraction of a second for the screen to physically render the browse window, but because there is some active UI time involved in updating the screen, the Enter key goes into that same loop and will repeat a few times (one to three) into the keyboard buffer, causing it to jump ahead in the window.

Likewise, when I press Escape to close the BROWSE window, again while redrawing the screen it repeats the Escape character a few times into the keyboard buffer so that after the BROWSE window is closed the keys in the keyboard buffer contain more Escape keystrokes which ultimately affect subordinate things.

Again, it is very frustrating as it periodically makes the VM unusable for anything with UI updates taking place when there are keystrokes. I have had to sit there for 10s of seconds at times waiting for it to scroll to the end of a several-thousand line file at the rate of however many keypresses per second my keyboard repeat rate is set to.

This is a significant enough issue for me that if it isn't resolved in the next release, I'm going to downgrade to a prior version which did not exhibit this behavior.

If there's anything I can provide, please let me know. Thank you for your help.

Last edited 9 years ago by RickCHodgin (previous) (diff)

comment:20 by Mihai Hanor, 9 years ago

Attach a Vbox.log file of one of your VMs with which you can reproduce the issue.

by RickCHodgin, 9 years ago

Attachment: VBox_log__RickCHodgin.zip added

comment:21 by RickCHodgin, 9 years ago

Attached.

FWIW, I can reproduce this behavior at will. I just need to open Visual Studio (2008 or 2010 is all I have, but it does the same in both) with a large source file (several hundred lines), then jump to some random location (line 100 for example), and begin pressing Shift+Down arrow to select the next 30 or 40 lines. You'll see that as you hold the Down arrow down to do this, when you begin to get to where you want to stop and release, it doesn't stop. It repeats continuously until the end of the file.

I can capture it into video if you'd like to see it. My screen is a 1920 x 1200 monitor, and I am running in full-screen mode (no scaling or windowed mode). I have two monitors on my machine, the other one is 1680 x 1050.

Best regards, Rick C. Hodgin

comment:22 by Mihai Hanor, 9 years ago

What do you do to stop the repeating key? Does it stop on its own? What is the CPU usage on the host and on the guest when you select/scroll the text in VS and when it repeats the key on its own? Isn't this a delayed reaction of the host or of the guest, due to keyboard buffering and CPU task overloading?

comment:23 by RickCHodgin, 9 years ago

I haven't been able to get it to stop when it's in Visual Studio. It either stops by itself within 10 lines or so (very rare, 1 out of 10 times), or it scrolls all the way to the end of the file at which point it stops redrawing and then breaks out of the loop by itself. Pressing other keys while it's in this scrolling mode seem to be ignored. They do not inhabit the keyboard buffer after it ultimately stops. Also, after it reaches the end of the file it takes 2 or 3 seconds before it then beings responding to keystrokes again. It's like it's still flushing them out of the buffer in that loop, catching up for all it was behind while it was doing the rendering (my guess).

comment:24 by RickCHodgin, 9 years ago

In other apps where there isn't so much UI, it seems to stop by itself having only inserted a few keystrokes, but if those keystrokes cause some additional UI that's when the cascade seems to happen where it won't stop.

comment:25 by RickCHodgin, 9 years ago

If you are having trouble reproducing this, I suggest underclocking your CPU down to 1.8 ghz or so, or install a slower video card, and then try again. I'm thinking it has to do with a saturated overhead in redrawing the UI which puts it into the loop because it seems to only repeat when it's otherwise busy drawing something.

Last edited 9 years ago by RickCHodgin (previous) (diff)

comment:26 by Mihai Hanor, 9 years ago

This sounds like the CPU is not able to cope with the load, while the guest OS or the guest app is buffering the keyboard input (or maybe the host OS or VirtualBox). Just look at the host/guest CPU usage while you're reproducing the problem. You can also disable 3D acceleration support, see if that improves the guest's reaction.

comment:27 by kjoyce, 9 years ago

I am not sure the issue being reported by RickCHodgin in this ticket is the same. I am not using any app that is heavy in UI. I see the problem when I am typing in anything from Outlook to notepad or pspad. While the problem may be similar in result. My problem will not stop by itself. If the delete key is the repeating key it will delete all the information in the window. If it is an enter/return key, it will repeat until I hit another key.

The problem I am reporting has been happening for many versions on VirtualBox. I had been watching the previous topics and did not create a ticket until my update was deleted from the previous forum. Going back to a previous version of VirtualBox does not correct my issue I am reporting.

comment:28 by RickCHodgin, 9 years ago

It has not happened before these recent VirtualBox releases on this same computer and VM. I will try the setting changes.

comment:29 by RickCHodgin, 9 years ago

It is still doing the same. I'll try disabling 2D accelerations.

comment:30 by RickCHodgin, 9 years ago

Turning off 2D acceleration fixes the problem.

comment:31 by kjoyce, 9 years ago

Must not be the same issue. I do not have 2D or 3D acceleration enabled on my vm.

Last edited 9 years ago by kjoyce (previous) (diff)

comment:32 by RickCHodgin, 9 years ago

Probably not, kjoyce. I am just glad to have it fixed. :-)

comment:33 by RickCHodgin, 9 years ago

One other thing I've noticed in the past few versions is that Alt+Mouse left click is not being passed along to the VM guest properly. Have you seen that behavior, kjoyce? If you have Visual Studio, pressing Alt+Mouse left click allows you to select a vertical column. That behavior has been completely inoperable in the past several versions of VirtualBox.

comment:34 by kjoyce, 9 years ago

Seems like you commandeered my issue. :) I wish I could get my issue resolved. It is annoying when the delete key repeats when you are in you email and it deletes all the emails and now you have to go through your delete folder to try to recover them since they have random dates.

comment:35 by Michael Thayer, 9 years ago

Would it be possible for the people experiencing this issue (please open a second one for Alt+Mouse, but the same applies there) to try different versions of VirtualBox 4.3[1] to find out when this first started?

[1] http://download.virtualbox.org/virtualbox/

comment:36 by kjoyce, 9 years ago

Is anyone looking into the original problem reported in this ticket? I was getting some feedback initially but then the issue went silent. However the problem still exists and there is no workaround for it that I have found.

comment:37 by Michael Thayer, 9 years ago

Short answer: not yet, mainly due (on the VirtualBox team at least, we more than welcome external contribution to this) to lack of time on the part of anyone with the necessary knowledge. Answering comment 35 would increase the chances of someone looking at it, though due to said high load I wouldn't want to get your hopes up too much.

comment:38 by kjoyce, 9 years ago

Since comment 35 is not related to the original problem reported in the issue. It should not delay this issue in being looked at.

If RickCHodgin logs a separate ticket the "Alt+Mouse left click" could be looked at in that ticket.

This ticket was regarding repeating keys when the user is not holding a key down.

comment:39 by Michael Thayer, 9 years ago

I only mentioned "Alt+Mouse left click" in comment 35 to ask RickCHodgin to open a separate ticket for it. The rest of the comment is related to the issue already under discussion in this ticket.

Once again (regarding the original issue): Would it be possible for the people experiencing this issue to try different versions of VirtualBox 4.3[1] to find out when this first started?

comment:40 by kjoyce, 9 years ago

The problem has been happening for over a year. During that time I have been updating to the latest version of VirtualBox with every new release to see if the problem was fixed. I was previously monitoring an old discussion about the same problem in https://forums.virtualbox.org/viewtopic.php?f=8&t=55373&sid=5dede60332149c70efbe3c8be4fcfd97&p=313722#p313722 but it was suggested to open a ticket for the issue.

So I opened a ticket.

comment:41 by Mihai Hanor, 9 years ago

Michael is asking you to check which is the last version that works for you, free of the issue you've having, from the older 4.3 releases. Michael is a VirtualBox developer, you should do what he asked. Nothing can be done if the issue can't be reproduced or if it can't be attributed to some particular change in the VirtualBox source code. I personally think it's not a VirtualBox issue, since you can stop the repeating of the key by mouse clicking inside the guest, while the guest input is already grabbed. You haven't said if the issue occurs when the guest is not running full screen. You could try working with it in a maximized window.
The only other situation of a key repeating itself I've encountered was when I used a debug build, with high VM overhead, when the VM was lagging and pressing a key resulted in delayed processing of the key up event, which triggered key repeating, limited in the number of key repeats, for some of the key presses.

Last edited 9 years ago by Mihai Hanor (previous) (diff)

comment:42 by kjoyce, 9 years ago

I have had this system (Dell M4800 i7 4900MQ 32 GB memory) since July 2014 and running VirtualBox on it with every current version of VirtualBox during that time period. All of them have had the issue. None are better than any other. There is only 1 VM on the system, always run in full screen mode. The key repeats until another key is hit. Switching windows in the VM using the mouse makes the problem active in the other window.

I would be happy to try a debug anything to try to debug this. The old system running the same vm was a Dell E6530 i7-4710mq (I believe) 8gb of memory. That system never showed the problem.

I never have the problem with the host system, only the vm.

Let me know if there is anything else needed.

comment:43 by Michael Thayer, 9 years ago

You could still try a few different versions (e.g. 4.3.0, 4.2.28, 4.2.0) to see if they are all affected.

comment:44 by kjoyce, 9 years ago

I can try some of the older versions if it will be useful. It is a bit of a pain to do this but if it will be useful I am willing to give it a try. Ami I going to run into any compatibility issues trying to use a VM that is currently running 4.3.26 r98988. I want to make sure the VM can be used wth the older VirtualBox version and then used again in 4.3.26 r98988 once the testing is over.

comment:45 by Michael Thayer, 9 years ago

Sorry for the slow answer, I wanted to check a couple of things first. If you install an older version of VirtualBox, any virtual machines which you do not start will not be changed at all, and will stay in place until you re-install the newer version again. Ones which you do start will have small settings changes which should not be a problem, but if you want to be absolutely sure, export the machine which you want to test and re-import it with a new name. Make sure you test the newly imported machine with the current version first (before installing the older VirtualBox version) to be sure that it still has the problem you are seeing.

Hope that was clear.

comment:46 by kjoyce, 9 years ago

I have gone back as far as 4.2.0 r80737 with the VirtualBox Guest additions of the same version. They all show the same problem of repeating keys. I tried the suggested versions 4.3.0, 4.2.28, 4.2.0 going from the current version and working backwards.

Let me know if anything else is needed? I am still at version 4.2.0 r80737 if anything is needed from that version.

comment:47 by Michael Thayer, 9 years ago

No, probably no value in staying with an old version, since we now have the information we were looking for - that is is sadly not a regression, so we can't find the problem just by looking for the version where it first appeared. Sadly that means that we will probably not be able to investigate at the moment. If you feel up to investigating yourself I can certainly give you some pointers, but that would probably mean that you would need to be able to change the programme code yourself. You might still try to check whether it is some problem with your host system as most people do not seem to have this problem (I am waiting to be corrected here...) and you might also see if it happens in a Linux guest. You might also try enabling additional logging as described in ticket:11737:4 to see (more or less) what the host is sending to the virtual machine, though you will need some understanding of how PC keyboards are handled to make sense of it.

comment:48 by kjoyce, 9 years ago

If you want to provide any pointers that would be great but I am not a developer so I won't be able to make any changes to code or recompile any files. I will try the logging in https://www.virtualbox.org/ticket/11737#comment:4 to see if it provides any additional information.

I don't think it is an issue with the host. I have never seen a repeating key on the host. Only on the guests.

comment:49 by Klaus Espenlaub, 9 years ago

Since this seems to be still an issue which no one but you is experiencing, I can't do much more than proposing a bit more config tweaking. Since it's about keyboard issues, there's a slight chance that switching from the (default) PS/2 keyboard emulation to the USB one will help. (No, this has nothing to do with your actual keyboard, it's exclusively about what the guest OS inside the VM will see.)

The following command (it is assumed that the VM is shut down) switches to USB keyboard:

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm "Dell - BMC_Win7" --keyboard usb

The following command switches back to PS/2 keyboard:

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm "Dell - BMC_Win7" --keyboard ps2

Unfortunately you're on Windows host which needs quite a bit of manual work to get the Python support going (as Python isn't installed by default), otherwise I would've asked for doing some "keyboard event sniffing", which would give hints if the key release event was dropped by the VirtualBox GUI or by the guest OS. Let's keep this as an option for later.

comment:50 by dmoebius, 9 years ago

Sorry for reviving this 3 months old ticket, but I found a reliable way to reproduce this issue:

Host: Arch Linux (64bit, up-to-date)
Virtual Box: 5.0.2 OSE r102095
Guest: Windows 7 (32bit)
Guest additions: 5.0.2 r102096

To reproduce:

  • Open any Excel sheet
  • Hold down the "Down" key for about three seconds, then release it.

The "Down" key repeats forever, causing Excel to scroll down continuously. Furthermore I see no way to stop this process, e.g. by pressing another key. Instead, the whole VirtualBox windows becomes unresponsive. I cannot even invoke the system/device menu. Ctrl keys do not work anymore. The complete window is blocked. The only option is to kill the window and the process.

I don't think this is an Excel problem, because it stalls the whole VM including the VirtualBox system menu, not only Windows.

I can confirm that disabling 2D acceleration helps. When disabled the problem doesn't surface.

comment:51 by brfcnt, 8 years ago

Just found this ticket and everything kjoyce reports is happening to me too. It happens, at least for me, in three computers of the same model (Dell Latitude 3550) and only when using the integrated keyboard. The error dissapears when using USB keyboards, though I could only test it with two models (Dell and HP). All of the computers are running W7 64 bit Host and XP/W7 32 Guests. As kjoyce said, this problem can only be replicated writing inside the guest, and it happens both under heavy and light CPU loads, different applications and with the pressing of any key.

The issue seems to be different from dmoebius', and disabling 2D acceleration won't solve it.

At some point I realized it was far more common in some occasions, like when slapping Space or Enter at the end of a word or paragraph, so I tested it and sure enough, I can replicate the issue easily with quick taps of any key or type for hours with firm, deliberate presses without a hitch.

Let me know if you'd like me to send you some kind of log o test it some more.

comment:52 by Kris Thielemans, 4 years ago

This regularly happens on my laptop with Windows 10 Home as host, Ubuntu 18.04 (or other versions) as guess. It happens mostly when the guest is busy running background tasks. It happens even when typing in the terminal of the guest OS.

In my case, it's just that some characters get repeated a few times (e.g. 5 or 10 or ...). It's kind of hard to say if the repeat would go on indefinitely until there's another keypress as in the original post, but I don't think so. There is normally no lag in the response keyboard, but under heavy load, there is of course, so I guess it's likely that the lag and repeat are related.

I am currently running VBox 6.1.4, but this problem has been occurring for me already since quite a while (I just never searched nor this ticket!).

comment:53 by Kris Thielemans, 4 years ago

I've found that the repeats do stop automatically in my case. I've resolved this problem by increasing the delay for auto-repeat in the ubuntu guest OS.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use