VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
1 2 Previous Next 27 Replies Last post: Jul 23, 2009 5:29 AM by GreggaryPecca…  

VMware Causing Keyboard Issues in Ubuntu posted: Jun 4, 2008 5:42 PM

Click to view BassKozz's profile Enthusiast 53 posts since
Dec 17, 2007
Well, this issue has been going on for a long time now, but I wasn't sure it was a VMware issue up until recently (I thought it was my KVM, then I thought it was the Keyboard, Then I thought it was Ubuntu... But nope it's a VMware issue), and I was hoping VMware or Ubuntu would've come out with a fix for this, but unfortunately I haven't seen any changes.

So the problem is that after running VMware my keyboard (at random intervals) starts demonstrating odd behavior. For Example; The "Shift", "CTRL", "ALT", "CAPS LOCK" keys stop working all together, and when I am on an Ubuntu window as soon as I type in a character the window will close itself, and the only way to (temporarily) remedy the issue is to go to Applications => Other => Keyboard Layout (in Ubuntu) and reset the keyboard layout. This will only temporarily fix the issue until it happens again. I haven't been able to pin point an exact time frame on when this occurs because it is so random. My thinking is that because I am on a Dual Monitor Display setup and the VMware tools are installed on both machines (some times I run multiple VM's at the same time and switch back and forth between them on my dual monitors), there might be a conflict there, while I am switching back and forth by gliding my mouse from one monitor to another if they are both running VM's with VMtools installed. I haven't tried uninstalling VMtools on the VM's yet, but that will be my next shot-in-the-dark, unless I can get some feedback here.


Also I have documented this on Ubuntu's Forums:
SCIM / Keyboard Layout Issues
Broken Shift & CAPS LOCK keys - SCIM
My KVM Breaks Input Devices


Any/All feedback will be greatly appreciated,
-BassKozz


---
VMware Workstation v6.0.4 build-93057
Host OS: Ubuntu 8.04 64-bit

Re: VMware Causing Keyboard Issues in Ubuntu

1. Jun 4, 2008 9:31 PM in response to: BassKozz
Click to view RuralRob's profile Enthusiast 38 posts since
Jun 8, 2007
See also this thread:

Shift key (and caps lock) stop working when using VMWare

This bug is happening on many different distros, Gnome and KDE, 32-bit and 64-bit, and various hardware configurations. The two things common to all of them are VMware (Workstation, Player, or Server) and Xorg 7.3. This seems to be some kind of bad interaction between the two, when VMware is grabbing or releasing control of the mouse and keyboard. Older distros running Xorg 7.2 don't seem to have the problem.

Re: VMware Causing Keyboard Issues in Ubuntu

2. Jun 5, 2008 1:41 AM in response to: RuralRob
Click to view andy.t's profile Novice 10 posts since
Mar 18, 2008

i was about to dump kubuntu due to the below, which has sufficiently p'ss]d me off now. i have tried gutsy, hardy and feisty on an amd64 with both workstation6 and 6.5 but all the same thing.

can anyone confirm whether the same thing happens in ubuntu server lts or rhle5 because these distros are supposed to be 100 percent supported


Re: VMware Causing Keyboard Issues in Ubuntu

3. Jun 5, 2008 4:19 AM in response to: andy.t
Click to view Peter_vm's profile Guru 9,058 posts since
Feb 1, 2006
Read this doc to find out what IS supported.
http://www.vmware.com/pdf/GuestOS_guide.pdf

Re: VMware Causing Keyboard Issues in Ubuntu

4. Jun 5, 2008 5:19 AM in response to: Peter_vm
Click to view andy.t's profile Novice 10 posts since
Mar 18, 2008

Excellent document, thanks Peter. I have been looking for a support matrix guide for ages, but in all honesty have been struggling somewhat. I find the site a little tricky to navigate and find anything. I'm also fairly frustrated with the design of the members login area, but that's another story :)

Do you happen to know if there is an equivalent document for the supported host systems? or is it the same?


Re: VMware Causing Keyboard Issues in Ubuntu

5. Jun 5, 2008 7:45 AM in response to: andy.t
Click to view Peter_vm's profile Guru 9,058 posts since
Feb 1, 2006
For supported host systems you have to look at admin manuals and product release notes.
There is no single, up-to-date document on that.

Re: VMware Causing Keyboard Issues in Ubuntu

7. Jun 5, 2008 2:55 PM in response to: BassKozz
Click to view RuralRob's profile Enthusiast 38 posts since
Jun 8, 2007
I don't think it's the VMware Tools that are causing the problem, so much as they expose the real issue, which is the automatic releasing of the mouse and keyboard when the cursor leaves the VM window. Without the tools installed, the automatic release isn't supported, so it never gets a chance to cause the problem.

