Screen Stuttering in Virt-manager VMs

hashtaq

New Member
Credits
54
I hope whoever is reading this is doing well. The issue is that I am getting screen stuttering/lagging on some distributions when I run them as VMs using virt-manager. The issue occurs with distros like Fedora, Kali, and Manjaro. However, the VMs of Ubuntu and ParrotOS (I think it is based on Ubuntu) work fine and smoothly. The information regarding this topic is either scarce or not addressing the issue that I have.

I have a hunch that it has something to do with Spice. I have installed spice-vdagent on the guests but it hasn't helped. May be I am doing it wrong. But I found this in just one post on a debian forum linked below.
https://lists.debian.org/debian-user/2016/10/msg00199.html

Furthermore, I have also found that it can be due to missing virtio drivers on the guest machines. But I don't know how to use this information as it is unclear for me. The screen stutter increases with increasing the size of videos and is reduced when the size of the video is reduced, for example, full screen video stutters more than when the size of the video is reduced.

What can be wrong and what do I do about it? Thank you
 


f33dm3bits

Gold Member
Gold Supporter
Credits
9,101
If you are using QEMU/KVM the vm should already load the needed drivers from the kernel.
Code:
[[email protected] ~]$ cat /etc/redhat-release
Fedora release 33 (Thirty Three)

[[email protected] ~]$ lsmod | grep virt
virtio_balloon         28672  0
virtio_blk             20480  3
virtio_console         40960  2
virtio_net             57344  0
net_failover           20480  1 virtio_net
On your vm's you could try changing "Video QXL" to something different. I run QEMU/KVM with virt-manager under Arch and I don't have any problems with screen stuttering on my Fedora vm. Also what Desktop Environments do you run on the different vm's? I can imagine that lightweight Desktop Environments will run better than something like Gnome3.
 

hashtaq

New Member
Credits
54
Thank you for your reply. I am running virt-manager on ParrotOS as my host OS. This issue has started happening recently after I don't know which update. The VMs use to run fine before that. I have started running virtual machines after a long time again. But as I mentioned, Ubuntu and ParrotOS VMs work fine. The stutter so far is happening in Fedora33, Kali latest release, and Manjaro as they are the ones I am trying to run. I don't know about others.

The command lsmod | grep virt, I presume is the output of a guest machine?

Yes, I run QUEM/KVM with the default virt-manager settings. I was in doubt that it happens when using different desktop environments but I don't think that is the case. This happens in both Manjaro Gnome and XFCE, Kali with XFCE and Fedora with Gnome which are the default desktop environments on all these distros. I haven't tried KDE as I read on a forum that KDE has a problem that doesn't allow changing the screen resolution at all, a problem I faced. But if it were a problem with the desktop environment, then Ubuntu also uses Gnome but it works fine. ParrotOS with MATE also works fine.
 

f33dm3bits

Gold Member
Gold Supporter
Credits
9,101
The command lsmod | grep virt, I presume is the output of a guest machine?
Yes that was a guest machine. Thinking of it, since it's only on certain guest machines I wouldn't expect it to be a problem with your host. Could also have been an update on the guest machine? Try downgrading the kernels on the guest machines that are effected by the problem.
 

hashtaq

New Member
Credits
54
I have changed the display from QXL to virtio as you mentioned. It seemed to have fixed the problem for which I am thankful to you.

However, this does mean that there might be some problem with the QXL support in the guest machines. I searched on it and I found out that Ubuntu indeed has a drivers package already installed. This driver package for QXL is also available on other Debian based distros in the apt repository. But I don't know how to check if they are installed or not. But I would assume it isn't installed on other Debian based distros based on the information I found, hence, the stutter in Kali. I also tried to find out how to install QXL on Fedora and Manjaro, but I couldn't find the information I needed. For one, I couldn't find the drivers for Fedora and Arch as files or package available for Ubuntu or Debian. I believe this is why Ubuntu and ParrotOS, which is based on Ubuntu, don't have any screen stutter on default settings.
 

f33dm3bits

Gold Member
Gold Supporter
Credits
9,101
You can try installing the drivers on the guests.
Debian:
Code:
sudo apt-get install xserver-xorg-video-qxl
Fedora:
Code:
sudo dnf install xorg-x11-drv-qxl
Manjaro:
Code:
sudo pacman -S xf86-video-qxl
Afterwards reboot your guest machines.
 

hashtaq

New Member
Credits
54
Thank you very much for your help. I have installed these packages on the machines. It wasn't installed on Kali so I installed it. Kali works fine now. However, Fedora has the package already installed and so it makes no difference. I guess I will run it on virtio. I haven't checked Arch. I will install Arch as a machine and only then I can tell. But thankyou so much for your time.
 
Last edited:

Members online

No members online now.

Latest posts

Top