You are not logged in.

#1 2023-03-29 10:55:33

harm
Member
Registered: 2023-03-29
Posts: 10

Poor performance as VirtualBox guest with 3D acceleration

Hello,


I'm using Arch Linux as a VirtualBox guest on a Windows 10 host system.

I'm trying to enable 3D acceleration, but this results in very poor performance and graphical glitches.

In the VM settings I have Graphics Controller set to VMSVGA.

While troubleshooting, I noticed that VirtualBox reports my guest additions as version 6.0.0:

$ grep Guest\ Additions /media/Windows\ 10\ Pro/VirtualBox\ VMs/Arch\ Linux/Logs/VBox.log
00:00:19.679688 VMMDev: Guest Additions information report: Version 6.0.0 r127566 '6.0.0'
00:00:19.679716 VMMDev: Guest Additions information report: Interface = 0x00010004 osType = 0x00053100 (Linux >= 2.6, 64-bit)
00:00:19.679805 VMMDev: Guest Additions capability report: (0x0 -> 0x0) seamless: no, hostWindowMapping: no, graphics: no
00:00:23.464494 VMMDev: Guest Additions capability report: (0x0 -> 0x4) seamless: no, hostWindowMapping: no, graphics: yes
00:00:43.977005 VMMDev: Guest Additions capability report: (0x4 -> 0x5) seamless: yes, hostWindowMapping: no, graphics: yes

(Screenshot of VirtualBox' Session Information window, also reporting 6.0.0: https://i.imgur.com/0sglrq5.png)

Even though I have version 7.0.6 installed:

$ pacman -Qs virtualbox-guest-utils
local/virtualbox-guest-utils 7.0.6-3
    VirtualBox Guest userspace utilities

The wiki mentions to run rcvboxadd to recompile the vbox kernel modules:
https://wiki.archlinux.org/title/Virtua … _Additions

Auto-resizing the guest display works, copy-pasting between host and guest works, shared folders works...

But:

$ sudo rcvboxadd setup
sudo: rcvboxadd: command not found
$ pkgfile rcvboxadd
$

Was rcvboxadd removed at some point?

Relevant output of glxinfo with 3D acceleration enabled:

$ glxinfo | grep OpenGL
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: SVGA3D; build: RELEASE;  LLVM;
OpenGL core profile version string: 3.3 (Core Profile) Mesa 23.0.1
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.3 (Compatibility Profile) Mesa 23.0.1
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 23.0.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

lsmod output:

$ lsmod | grep vbox
vboxsf                 49152  1
vboxvideo              36864  0
drm_vram_helper        24576  1 vboxvideo
vboxguest              53248  6 vboxsf
drm_ttm_helper         16384  3 vmwgfx,drm_vram_helper,vboxvideo

Pacman:

$ pacman -Qs virtualbox
local/linux 6.2.8.arch1-1
    The Linux kernel and modules
local/linux-lts 6.1.21-1
    The LTS Linux kernel and modules
local/linux-zen 6.2.8.zen1-1
    The Linux ZEN kernel and modules
local/virtualbox-guest-utils 7.0.6-3
    VirtualBox Guest userspace utilities

I'm experiencing the same behavior on linux, linux-lts and linux-zen.

I'm probably missing something obvious here...


Kind regards,
Harm.

Last edited by harm (2023-03-29 10:58:01)

Offline

#2 2023-03-30 08:45:41

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,125

Re: Poor performance as VirtualBox guest with 3D acceleration

What version of virtualbox is the host running ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2023-03-30 13:45:26

harm
Member
Registered: 2023-03-29
Posts: 10

Re: Poor performance as VirtualBox guest with 3D acceleration

Lone_Wolf wrote:

What version of virtualbox is the host running ?

Ah, I forgot to mention that. The Windows 10 host is running version 7.0.6.

Offline

#4 2023-03-30 14:06:22

seth
Member
Registered: 2012-09-03
Posts: 60,278

Re: Poor performance as VirtualBox guest with 3D acceleration

Edit: dated.

I'm trying to enable 3D acceleration, but this results in very poor performance and graphical glitches.

1. how/where exactly
2. quatify "poor"
3. describe the "glitches"

Last edited by seth (2023-03-30 14:11:35)

Offline

#5 2023-03-31 07:22:36

harm
Member
Registered: 2023-03-29
Posts: 10

Re: Poor performance as VirtualBox guest with 3D acceleration

seth wrote:

1. how/where exactly

Everywhere actually, even the text scrolling while booting has a strange sliding effect.

seth wrote:

3. describe the "glitches"

I made an Imgur album with two videos:
- one of Gnome on Wayland with Kitty terminal and Gnome Usage moving around creating those retro-looking trails. On the right side is Conky, but it's just garbled text;
- one showing the kernel messages while booting, with a sliding effect coming from the top down.

https://imgur.com/a/0rS3m37

I hope the videos are still processing and will get sharper, but I think you can see what I'm trying to show.

seth wrote:

2. quatify "poor"

I'm not sure how to qualify it, but everything feels kind of sluggish, the VM runs snappier without 3D acceleration.
Maybe it's a side effect of the graphical glitching.
("Poor" was maybe a little exaggerated, now that I look back at it.)

The reason that I'm trying to use 3D acceleration is that I wanted to try Sway,
but that won't run without 3D acceleration.

Offline

#6 2023-03-31 07:38:39

seth
Member
Registered: 2012-09-03
Posts: 60,278

Re: Poor performance as VirtualBox guest with 3D acceleration

Sorry, typo: "quaNtify".
Eg. compare the accelerated and unaccelerated behavior of glmark2 or even glxgears.

Offline

#7 2023-03-31 09:01:05

harm
Member
Registered: 2023-03-29
Posts: 10

Re: Poor performance as VirtualBox guest with 3D acceleration

seth wrote:

Sorry, typo: "quaNtify".
Eg. compare the accelerated and unaccelerated behavior of glmark2 or even glxgears.

I maxed the video memory in VirtualBox from 32 MB to 128 MB,
I don't get the trails anymore while dragging windows, but still graphical glitches and overall sluggishness.

I performed glmark2-es2-wayland (no arguments) on Gnome Wayland
- without 3D acceleration: http://0x0.st/HHPU.txt (score: 310)
- with 3D acceleration: http://0x0.st/HHP0.txt (score: 565)

Strange to see the scores are higher.

I just realized I should've included system specifications:
Host: HP Prodesk 400 G5 MT with:
- Intel Core i7-8700 @ 3.20GHz 6 cores / 12 threads,
- Intel UHD Graphics 630 (No dedicated GPU),
- 16 GB RAM.

Guest:
- 6 threads allocated,
- 128 MB video memory (32 MB in previous posts/screencaptures),
- 10 GB RAM allocated.

Offline

#8 2023-03-31 10:42:54

seth
Member
Registered: 2012-09-03
Posts: 60,278

Re: Poor performance as VirtualBox guest with 3D acceleration

Strange to see the scores are higher.

Actually not, it's what you'd expect.

128MB VRAM is still quite low.
Otherwise does glxgears maybe suggest that the output is sync'd w/ hw acceleration, but not w/o?

Offline

#9 2023-03-31 11:56:58

harm
Member
Registered: 2023-03-29
Posts: 10

Re: Poor performance as VirtualBox guest with 3D acceleration

seth wrote:

Strange to see the scores are higher.

Actually not, it's what you'd expect.

128MB VRAM is still quite low.
Otherwise does glxgears maybe suggest that the output is sync'd w/ hw acceleration, but not w/o?

128 MB is the max I can do in VirtualBox: https://imgur.com/a/nSZubYr

I'm using 2 HP E273 monitors, 1920x1080 @ 60Hz.

glxgears with 3D acceleration does indeed say it's VSync'd, but averages to about 40 FPS:

$ glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
177 frames in 5.1 seconds = 34.697 FPS
192 frames in 5.0 seconds = 38.377 FPS
180 frames in 5.1 seconds = 35.547 FPS
193 frames in 5.0 seconds = 38.589 FPS
195 frames in 5.0 seconds = 38.900 FPS
207 frames in 5.0 seconds = 41.387 FPS
178 frames in 5.0 seconds = 35.524 FPS
191 frames in 5.0 seconds = 38.174 FPS
176 frames in 5.0 seconds = 35.080 FPS
223 frames in 5.0 seconds = 44.520 FPS
175 frames in 5.0 seconds = 34.959 FPS
211 frames in 5.0 seconds = 42.078 FPS
177 frames in 5.0 seconds = 35.386 FPS
186 frames in 5.0 seconds = 37.193 FPS
180 frames in 5.0 seconds = 35.910 FPS
182 frames in 5.0 seconds = 36.282 FPS
163 frames in 5.0 seconds = 32.577 FPS
184 frames in 5.0 seconds = 36.747 FPS
168 frames in 5.0 seconds = 33.568 FPS
207 frames in 5.0 seconds = 41.295 FPS

I tried vblank_mode=0 to try and disable VSync:

$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
336 frames in 5.1 seconds = 65.659 FPS
321 frames in 5.0 seconds = 64.169 FPS
286 frames in 5.2 seconds = 54.505 FPS
336 frames in 5.0 seconds = 67.188 FPS
302 frames in 5.0 seconds = 60.352 FPS
357 frames in 5.0 seconds = 71.197 FPS
324 frames in 5.0 seconds = 64.736 FPS
340 frames in 5.0 seconds = 67.953 FPS
295 frames in 5.0 seconds = 58.858 FPS
343 frames in 5.0 seconds = 68.599 FPS
312 frames in 5.0 seconds = 62.314 FPS
337 frames in 5.0 seconds = 67.388 FPS
308 frames in 5.0 seconds = 61.561 FPS
315 frames in 5.0 seconds = 62.844 FPS
268 frames in 5.0 seconds = 53.488 FPS
334 frames in 5.0 seconds = 66.706 FPS
253 frames in 5.0 seconds = 50.587 FPS
292 frames in 5.0 seconds = 58.294 FPS
270 frames in 5.0 seconds = 53.915 FPS
314 frames in 5.0 seconds = 62.797 FPS

glxgears without 3D acceleration:

$ glxgears
9153 frames in 5.0 seconds = 1830.569 FPS
9584 frames in 5.0 seconds = 1916.683 FPS
9377 frames in 5.0 seconds = 1875.304 FPS
9563 frames in 5.0 seconds = 1912.534 FPS
9341 frames in 5.0 seconds = 1868.085 FPS
9584 frames in 5.0 seconds = 1916.771 FPS
9288 frames in 5.0 seconds = 1857.111 FPS
9906 frames in 5.0 seconds = 1981.057 FPS
9711 frames in 5.0 seconds = 1942.156 FPS
9529 frames in 5.0 seconds = 1905.333 FPS
9588 frames in 5.0 seconds = 1917.372 FPS
9712 frames in 5.0 seconds = 1942.346 FPS
9453 frames in 5.0 seconds = 1890.116 FPS
9898 frames in 5.0 seconds = 1979.562 FPS
9733 frames in 5.0 seconds = 1946.461 FPS
9837 frames in 5.0 seconds = 1967.377 FPS
9968 frames in 5.0 seconds = 1993.599 FPS
9981 frames in 5.0 seconds = 1996.041 FPS
9575 frames in 5.0 seconds = 1914.519 FPS
9725 frames in 5.0 seconds = 1944.974 FPS

Offline

#10 2023-03-31 12:18:08

seth
Member
Registered: 2012-09-03
Posts: 60,278

Re: Poor performance as VirtualBox guest with 3D acceleration

"vblank_mode=0 glxgears" still looks synced (suspiciously close to 60Hz), possibly getting you some sort of double-sync in the "unsynced" run.
At least this shows the source of the "sluggishness"

LIBGL_DRI3_DISABLE=true vblank_mode=0 glxgears

Also you've two monitors configured in vbox?
What if you try only one?

Edit: oh, and probably export all environment variables (incl. the dri one) to the entire gnome session (specifically mutter) and/or try openbox.

Last edited by seth (2023-03-31 12:19:30)

Offline

#11 2023-03-31 14:19:50

harm
Member
Registered: 2023-03-29
Posts: 10

Re: Poor performance as VirtualBox guest with 3D acceleration

Openbox, is awesome okay as well? It's just that I have that one set up already.

I ran that command in Gnome and awesome, in single and dual monitor mode:

Gnome Wayland with 3D acceleration, single monitor:

$ LIBGL_DRI3_DISABLE=true vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
1967 frames in 5.0 seconds = 393.092 FPS
1820 frames in 5.0 seconds = 363.052 FPS
2168 frames in 5.0 seconds = 433.493 FPS
1662 frames in 5.0 seconds = 331.744 FPS
1816 frames in 5.0 seconds = 362.881 FPS
1795 frames in 5.0 seconds = 358.861 FPS
2112 frames in 5.0 seconds = 422.229 FPS
1802 frames in 5.0 seconds = 360.178 FPS
2072 frames in 5.0 seconds = 414.200 FPS
1710 frames in 5.0 seconds = 341.554 FPS
2198 frames in 5.0 seconds = 439.563 FPS
1866 frames in 5.0 seconds = 372.481 FPS
1834 frames in 5.0 seconds = 366.544 FPS
1714 frames in 5.0 seconds = 342.284 FPS
2106 frames in 5.0 seconds = 421.151 FPS
1692 frames in 5.0 seconds = 338.354 FPS
1160 frames in 5.0 seconds = 231.692 FPS
1555 frames in 5.0 seconds = 310.999 FPS
2206 frames in 5.0 seconds = 441.091 FPS
1270 frames in 5.0 seconds = 253.548 FPS

awesome with 3D acceleration, single monitor:

$ LIBGL_DRI3_DISABLE=true vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
2086 frames in 5.0 seconds = 417.181 FPS
1382 frames in 5.0 seconds = 276.219 FPS
848 frames in 5.0 seconds = 169.448 FPS
1100 frames in 5.0 seconds = 219.807 FPS
1782 frames in 5.0 seconds = 356.000 FPS
1526 frames in 5.0 seconds = 305.187 FPS
1239 frames in 5.0 seconds = 247.499 FPS
1670 frames in 5.0 seconds = 333.867 FPS
1467 frames in 5.0 seconds = 293.366 FPS
1689 frames in 5.0 seconds = 337.597 FPS
730 frames in 5.0 seconds = 145.921 FPS
1485 frames in 5.0 seconds = 296.951 FPS
1029 frames in 5.0 seconds = 205.624 FPS
1072 frames in 5.0 seconds = 214.276 FPS
1078 frames in 5.0 seconds = 215.387 FPS
2110 frames in 5.0 seconds = 421.749 FPS
2011 frames in 5.0 seconds = 401.878 FPS
1559 frames in 5.0 seconds = 311.676 FPS
1761 frames in 5.0 seconds = 352.021 FPS
1272 frames in 5.0 seconds = 254.363 FPS

Gnome Wayland with 3D acceleration, dual monitor:

$ LIBGL_DRI3_DISABLE=true vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
2052 frames in 5.0 seconds = 409.881 FPS
1777 frames in 5.0 seconds = 355.295 FPS
1659 frames in 5.0 seconds = 331.775 FPS
1591 frames in 5.0 seconds = 317.847 FPS
1999 frames in 5.0 seconds = 399.682 FPS
1763 frames in 5.0 seconds = 351.917 FPS
1714 frames in 5.0 seconds = 342.459 FPS
1839 frames in 5.0 seconds = 367.701 FPS
1687 frames in 5.0 seconds = 337.340 FPS
1836 frames in 5.0 seconds = 366.881 FPS
1975 frames in 5.0 seconds = 394.973 FPS
1615 frames in 5.0 seconds = 322.956 FPS
1574 frames in 5.0 seconds = 314.775 FPS
1239 frames in 5.0 seconds = 247.738 FPS
1845 frames in 5.0 seconds = 368.948 FPS
1646 frames in 5.0 seconds = 329.161 FPS
1908 frames in 5.0 seconds = 381.536 FPS
1633 frames in 5.0 seconds = 326.450 FPS
1901 frames in 5.0 seconds = 380.167 FPS

awesome with 3D acceleration, dual monitor:

$ LIBGL_DRI3_DISABLE=true vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
2861 frames in 5.0 seconds = 571.936 FPS
1472 frames in 5.0 seconds = 294.165 FPS
1132 frames in 5.0 seconds = 226.109 FPS
855 frames in 5.0 seconds = 170.737 FPS
1665 frames in 5.0 seconds = 332.987 FPS
783 frames in 5.0 seconds = 156.484 FPS
1482 frames in 5.0 seconds = 296.385 FPS
963 frames in 5.0 seconds = 192.598 FPS
1612 frames in 5.0 seconds = 322.391 FPS
2768 frames in 5.0 seconds = 553.293 FPS
940 frames in 5.0 seconds = 187.813 FPS
785 frames in 5.0 seconds = 156.670 FPS
785 frames in 5.0 seconds = 156.869 FPS
782 frames in 5.0 seconds = 156.335 FPS
1376 frames in 5.0 seconds = 275.179 FPS
1854 frames in 5.0 seconds = 370.493 FPS
2099 frames in 5.0 seconds = 419.513 FPS
2313 frames in 5.0 seconds = 462.394 FPS
2669 frames in 5.0 seconds = 533.753 FPS
1956 frames in 5.0 seconds = 390.730 FPS

By environment variables, do you want me to give the output of env in a terminal?
This is env | sort in Gnome Console while 3D acceleration is on: http://0x0.st/HHNW.txt
(I felt the post was getting a bit long)

Last edited by harm (2023-03-31 14:20:14)

Offline

#12 2023-03-31 18:25:47

seth
Member
Registered: 2012-09-03
Posts: 60,278

Re: Poor performance as VirtualBox guest with 3D acceleration

That looks significantly less sync'ing, but the repaint frequency is poor in comparism to the software mode (and in contrast to the glmark results)
Copying the framebuffer might be a limiting factor.

https://wiki.archlinux.org/title/Virtua … celeration - 2nd paragraph.


By environment variables, do you want me to give the output of env in a terminal?

No, I meant to export "LIBGL_DRI3_DISABLE=true" and "vblank_mode=0" in a global context, so that they apply to gnome.
(Try /etc/profile.d, https://wiki.archlinux.org/title/Enviro … s#Globally )

Speaking of which: does awesome behave "sluggish" as well?

Offline

#13 2023-04-04 06:37:57

harm
Member
Registered: 2023-03-29
Posts: 10

Re: Poor performance as VirtualBox guest with 3D acceleration

(This is my work computer, to which I had no access to over the weekend.)

seth wrote:

https://wiki.archlinux.org/title/Virtua … celeration - 2nd paragraph.

Picking a different hardware controller while 3D acceleration is enabled is not possible: https://i.imgur.com/ghRphUa.png
I guess this changed at some point.

seth wrote:

No, I meant to export "LIBGL_DRI3_DISABLE=true" and "vblank_mode=0" in a global context, so that they apply to gnome.
(Try /etc/profile.d, https://wiki.archlinux.org/title/Enviro … s#Globally )

Ah of course, how did that not click with me. My bad!

$ ls -lA /etc/profile.d/
total 68
-rw-r--r-- 1 root root  674 Mar  3 22:53 debuginfod.csh
-rw-r--r-- 1 root root  596 Mar  3 22:53 debuginfod.sh
-rw-r--r-- 1 root root  545 Feb  9 20:49 freetype2.sh
-rw-r--r-- 1 root root 1107 Mar 14 14:36 gawk.csh
-rw-r--r-- 1 root root  757 Mar 14 14:36 gawk.sh
-rw-r--r-- 1 root root  105 Aug 31  2021 gpm.sh
-rw-r--r-- 1 root root  207 Jan 19 13:33 jre.csh
-rw-r--r-- 1 root root  211 Jan 19 13:33 jre.sh
-rw-r--r-- 1 root root  252 Mar 30 16:16 libreoffice-fresh.csh
-rw-r--r-- 1 root root  252 Mar 30 16:16 libreoffice-fresh.sh
-rw-r--r-- 1 root root  766 Jan 31 21:51 locale.sh
-rw-r--r-- 1 root root   22 Mar 24 13:35 mercurial.sh
-rw-r--r-- 1 root root  468 Dec 12 23:19 perlbin.csh
-rw-r--r-- 1 root root  464 Dec 12 23:19 perlbin.sh
-rw-r--r-- 1 root root  110 Apr  3 08:53 vbox-3daccel.sh
-rw-r--r-- 1 root root  963 Mar 19 05:29 vte.csh
-rw-r--r-- 1 root root 1904 Mar 19 05:29 vte.sh

$ cat /etc/profile.d/vbox-3daccel.sh 
#!/bin/sh

# https://bbs.archlinux.org/viewtopic.php?pid=2092756
export LIBGL_DRI3_DISABLE=true vblank_mode=0

I can't notice any difference. I can run glxgears without those flags, so I know they got applied.

I tried glxgears at home, it also gets VSync'ed, but Gnome on Wayland feels way snappier there on my i7 3770 (also no GPU, but on bare metal).

I tried lightdm and sddm as recommended by the wiki as well, it doesn't change anything either.

I also tried removing virtualbox-guest-utils and installing the guest additions from the iso,
nothing changed either.

The situation as of now is that in Gnome on Wayland:

  • Moving windows around is choppy.

  • Scrolling webpages in Firefox is slow.

  • Text is broken in various places:

    • Conky

    • Firefox (webpages are fine, but titlebar text is broken and file picker for uploading is unusable)

    • Gimp is completely unusable: https://i.imgur.com/ubuA1Fd.png

    • Gnome console is fine somehow

seth wrote:

Speaking of which: does awesome behave "sluggish" as well?

awesome becomes unusable with 3d acceleration, closing or moving a window doesn't seem to do anything until a repaint happens.

I tried downgrading VirtualBox to v6.1.24, but I can't boot my VM in that. I'm getting kernel messages saying that writes to the hard drive are timing out.
I was struggling with that all day yesterday.

Offline

#14 2023-04-05 19:19:47

seth
Member
Registered: 2012-09-03
Posts: 60,278

Re: Poor performance as VirtualBox guest with 3D acceleration

gnome console will probably an xwayland client.
Gimp looks like invalid textures.

Do you have an opportunity to try a linux host system?

Offline

#15 2023-04-07 06:29:52

harm
Member
Registered: 2023-03-29
Posts: 10

Re: Poor performance as VirtualBox guest with 3D acceleration

seth wrote:

Do you have an opportunity to try a linux host system?

Sadly not, this is my work computer, the reason I'm virtualizing Arch is because I'm required to run Windows on the bare metal.

Offline

#16 2023-04-07 07:10:10

seth
Member
Registered: 2012-09-03
Posts: 60,278

Re: Poor performance as VirtualBox guest with 3D acceleration

You can try a different guest system, but apparently vmsvga is known to perform poorly on OSX and Windows hosts

(I just clicked some of the first google hits)
https://forums.virtualbox.org/viewtopic.php?t=94890
https://www.wintips.org/fix-virtualbox- … /#method-6

Unfortunately, next to "unaccelerated" it's now also the only option w/ virtualbox.

Offline

#17 2023-04-07 13:04:53

harm
Member
Registered: 2023-03-29
Posts: 10

Re: Poor performance as VirtualBox guest with 3D acceleration

I tried maxing the video memory to 256 MB with

VBoxManage modifyvm "VM Name" --vram 256

but that didn't improve anything.

I think I'm going to give up on this for now.

seth wrote:

... apparently vmsvga is known to perform poorly on OSX and Windows hosts

I thought this was something wrong/missing with my Arch install,
but it seems like it's a VirtualBox thing.
Perhaps things will improve in the future.

Thank you very much for your valuable insight!

Offline

#18 2023-04-26 18:28:20

apocalyptech
Member
Registered: 2017-01-24
Posts: 6

Re: Poor performance as VirtualBox guest with 3D acceleration

Bit of a necropost here, but I ended up having some similar issues after a somewhat-overdue package upgrade on a VirtualBox-hosted Arch VM I use occasionally (using ol' reliable IceWM for the window manager).  This happened in Virtualbox 7.0.4, and also in 7.0.8 after upgrading that.

In my case, I hadn't actually been looking for 3D acceleration, but I did have 3D Acceleration enabled in VirtualBox's settings, using the recommended-for-Linux VMSVGA adapter.  It was manifesting mostly in window resizes and moves.  Resizing an xterm window to make it bigger, for instance, would often very noticeably lag behind.  (Interestingly, *shrinking* the window was usually fine.)  Jiggling a window around the desktop for a bit would often lead to lots of artifacts on the screen, until I stopped jiggling to give the display time to recover.  Sometimes when *moving* a window, that rendering would partially lag behind, too, so a window would appear to shrink as I drag it, and then expand back to full size (not actually resizing the contents; it was just the window contents not being drawn from one of the corners.

Anyway, after various investigation, it seemed related to a kernel update.  The box had gone from 6.0.12.arch1-1 -> 6.2.12.arch1-1.  I didn't try hopping all the way back to 6.0.12, but I *did* install linux-lts-6.1.25-1, and booting into that kernel made things work perfectly again.  Another fix for myself was just disabling that "3D Acceleration" checkbox on the virtualbox config.  Even on 6.2.12, then, that made things work fine.  I don't actually have any need for 3D acceleration on this VM, so that works for me, but would be suboptimal for some folks.  Switching to the VBoxSVGA adapter worked too, but presumably just because that doesn't have 3D support for Linux.  (VBoxSVGA isn't the recommended adapter for Linux, though, so I went back to VMSVGA w/out the 3D Accel checkbox.)

So it feels to me like it was some change between kernel 6.1.x and 6.2.x which is causing the issue, at least for what I was seeing.  I'll see if I can narrow it down further later, but I wonder if there's anything notable in the 6.2 changelogs which'd point to a culprit...

Last edited by apocalyptech (2023-04-26 18:35:03)

Offline

#19 2023-04-26 19:44:19

Andrewdabaest102
Member
Registered: 2023-04-26
Posts: 11

Re: Poor performance as VirtualBox guest with 3D acceleration

Not a fix but I recommend following this guide and using qemu instead
https://www.youtube.com/watch?v=wxxP39cNJOs&t
runs much better than virtualbox and vmware workstation also supports gpu passthrough too

Offline

#20 2023-05-02 07:24:49

harm
Member
Registered: 2023-03-29
Posts: 10

Re: Poor performance as VirtualBox guest with 3D acceleration

Hi, thank you for your help and insight.

apocalyptech wrote:

So it feels to me like it was some change between kernel 6.1.x and 6.2.x which is causing the issue, at least for what I was seeing.

Unfortunately, I'm also experiencing this problem with LTS, see first post:

harm wrote:

I'm experiencing the same behavior on linux, linux-lts and linux-zen.

Andrewdabaest102 wrote:

Not a fix but I recommend following this guide and using qemu instead

I've been looking at moving to QEMU, however, this is a Windows host, and QEMU for Windows is experimental.
Moving to experimental software, expecting my problems to be fixed, seems counterproductive.

Offline

Board footer

Powered by FluxBB