VMware Communities
ajgringo619
Hot Shot
Hot Shot

Noticeable typing lag in Linux VM terminals since v16.2 upgrade on Linux host

Upgraded my EndeavourOS host to version 16.2 yesterday. Now I'm noticing a lag when typing in any VM terminal window - Arch, Ubuntu, openSUSE are experiencing the same thing. I'm using open-vm-tools, which has never been a problem before. I have not changed any settings on the VMs since their creations: 8GB RAM, 4GB vGPU, 8 vCPUs.

 

Anyone else seeing this? I haven't tried with my Windows 10 host yet (also on v16.2).

 

UPDATE: working great with Windows 10 (Home) host.

113 Replies
goldeneye_007
Enthusiast
Enthusiast

I've had a suspicion for awhile that it is a video driver problem. The fact that when glx gears runs it goes away dovetails with my observation that you can reduce lag by constantly moving the mouse which tells me it is an interrupt issue. I wonder if there is a video mode that can dumb it down enough to where the lag goes away? Like maybe running -nomodeset at boot time? Or perhaps reducing/increasing or matching to the host the video resolution of the guest? Just guessing at this point since its been awhile since I have run into the issue and don't have time at the moment to run tests.

0 Kudos
vmwareuser11321
Contributor
Contributor

Got the same issue. Looking at the log file, I see thousands of entries like these:


2023-09-29T13:09:15.244Z In(05) vcpu-0 VIDE: (0x170) Unexpected IN for cmd 0xa3 len 2
2023-09-29T13:09:15.244Z In(05) vcpu-0 VIDE: (0x170) Unexpected IN for cmd 0xa3 len 2
2023-09-29T13:09:15.244Z In(05) vcpu-0 VIDE: (0x170) Unexpected IN for cmd 0xa3 len 2
2023-09-29T13:09:15.244Z In(05) vcpu-0 VIDE: (0x170) Unexpected IN for cmd 0xa3 len 2

Does anyone else also have these entries?

0 Kudos
tbn-mm
Contributor
Contributor

That's what I'm doing now:

Start glxgears,
set Always on Top (no effect if not visible),
minimize to about 1 pixel.

Lag is gone. Costs a little bit of energy.

 

Here is a script, that can be placed at the end of ~/.profile

 

 

 

#!/bin/bash
# Name of this file must be "fixLag.sh" and chmod +x fixLag.sh
# Place it at ~/.profile for autostart after login.
# Run once: sudo apt-get install mesa-utils wmctrl
fixLagCount=$(pgrep fixLag | wc -l)
if [ $fixLagCount == 2 ]; then
  DISPLAY=:0 sleep 10 && pgrep glxgears || nohup glxgears -geometry 1x1+0+0 > /dev/null &
  nohup sleep 15 && wmctrl -r "glxgears" -b add,above &
fi

 

The script takes about 20 until fully started up. Requires also "Accelerate 3D graphics" in VMware settings

 

 

 

 Tested on Ubuntu 22.04

0 Kudos
goldeneye_007
Enthusiast
Enthusiast

Fairly certain at this point that it is a virtual video driver issue. Maybe it is polling for a power saving feature. Anyone played around with disabling power management features? The fact you can ssh into a machine indicates that there must be an advanced function in the desktop environments that is triggering it.

0 Kudos
JMA100
Enthusiast
Enthusiast

Using the nvidia control panel, I switched to performance mode and validated I was in a higher clock state for both the gpu and its memory.  It had no effect inside the virtual machine.

Goldeneye_007 - I'm not sure if you caught some of the earlier discussion - if you turn off GPU acceleration, then there's no lag in the GUI.  It appears to be specific to running with the "Accelerate 3d graphics" option on.  I do agree with you that it's related to the 3d accelerated code path in the vmware svga driver. 

I'm guessing it's interrupt related.  (I think someone else suggested that earlier in the discussion.)

0 Kudos
omglolwtf1337
Contributor
Contributor

