Anybody else find the Librem 5 emulator laggy as heck?

I might not have the latest hardware (or a Librem) to emulate on but my 4 GB of RAM and i5 CPU should be more than enough to emulate something like this, right?

I heven’t even been able to type in the password yet and takes several tries to load the password screen.

TL;DR: Anybody else experiencing insane lag with Librem 5 Emulator?

Image Used:

Emulator Used: virt-manager with QEMU (no virtualization extensions)

Note: I have been able to emulate OSes like Freenix and OpenBSD on this machine/hardware.

Yes. On my gaming machine running arch linux, (Ryzen 5 2600, 16GB DDR4, 1 TB Crucial NVME, Sapphire RX 590 8GB) it gets choppy.

1 Like

And there is the problem. Note that it is a cross arch emulation too, which doesn’t help, but the lack of kvm is gonna kill performance.

If you can’t get kvm working, I’d recommend using qemu-arm-static and the binfmt module to set up a chroot for playing around with instead.


It’s only cross-arch if the host and target architectures are different - the image being used here is x86_64, so I would have thought that it runs x86_64 natively, or am I mistaken?

I’ll update the documentation to note that specifying more RAM (-m 3G) might help, but it can still be a choppy experience. I think that this might be happening as a result of the graphics stack on the phone hardware diverging from that in the emulator.

(As more support for the GPU is added to the phone image, the build is tuned to work better with that, and performance in the emulator suffers as a result. However, I could be mistaken about that as well. Graphics stack experts probably need to explain this. :wink: )

Oh, if the image is x86_64, then it’s not cross arch. In that case, kvm is going to be even more critical to performance.

Unless qemu is emulating the graphics chipset, I wouldn’t expect the improved GPU drivers to matter. That said, make sure that qemu is providing 3d acceleration, if your host machine doesn’t have an nvidia card, you can provide a powerful virtual card to the machine (nvidia doesn’t support gbm).

You can try

qemu-system-x86_64 -boot menu=on -drive file=qemu-x86_64.qcow2,format=qcow2 -vga virtio -m 3G -enable-kvm -smp 6 -display sdl,gl=on -soundhw hda

which gives better experience, but has issues with the mouse pointer; or

qemu-system-x86_64 -boot menu=on -drive file=qemu-x86_64.qcow2,format=qcow2 -vga virtio -m 3G -enable-kvm -smp 6 -display sdl -soundhw hda

which does not lag as much as the original command.

lsmod | grep kvm will give some indication of if kvm will work. Also, -device VGA,vgamem_mb=128 will let you set the amount of video memory, and I usually prefer -vga std or -vga qxl (which allows spice video out) over the vmware version.

enabling virtualization in the BIOS and then running pit’s second command above (possibly preceded by sudo modprobe kvm-intel) works spendidly. Thanks!