We've got threads going in VMware and Unbuntu forums, but I think we also need to start one in the X-org support forum. I did a quick search in there and I don't see anything about this problem.

Re: VMware Causing Keyboard Issues in Ubuntu

9. Jun 5, 2008 5:20 PM in response to: BassKozz
Click to view RuralRob's profile Enthusiast 38 posts since
Jun 8, 2007
I only use the quick-switch UI mode, never full screen, and I get the issue there. So far I've never seen it happen in the "normal" UI mode, but it definitely happens in quick-switch.

Re: VMware Causing Keyboard Issues in Ubuntu

11. Jun 17, 2008 4:41 AM in response to: BassKozz
Click to view ager-wick's profile Lurker 2 posts since
Apr 13, 2006

This is a crosspost with comment 127 and 128 here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/195982

I did this crosspost because I have discovered very specific steps on how to reproduce the issue that might be important for debugging. I will also be able to test patches or provide more information to interested parties.

Yet another report, but I can reproduce it and have some interesting observations.

HP Compaq nx6325 running Kubuntu Hardy (8.04) running KDE3
uname -a:
Linux 2.6.24-18-generic #1 SMP Wed May 28 19:28:38 UTC 2008 x86_64 GNU/Linux
VMware Server 1.0.6 build-91891
xserver-xorg 1:7.3+10ubuntu10
xserver-xorg-core 2:1.4.1~git20080131-1ub
(by the way, you can get the above from the command "dpkg -l")
graphics card: ATI Radeon
driver: ati

Interestingly I also had the issue on this machine running Dapper and VMware server a year ago, which I guess rules out xserver 7.3. It disappeared when I stopped using VMWare. At that time I though it was triggered by excessive memory usage, as I only had 1GB but now I have 3GB and only using just over 2.
I believe my old setup was VMware-server-1.0.5-80187 and Kubuntu Dapper (6.06?) i386 (not AMD64). The old setup compiled perfectly, both vmware host and tools.
On my current setup I had to apply vmware-any-any-update117 to get the VMware host to compile, and open-vm-tools-2008.04.14-87182 to get the VMware tools to compile. I had the issue both before and after I got VMware tools properly installed.

I also have the annoying keyboard auto-repeat issue (while typing in the VM, sometimes (or, quite often actually) your keystrokes will be repeated).

steps to reproduce:
NOTE: I have put a lot of time into reproducing exactly the steps needed. The following is the bare minimum of what I need to do to reproduce it. Anything else is irrelevant (in my case). For example, it works fine if I switch to full screen without first clicking inside the VM.

  • have a vm running
  • switch to vmware
  • move the mouse into and click inside the vm
  • press ctrl-alt-enter to make it full screen
  • press ctrl-alt to revert back to windowed mode
now the problem is there:
ctrl and caps/num/scroll lock does not work
the alt key, including alt-tab works, but when pressing alt-tab it does not release the alt key, meaning i have to press any other key, or tab without alt, to actually switch to another program. It's like I am till holding the alt key.
I do not however have the unstability issue. I can continue running anything I want, so it's easy for me to test various proposed solutions.
Note: I can not reproduce it by holding the ctrl key while moving the mouse from the guest to the host

both of these methods can be used as workaround, reverting the effect of the issue:
  • running setxkbmap
  • running System Settings - Regional & Language - then selecting Enable keyboard layouts and applying the changes (or if it's already enabled, disable it - apply - then enable and apply)

Interesting things from /etc/X11/xorg.conf
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "gb"
EndSection
Section "Device"
Identifier "Configured Video Device"
EndSection

When it's working fine, I get this output from xmodmap:
xmodmap: up to 2 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), Meta_L (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)

When it's buggy, I get this output:
xmodmap: up to 1 keys per modifier, (keycodes in parentheses):

shift
lock
control
mod1
mod2
mod3
mod4
mod5

As I can easily reproduce it, anyone with ideas are encouraged to suggest them, and I will try it to see it if will solve the issue.

Another observation:

It can also be reproduced this way:
click inside the VM
hold any of Shift, Ctrl or Alt keys down while moving the mouse out of the VM window

Note: If I switch to the VM by simply alt-tabbing to it, then pressing Ctrl-Alt-Enter to full screen it, then Crtl-Alt to release, I do not get this problem. It only occurs when I:
1. Click inside the VM and
2. Hold any of the Ctrl, Alt and/or shift keys while releasing the keyboard/mouse to the host OS (which you obviously do when you press Crtl-Alt to revert back to windowed mode, as the cursor is then released from the VM).


Re: VMware Causing Keyboard Issues in Ubuntu

