Hacker News new | ask | show | jobs
by eslaught 1343 days ago
Has anyone had luck getting decent GUI performance (macOS host, Linux guest)? I don't need 3D, just sane 2D performance.

The last time I tried this, it was so bad that I had to drastically decrease the window size to get reasonable performance. As in, it would basically lock up above a certain window size, and no reasonable amount of waiting would get it to respond. (And yes, I fiddled with all of the obvious knobs for CPU/memory/graphics/etc.) I figure in this day and age of AWS and the like, we should have very, very good open source virtualization software, but no amount of fiddling seems to get it to work well for me.

10 comments

The only way I've been able to get good virtualized 2D performance without providing a GPU directly to the VM has been to use a display manager where you can disable compositing. Otherwise, you end up having to use a software 3D rasterizer like LLVMpipe, which can be quite slow.

The native display managers for XFCE, MATE, and (I believe) KDE allow you to disable compositing. GNOME and Unity's native display managers don't (AFAIK). I have no idea if display compositing can be disabled on macOS.

Check out VirGL and the virtio-gpu projects. Is already available in qemu if you're willing to do some work. Virtualized OpenGL (and soon Vulkan?) access to the host GPU inside the VM.

e: my memory slips me, I've already run vulkan apps in qemu.

> [lexi@arch-steam ~]$ vkcube

> Selected GPU 0: Virtio-GPU Venus (Intel(R) UHD Graphics (CML GT2)), type: 1

Granted this was ChromeOS[0], but ultimately it's the same qemu. You just need the right flags and for the guest to have a mesa driver aware of virtio-gpu.

0. https://chromeunboxed.com/how-to-enable-vulkan-crostini/

Chromeos uses crosvm, not qemu. Qemu uses virgl to provide opengl, but I think vulkan is still in the works. You can use crosvm on Linux too,works pretty well, it uses a newer version of virgl to provide vulkan.
Have you setup the "VirtualBox guest additions" inside your guest?
I use 4K screens. Virtualbox is literally unusable at those resolutions. I have to run VMs at 1080p and upscale them in Virtualbox. At 4k, simple actions such as opening the start menu take several seconds.

VMWare does this much better, but is a pain to run on up-to-date kernels.

The situation sucks, is what I'm saying.

Did you try KVM? I'm using that for servers so I've never tried this particular usecase but I'm very happy with it overall.
I don't know how the perf is, but this might be of interest: https://developer.apple.com/documentation/virtualization/run...

(Note: This is for the next major release of Mac OS.)

github.com/cirruslabs/tart is a command-line tool which makes this whole VM thing very easy on MacOS starting with Ventura.
Is there an equivalent of this for Intel Macs?
The above framework (Virtualization.framework) provided by Apple is not restricted to AArch64, it's supported on Intel Macs.

I'm honestly not sure why a CLI tool would make that restriction, or if it even is a true restriction rather than an error in documentation.

In any case, vftool is another CLI and works fine on Intel Macs, but has not yet been updated for graphical VMs.

Linux with GUI is only available on MacOS 13 and higher, I guess.

GitHub has a fair few projects which can do Linux VMs with command-line access to the guest.

I discovered a few days ago that VMware now offer a 'Fusion 12 Player', which is free (as in beer) albeit you have to register to get the download + key. Might be worth looking into that?
Hi Stu :)

The link for that is here [0].

The only thing I would add to that is to use a private browser session.

Also as a tip fill in "None" for business name, if you are using it privately - as it is a required field for some ffing reason.

But yes, the free VMware Fusion Player works fine.

[0] https://vmware.com/go/get-fusionplayer-key

wow - long time Wil :)

Good to see you're still knocking around these parts!

hehe.. I was thinking the same.

Hope you are doing well.

Vmware has the best implementation of a paravirtualized GPU IMO, and has for probably a decade. Somehow this rarely comes up, but VMware itself seems to only begrudgingly want to sell their workstation products at this point.
I had an issue thinking UI was slow, but it turned up that mouse pointer integration issue - simple check: get a USB mouse and inject that USB device into VM.

Still not as good (as I remember VMware would provide), but better!

BTW, tested 7.0 just now -- anecdotally Ubuntu's UI does not feel any faster and somehow still depends on the resolution not the size of the window being moved

It might have been because the guest was trying to do 3D compositing without acceleration. 3D acceleration was in really bad shape in VirtualBox 6, being completely unusable on nVidia cards and buggy elsewhere. The release notes say they finally fixed it so I'm excited to give it another shot.
If you want great video performance you are doing it wrong. You can watch videos probably but I've never gotten good sound performance out of it. Most of my development is backend and web and it's fine for that. You absolutely have to not skimp on ram, cores, and need at least an SSD. I find it acceptable for what I do (rust windows programming) when I give it enough cpus on the 8 core system. Sure it's not straightup native but it's okay. You have obviously install all the guest additions (open source ones) to get about the best you're going to expect.
GUI performance was never great, but neither was it that bad either. Certainly nothing like you've described. This is with Windows and Linux hosts, running Linux or BSD guests
Use VNC/RDP to connect to the guest.
GPU passthrough or weep. This is why VMs are so rare on consumer devices.