Disabling VBS (Memory Integrity) in Windows completely fixed the issue for me. Guide how to make it - https://www.digitaltrends.com/computing/how-to-disable-vbs-windows-11/

VMWare 17.5

Host: Windows 11

Tested on 2 guests - ubuntu and debian based. 

0 Kudos
kasumi1
Contributor
Contributor

Hi thread,

I submitted a ticket to VMWare and they finally came up with a solution today, which seems to be working perfectly on my machine:

Add these to your .vmx:

keyboard.allowBothIRQs = "FALSE"
keyboard.vusb.enable = "TRUE"

And restart the VM. This works for me with VMware 17.5.0 and Kali rolling (KDE, Wayland).

Tags (1)
davidjbaird
Contributor
Contributor

So far I've applied these settings to 4 different Ubuntu-based (ubuntu and Mint) VMs on two different hosts (all of which exhibited the same symptoms), and so far it all seems to be working. I have also reconfigured my VMs to use more cores (16 on a 24-core host), enabled 3d graphics acceleration and reversed other mitigations that I had tried in the past, and everything still works as it should. So fingers crossed this is the magic sauce for this particular problem. Thanks so much for posting!

 

goldeneye_007
Enthusiast
Enthusiast

Well it only took two years for the answer if it's a true solution.

Absolutely shameful it took this long to get a result.

marbaa
Contributor
Contributor

Maan, that sloved problem on my computer also. Very cool.

 

Host: Fedora 38 KDE Wayland NVIDIA GPU

Guest: Ubuntu 22

edit: well, it worked just while. I made some OS packages update, vmware asked for compiling new kernel modules, and lag is back there, despite those two parameters are present in .vmx...

0 Kudos
mwb1100v
Enthusiast
Enthusiast

I only needed to add the following to solve the problem:

 keyboard.vusb.enable = "TRUE"

Thanks!

That setting tells the VM to use a virtual USB keyboard instead of PS2.  I don't know what the keyboard.allowBothIRQs setting does, but it seems I don't need it.

VMware Workstation 16.2.5 (don't think I'll bother with 17.x)
Host: Win 11
Guest: Linux Mint 20.3 (Ubuntu 20.04)

 

0 Kudos
JMA100
Enthusiast
Enthusiast

I tried the settings and no change for me, the keyboard lag is still there.

I google searched those settings - and they are discussed in this topic:
https://communities.vmware.com/t5/VMware-Workstation-Pro/Workstation-17-5-0-enhanced-keyboard-driver...

Seems to be a fix for a recent keyboard problem in VMware 17.5.0 where the keyboard stops working all together.  I'm glad I haven't ran into that one.

0 Kudos
davidjbaird
Contributor
Contributor

Sorry to hear you didn't have any luck with those settings. I still have not experienced keyboard lag in any of my VMs (Workstation 16.2.5 Pro) since applying them, so they have certainly had an effect for me. There are at least 4 other threads on this forum that talk about this kind of problem, so there may be more than one root cause. Perhaps some of the proposed solutions in those threads might work for you.

0 Kudos
JMA100
Enthusiast
Enthusiast

Since I'm still having the issue, I did another experiment.  I downloaded the ISO installs of ubuntu 23.10, kubuntu 23.10, xfce 23.10, manjoro gnome (latest), & manjoro KDE (latest.)

It turns out, you don't have to install the OS to experience the issue.  Just boot up the ISO and rather than clicking on install now, click on try OS without installing.  Open a shell and type something.  Installing open-vm-tools-desktop does not change the behaviour. 

My host environment is Ubuntu Mate 22.04. I created a VM with vmware player 17.5.1, have 3d acceleration turned on and gave the machine 18 GB of ram.  I made no adjustments to the vmx file, everything vanilla.    I'm able to duplicate the issue on ubuntu 23.10, xfce 23.10, and manjoro gnome.  The issue is not present on kubuntu 23.10 & manjoro KDE.

Not what I expected, but good that it's easily replicable.  Any ideas?

 

0 Kudos