12. Jun 17, 2008 4:42 AM in response to: BassKozz
Click to view ager-wick's profile Lurker 2 posts since
Apr 13, 2006
This is a crosspost with comment 127 and 128 here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/195982

I did this crosspost because I have discovered very specific steps on how to reproduce the issue that might be important for debugging. I will also be able to test patches or provide more information to interested parties.

Yet another report, but I can reproduce it and have some interesting observations.

HP Compaq nx6325 running Kubuntu Hardy (8.04) running KDE3
uname -a:
Linux 2.6.24-18-generic #1 SMP Wed May 28 19:28:38 UTC 2008 x86_64 GNU/Linux
VMware Server 1.0.6 build-91891
xserver-xorg 1:7.3+10ubuntu10
xserver-xorg-core 2:1.4.1~git20080131-1ub
(by the way, you can get the above from the command "dpkg -l")
graphics card: ATI Radeon
driver: ati

Interestingly I also had the issue on this machine running Dapper and VMware server a year ago, which I guess rules out xserver 7.3. It disappeared when I stopped using VMWare. At that time I though it was triggered by excessive memory usage, as I only had 1GB but now I have 3GB and only using just over 2.
I believe my old setup was VMware-server-1.0.5-80187 and Kubuntu Dapper (6.06?) i386 (not AMD64). The old setup compiled perfectly, both vmware host and tools.
On my current setup I had to apply vmware-any-any-update117 to get the VMware host to compile, and open-vm-tools-2008.04.14-87182 to get the VMware tools to compile. I had the issue both before and after I got VMware tools properly installed.

I also have the annoying keyboard auto-repeat issue (while typing in the VM, sometimes (or, quite often actually) your keystrokes will be repeated).

steps to reproduce:
NOTE: I have put a lot of time into reproducing exactly the steps needed. The following is the bare minimum of what I need to do to reproduce it. Anything else is irrelevant (in my case). For example, it works fine if I switch to full screen without first clicking inside the VM.
  • have a vm running
  • switch to vmware
  • move the mouse into and click inside the vm
  • press ctrl-alt-enter to make it full screen
  • press ctrl-alt to revert back to windowed mode
now the problem is there:
ctrl and caps/num/scroll lock does not work
the alt key, including alt-tab works, but when pressing alt-tab it does not release the alt key, meaning i have to press any other key, or tab without alt, to actually switch to another program. It's like I am till holding the alt key.
I do not however have the unstability issue. I can continue running anything I want, so it's easy for me to test various proposed solutions.
Note: I can not reproduce it by holding the ctrl key while moving the mouse from the guest to the host

both of these methods can be used as workaround, reverting the effect of the issue:
  • running setxkbmap
  • running System Settings - Regional & Language - then selecting Enable keyboard layouts and applying the changes (or if it's already enabled, disable it - apply - then enable and apply)

Interesting things from /etc/X11/xorg.conf
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "gb"
EndSection
Section "Device"
Identifier "Configured Video Device"
EndSection

When it's working fine, I get this output from xmodmap:
xmodmap: up to 2 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), Meta_L (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)

When it's buggy, I get this output:
xmodmap: up to 1 keys per modifier, (keycodes in parentheses):

shift
lock
control
mod1
mod2
mod3
mod4
mod5

As I can easily reproduce it, anyone with ideas are encouraged to suggest them, and I will try it to see it if will solve the issue.

Another observation:

It can also be reproduced this way:
click inside the VM
hold any of Shift, Ctrl or Alt keys down while moving the mouse out of the VM window

Note: If I switch to the VM by simply alt-tabbing to it, then pressing Ctrl-Alt-Enter to full screen it, then Crtl-Alt to release, I do not get this problem. It only occurs when I:
1. Click inside the VM and
2. Hold any of the Ctrl, Alt and/or shift keys while releasing the keyboard/mouse to the host OS (which you obviously do when you press Crtl-Alt to revert back to windowed mode, as the cursor is then released from the VM).

Re: VMware Causing Keyboard Issues in Ubuntu

14. Jun 20, 2008 5:07 AM in response to: BassKozz
Click to view jra_vm's profile Novice 6 posts since
Oct 1, 2007
Ok, I tried this "trick". No change for me.

Anyway, the v-scancodes are available here: http://www.vmware.com/support/ws55/doc/ws_devices_keymap_vscan.html
(v-scancodes are the hexadecimal numbers on the right)

For further explanations: http://www.vmware.com/support/ws55/doc/ws_devices_keymap_linux_longer.html

On my Thinkpad, I still have the same result: the modifier keys aren't mapped anymore as soon as I enter VMware in fullscreen or use the alt/shift/control key into the console, etc.

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities