Friday, February 6, 2009

VMware update: Keyboard repeat problem solved

Well, playing around with VMware some more, I have discovered some issues which I have been working on fixing.

One is that the CentOS 5.2 guest had some issues with the keyboard repeat rate being inconsistent. This problem made the system nay-to-impossible to be productive on. After much struggle, and extensive Google searching, and trial and error, I found the solution was to add some parameters to the guest kernel:

divider=10 clocksource=acpi_pm

Edit /etc/grub.conf and add these two parameters to all of the lines marked kernel. Next, reboot the guest OS.

Once I did this, the issue seems to have gone away (knock on wood).

The other issue is with stuttering sound when playing a mp3 in the Windows guest OS. This issue does not appear to affect all applications; I was able to talk to my girlfriend over SkyPE in a Windows guest OS for an hour last night without any stuttering.

I haven't found a solution to this issue yet; some people indicate that VMware player 2.0 doesn't have this issue, so I will see if I get get better results from VMware player 2.0.5 instead of 2.5. I will let people know if I can resolve the Windows sound issue; my gut instinct is that this is caused by Linux, since sound in Linux is a bloody mess.

Update: The sound problem doesn't exist when using Windows XP as a host. So, this is a Linux-specific problem. Did I mention that the sound is a lot quieter in Linux than it is in Windows on the same machine? Linux sound is a disaster; until basic desktop functionality like sound works, Linux will stay in the server back room.

Second update: OK, after much prodding around on the internet, I found some useful information over at Sanbarrow.com. I added the following to the .vmx file for my Windows XP virtual machine, and it appears to resolve the issue:

sound.virtualDev = "es1371"
sound.highPriority = TRUE
sound.buffering = "10000000000.0"
sound.copyDelayFactor = "1000000.0"
sound.directSound = "false"
sound.ignoreOverflows = "true"
sound.maxLength = "2048"
sound.smallBlockSize = "1024"
sound.virtualrealcorrection = "10000000000.0"
pciSound.priorityBoost = "true"

As a related issue, adding this to /etc/vmware/config resolves the keyboard issue, and appears to be the best fix:

xkeymap.nokeycodeMap = true

Final update: The reason why I didn't have any problems with Skype last night is because I was using a USB headset. When a USB headset is connected to a guest OS, the guest OS talks directly to the USB headset and doesn't use the host's sound card, so the stuttering problems don't exist when using a headset.

Indeed, it's possible to have one guest play a song or what not while another guest plays sound through the USB headset at the same time.