Librem5 SDK on QEMU - slow graphics

Hiya, I’m setting up software development environment for Librem5 using qemu and using daily build (gcow2 image). It runs, however graphic is terribly slow, dragging lock-screen slider is a slide show (pun intended), screen refreshes like once in 5-10sec during this. Should i tweak somehow video emulation to make it more responsive? Tried in linux and on windows (on windows it’s even worse). Using standard commandline from the manual:
qemu-system-x86_64 -boot menu=on -drive file=qemu-x86_64.qcow2,format=qcow2 -vga virtio -display gtk -m 1G -enable-kvm

1 Like

That is normal since by default you are using the CPU to emulate a GPU for the guest. If you have a vertical FHD or a 4K screen (something that has a vertical resolution > 1440 + some spare). You can do qemu-system-x86_64 -boot menu=on -drive file=qemu-x86_64.qcow2,format=qcow2 -vga virtio -m 2G -enable-kvm -smp 6 -display sdl,gl=on -soundhw hda -name Underling to enable hardware OpenGL (Since this feature will mess up QEMU’s ability to calculate cursor position).


why -m 2G? i use -m 3G and its work perfectly

-m XG gives you VM X Giga bites of memory. So… If you have enough of them, sure! I typically run my VM with 6GB and 8 cores so I can compile stuff on it.

i use -m 3G because the ram of Librem5 is 3G :slight_smile:

1 Like

yea cursor is funny in gl mode but the screen speed is no difference from the host. thanks guys
Upd: and it seems sdl alone is a good tradeoff, still faster than gtk and proper cursor position/orientation.

1 Like

The funny cursor problem can be solved by not resizing the window. And the default window size is 720×1440. Jist saying.

I didn’t resize anything, the cursor was upside down and no idea where exactly it was pointing. I’ve managed to slide the lock screen but didn’t manage to push any button afterwards :slight_smile: