Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archlinux After qemu and kernel upgrade I lost virtio-vga support #24

Closed
tombombadilom opened this issue Sep 3, 2021 · 6 comments
Closed

Comments

@tombombadilom
Copy link
Collaborator

tombombadilom commented Sep 3, 2021

After qemu and kernel upgrade I lost the virtio-vga support

too bad everything was going perfectly fine with mac os x

[tom@tomPC mac-on-linux-with-qemu]$ ./launch-macos.sh
qemu-system-x86_64: -drive if=pflash,format=raw,readonly,file=packaged-firmware/OVMF_CODE.fd: warning: short-form boolean option 'readonly' deprecated
Please use readonly=on instead
qemu-system-x86_64: -device virtio-vga,virgl=on: Property 'virtio-vga.virgl' not found

dmesg | grep drm did not return pci:virtio-vga and in kernel virtio drivers it cannot be found either.

[tom@tomPC /lib/modules/5.13.13-arch1-1/kernel/drivers/virtio$ ls
virtio_balloon.ko.zst  virtio_input.ko.zst  virtio_mmio.ko.zst  virtio_pci_modern_dev.ko.zst
virtio_dma_buf.ko.zst  virtio_mem.ko.zst    virtio_pci.ko.zst   virtio_vdpa.ko.zst

normaly there should be no problem has I have this enabled

[root@tomPC tom]# zgrep VIRTIO /proc/config.gz
CONFIG_BLK_MQ_VIRTIO=y
CONFIG_VIRTIO_VSOCKETS=m
CONFIG_VIRTIO_VSOCKETS_COMMON=m
CONFIG_BT_VIRTIO=m
CONFIG_NET_9P_VIRTIO=m
CONFIG_VIRTIO_BLK=m
CONFIG_SCSI_VIRTIO=m
CONFIG_VIRTIO_NET=m
CONFIG_VIRTIO_CONSOLE=m
CONFIG_HW_RANDOM_VIRTIO=m
CONFIG_DRM_VIRTIO_GPU=m
CONFIG_SND_VIRTIO=m
CONFIG_VIRTIO=y
CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS=y
CONFIG_VIRTIO_PCI_LIB=m
CONFIG_VIRTIO_MENU=y
CONFIG_VIRTIO_PCI=m
CONFIG_VIRTIO_PCI_LEGACY=y
CONFIG_VIRTIO_VDPA=m
CONFIG_VIRTIO_PMEM=m
CONFIG_VIRTIO_BALLOON=m
CONFIG_VIRTIO_MEM=m
CONFIG_VIRTIO_INPUT=m
CONFIG_VIRTIO_MMIO=m
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
CONFIG_VIRTIO_DMA_SHARED_BUFFER=m
CONFIG_RPMSG_VIRTIO=m
CONFIG_VIRTIO_FS=m
CONFIG_CRYPTO_DEV_VIRTIO=m

here are my libs versions

[tom@tomPC mac-on-linux-with-qemu]$ pacman -Qs '^(linux|mesa|qemu|virglrenderer|libepoxy)$'
local/libepoxy 1.5.9-1
    Library handling OpenGL function pointer management
local/linux 5.13.13.arch1-1
    The Linux kernel and modules
local/mesa 21.2.1-1
    An open-source implementation of the OpenGL specification
local/qemu 6.1.0-1
    A generic and open source machine emulator and virtualizer
local/virglrenderer 0.9.1-1
    A virtual 3D GPU library, that allows the guest operating system to use the host GPU to accelerate 3D rendering

I wonder if there is something that i am missing ? if I have to downgrade version for qemu and/or kernel. Or compile a modified kernel .

@tombombadilom
Copy link
Collaborator Author

tombombadilom commented Sep 3, 2021

virtio modules where not loaded at start by the kernel
I had to had a file for each module in /etc/modules-load.d/

[root@tomPC tom]# cat /etc/modules-load.d/*
kvm_amd
virtio
 virtio_gpu
virtio_net
virtio_pci

now I have those modules loaded

[root@tomPC tom]# lsmod | grep virtio
virtio_pci             24576  0
virtio_pci_modern_dev    16384  1 virtio_pci
virtio_net             61440  0
net_failover           24576  1 virtio_net
virtio_gpu             73728  0
virtio_dma_buf         16384  1 virtio_gpu
drm_kms_helper        294912  2 amdgpu,virtio_gpu
drm                   585728  12 gpu_sched,drm_kms_helper,amdgpu,virtio_gpu,drm_ttm_helper,ttm

But the problem remains: the module virtio-vga is not provided by my kernel :(

[tom@tomPC mac-on-linux-with-qemu]$ sudo modprobe virtio_vga
modprobe: FATAL: Module virtio_vga not found in directory /lib/modules/5.13.13-arch1-1
and i cannot start the vm through the GPU
qemu-system-x86_64: -device virtio-vga,virgl=on: Property 'virtio-vga.virgl' not found

@tombombadilom
Copy link
Collaborator Author

I have downgraded to linux-lts 5.10.61 but still no virtio-vga . this doesn't seem to be a kernel module ...

@tombombadilom
Copy link
Collaborator Author

so after downgrading linux , I finally downgraded qemu from version 6.1.0-1 to version 6.0.0-1 and it finaly fixed the problem.
To resume qemu wasn't compilated with virtio-vga support in the last version.
I hope it can help others to get things working.

@arindas
Copy link
Owner

arindas commented Sep 3, 2021

Thank you for the update @tombombadilom

@finn-liebner
Copy link

There is no downgrade required, I also tried it on Arch Linux. With the latest version of qemu (6.1.0-5) virtio-vga works, but the command line parameters are different. The following change is necessary (I found this on Reddit):

virtio-vga,virgl=on
  virtio-vga-gl

There is also a notice that another parameter is deprecated, so I would propose the following change:

readonly
  readonly=on

@tombombadilom
Copy link
Collaborator Author

merged 2bf2284

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants