Slow graphics on X11vnc and MS RDP from anywhere to guests on specific case-uses

Discussions related to using VirtualBox on Linux hosts.
Post Reply
mjgames
Posts: 3
Joined: 8. Jun 2023, 18:43

Slow graphics on X11vnc and MS RDP from anywhere to guests on specific case-uses

Post by mjgames »

Hello everyone.

I have a problem while remote accessing guests, even from the host itself, seems that something around the graphics rendering and network is wrong, detailed below. This problem has some similarities with what is described in here: viewtopic.php?t=104770

Host: Debian 11 (5.10.0-21, new installation, Gnome window manager X11) w/Virtual Box 7.0.8 (also occurred on 7.0.6), running on a Xeon E-2126G w/32 GB ECC RAM (no dedicated graphics card) and LUKSv2 on all storage accessible by the VMs. I also tried a VM on a non-encrypted storage, yielding the same results. No absent firmware (free/non-free), graphics is "Mesa Intel® UHD Graphics P630 (CFL GT2)".

Test guest: VM defaults and: 4 GB ram, no EFI/secure boot, 2 CPUs (100%) PAE/NX & nesting and nested paging, 16 MB VRAM VMSVGA no 3D, dynamic 20 GB SSD SATA storage, no audio, 1 bridged Ethernet adapter, no serial ports. Software: Debian 11 (5.10.0-23) w/KDE Plasma, guest additions + kernel modules and x11vnc (0.9.16).

How to reproduce: Use Remmina (1.4.11) on the host and connect to guest, allowing both viewports to be visible. Open Konqueror and there is a delay of around 0.5 seconds to have Konqueror being displayed on Remmina. If a link is opened on a new tab, similar delay is visible once I click on the new tab. This delay grows to 2~3 seconds if a laptop, Ethernet connected to the same switch on which the Host is, runs Win10+TightVNC to access the guest. But mouse related animations on already rendered windows, like hovering links or UI buttons, are fast. Same happens with other kinds of windows, like system settings, file explorer and even opening Konsole.

On VMs which I imported from Virtual Box 6.1.40, the above problem was observed. Windows 7 x64 RDP, Debian 10 Gnome Wayland Vino/Vinagre and Debian 11 Gnome X11 x11vnc. I don't have any other VMs with graphical UI. The Windows 7 has an extra "feature". I can see, from the Windows 10 Ethernet connected laptop, the Windows components being drawn, one at a time. First I get the dark blue "Welcome" screen, then switches to full black (desktop color), then shows the Windows circle logo and its surrounding square, then the remaining taskbar section, then the desktop icons and finally the windows which were left open. And those windows also are rendered by steps. This recalled me of times when a PC was loading Windows 95 from a slow HDD. Sometimes even the connection stalls for 10~20 secs while rendering, rarely requiring the connection to be re-established.
On the imported VMs, I managed to mitigate this problem by switching the graphics controller to "VBoxSVGA". Enabling 3D acceleration didn't produce any effect.

I didn't tried out other means of transporting a remote session, such as VM remote display, team viewer, etc...

Using the laptop running Win10+TightVNC to access the Host running x11vnc is fast, so it seems related with the VMs alone.

From a performance perspective, pinging VM<->Host takes less than 0.5 ms. Using SSH is fast as it can be, as well as using wget, both latency and speed wise. I don't see anything unusually wrong/bad on the outputs of top, dstat and iotop on the host.

This wasn't happening in Debian 9 w/Virtual Box 6.1.40, same hardware.
Also, I don't want to downgrade to Virtual Box 6.x. Once the final Debian 12 is released, I don't want to go through the trouble of installing Python 2.7 just because of Virtual Box 6.x.

Before filling a bug report, is there something which might worth testing? I already have on my TODO list to install the Virtual Box on another Debian 11 PC I have with Intel core 12th gen CPU and dedicated nVidia GPU.

Thanks.
mjgames
Posts: 3
Joined: 8. Jun 2023, 18:43

Re: Slow graphics on X11vnc and MS RDP from anywhere to guests on specific case-uses

Post by mjgames »

I just installed VB 7.0.8 on Debian 11 on a PC (i5-12600KF/64 GB DDR4 non-ECC/RTX 2070/...), connected to the Win 10 laptop and then imported 2 guests:
  • Windows 7 x64 RDP: Access from the laptop seems instantaneous;
  • Debian 11 Gnome X11 x11vnc: Fast but there is still a 0.4~0.6 seconds delay, which I can live with.
The kernel sub-version on this PC is slightly higher than the Xeon PC.
mjgames
Posts: 3
Joined: 8. Jun 2023, 18:43

Re: Slow graphics on X11vnc and MS RDP from anywhere to guests on specific case-uses

Post by mjgames »

Ok, it seems that I solved the issue. The VMs GFX, SMB and SCP are very fast. By using iperf3, I didn't observe noticeable differences, since it was already very fast.

I had a look into this viewtopic.php?t=110649 and I tried the virtio-net on all VMs.
For the Win 7 x64, I had to use the driver from here https://fedorapeople.org/groups/virt/vi ... 0.1.173-9/, file virtio-win-prewhql-0.1.zip. Other VMs already had the kernel module ready.
All of the VMs have one virtual adapter bridged to an Intel I210-AT, soldered on the motherboard.

Using Virtual Box 7.0.12 on Debian 12 (6.1.69-1) host.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Slow graphics on X11vnc and MS RDP from anywhere to guests on specific case-uses

Post by scottgus1 »

It's great you found a solution! This one seemed rather too deep for me. Thanks for the report!
Post Reply