High UI latency with Linux guest

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
amoe
Posts: 3
Joined: 12. Apr 2021, 15:23

High UI latency with Linux guest

Post by amoe »

I am using a Linux guest on a Mac host, and am seeing terribly laggy behaviour in the UI under Xmonad. Xmonad is a basic tiling window manager -- not very demanding (other WMs I've tried include Fluxbox and GNOME 3, they all perform worse). Keyboard inputs lag with about 0.2s latency.

I intend to run this VM full screen (it's only useful to me if I can do this). Having read some threads here, I got the idea that it was to do with display settings -- specifically that the default resolution of the Mac is too high for a VM guest to be able to comfortably display it with the emulated GPU that it has. So I'll give more details on what I've tried with display.

I have installed the Guest Additions. (Without those it doesn't work well at all -- it only has a couple of 4:3 resolutions to choose from, which are too small.) I examine the available graphics modes using "xrandr -q" and resize with "xrandr --output Virtual1 --mode WxH".

The default is to have "Auto-resize guest display" set to true. That means the WM will start in the mode 3584x2240, and this mode is very slow. I can set the mode to a different 16:10 mode, but this causes letterboxing (the letterboxing makes it useless to me). "Scaled mode" looks like it should do what I want, but sadly it doesn't seem to have much impact on the latency. Overall, smaller resolutions do help with the observed latency, but only very small modes get acceptable performance (1024x768 in scaled mode).

Modifying the scaling settings doesn't seem to help, rather, just seems to make things worse (I guess as there are more pixels to render as a result?)

Important: I got an idea from another user here to try an external monitor. This works perfectly and on the external monitor, latency is perfect, even at higher resolutions. The problem here is that VirtualBox doesn't report the available resolutions of the external monitor to the guest, so 16:10 resolutions for the MBP are all that are available whereas the external monitor is 16:9, meaning that the resolutions don't fit. There also seems to be some pretty chaotic behaviour with the fullscreen mode sometimes being forced to 960x540, which (while it works fast) is not optimal.

The log included is from the default VM on the MBP's built in display, using the default resolution 3584x2240.
Version: 6.1.18
Guest additions: yes

Host: MacBook Pro 16-inch 2019, 1.2.3 -- 16GB memory (Host has plenty of free memory.)
Guest: Debian Buster, 12GB memory max allocation
Attachments
debian-15g-2021-04-13-08-19-56.zip
VM log file
(35.15 KiB) Downloaded 12 times
amoe
Posts: 3
Joined: 12. Apr 2021, 15:23

Re: High UI latency with Linux guest

Post by amoe »

OK, after writing this post, I confirmed that the option of navigating to VirtualBox app resources and setting VirtualBoxVM to "open in low resolution" fixes it. Fullscreen fine now, with perfect performance. :D
Post Reply