Fedora's graphical performance inside vm is really slow

If I run Fedora inside a vm with qemu/kvm with virtio graphics, the performance is so slow comparing to other distros, even moving windows lag a little.
For example, i can see videos in 4k60 in openSuse and Debian vms but with fedora more than half of frames are dropped, the difference is very huge.

Why is that? Can i solve this problem?

My guess is that you need to install codec for the video format you are playing.
If you run top do you see 100% CPU being used?

I think you’re right!

And I need to make one correction, openSuse also lags in youtube 4k60.

I did some testings and openSuse and Fedora lag at 4k60. While Debian and Fedora 34 don’t. I believe Fedora still included codecs in 34.

I tried to install the codecs of RPMFusion (ffmpeg and additional codecs), but it’s still the same issue. Also the same with openSuse with Packman codecs. I believe it’s some other package that i am missing. Do you know what package it may be?

CPU is not 100%

Thanks.

You might need to enable GPU Passthrough - so your virtual machine can access your graphics hardware and not only the cpu cycles you have assigned.

I have not done this and can’t remember the commands, but a quick search yielded GPU Passthrough Fedora · GitHub