Can't change resolution in a NixOS QEMU/KVM Virtual Machine

Hey, everyone.

I am fairly new to NixOS and have been trying to set up 20.03 in a VM. However, I am unable to change the resolution. If I change it using Arandr, the resolution changes for half a second and the screen flashes before going back to 1024x768.

I tried setting services.qemuGuest.enable=true; in my config file, however that didn’t help.

The host OS is openSUSE Tumbleweed and I tried using Virt-Manager and Gnome-Boxes. However, I am thinking it is an issue with the NixOS VM, and not the host since changing the resolution is fine on other VMs.

This works for me in an installed NixOS without plasma5 enabled, but neither in the plasma5 installer image nor with NixOS installed and plasma5 enabled — so it seems this is more of a Plasma-on-NixOS issue than a general NixOS one. @ttuegel and @worldofpeace seem to be fairly frequent contributors there, maybe they have an idea?

1 Like

Oh, you’re right. I didn’t expect it to be a Plasma related issue given that it is the default, but it seems to work with i3 and Xfce without issues.

Apparently this also isn’t specific to QEMU/KVM. I just tried it out on VirtualBox and had the same exact issue.

To clarify, does this work using the Plasma system settings?

No, it jumps back to the previous resolution there too.

I apologize for the late reply. But no, it does not work when using Plasma’s system settings either.