QEMU: How to increase VRAM allocation?

I'm having trouble allocating more VRAM to my QEMU virtual machine. Currently, I'm using the following command to launch my VM:

qemu-system-x86_64 -enable-kvm -boot menu=on -drive file=QEMU -m 2G -cpu host -vga virtio

Can anyone help me figure out how to increase the VRAM allocation in QEMU?

Solution by lnxtx@feddit.nl qemu-system-x86_64 [...] -vga qxl -global qxl-vga.vram_size_mb=128 -global qxl-vga.ram_size_mb=128

28 points · 8 comments · view on lemmy.world

8 Comments

lnxtx@feddit.nl · 7 pts · 1y (3 replies)

Not sure, but maybe the QXL driver will help:

qemu-system-x86_64 [...] -vga qxl -global qxl-vga.vram_size_mb=128 -global qxl-vga.ram_size_mb=128
proxy@sh.itjust.works · 3 pts · 1y (2 replies)

It's an improvement, but 500MB+ would be perfect.

lnxtx@feddit.nl · 4 pts · 1y (1 reply)

Replace the value 128 to 512. And try again :)

proxy@sh.itjust.works · 4 pts · 1y

I was under the impression that QXL driver were capped at 256MB too, thanks.

InverseParallax@lemmy.world · 6 pts · 1y (4 replies)

Vga is fixed iirc, the original frame buffer was tiny, the emulated one gives you 16mv

Cirrus logic gives you 16mb too iirc, then you can use other drivers that give you more,

https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/

proxy@sh.itjust.works · 3 pts · 1y (1 reply)

If I'm reading correctly, there isn't a modern GPU driver for QEMU that supports customizing VRAM?

InverseParallax@lemmy.world · 4 pts · 1y

Qxl does, it's fairly modern.

Otherwise you have virtio and virglrenderer, which are as modern as it gets this side of pcie pass through or intel's sriov.

proxy@sh.itjust.works · 2 pts · 1y

Thanks the list is very useful.

proxy@sh.itjust.works · 1 pts · 1y
[ removed ]