Manjaro as Virtualbox Guest: Enable Hardware Acceleration for VMSVGA
-
Dear Arch/Manjaro Linux fellows: How can i get better Hardware Acceleration for video?
I ask for Manjaro 21 KDE Plasma.# inxi -S -xxx System: Host: manjana Kernel: 5.15.32-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 11.2.0 Desktop: KDE Plasma v: 5.24.4 tk: Qt v: 5.15.3 wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux
I use VMs on VirtualBox Version 6.1.34 r150636
(on Windows 11 Host) to test my Vivaldi versions and other Linux programs.inxi -G:
Graphics: Device-1: VMware SVGA II Adapter driver: vmwgfx v: 2.18.1.0 Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: vmware unloaded: modesetting gpu: vmwgfx resolution: 1600x1087~60Hz OpenGL: renderer: SVGA3D; build: RELEASE; LLVM; v: 2.1 Mesa 21.3.8
Unfortunately my Vivaldi shows for vivaldi://gpu:
Graphics Feature Status Canvas: Hardware accelerated Canvas out-of-process rasterization: Disabled Direct Rendering Display Compositor: Disabled Compositing: Hardware accelerated Multiple Raster Threads: Disabled OpenGL: Enabled Rasterization: Hardware accelerated Raw Draw: Disabled Skia Renderer: Enabled Video Decode: Software only. Hardware acceleration disabled Video Encode: Software only. Hardware acceleration disabled Vulkan: Disabled WebGL: Hardware accelerated WebGL2: Hardware accelerated
No Video Decode with acceleration?
-
@doctorg Months ago i converted all my VirtualBox VMs to QEMU/KVM/libvirt, & use them via virt-manager. Sorry to say that now means i can no longer test my MJ KDE for you [coz it is different in KVM compared to VB]. Also, i cannot recall details clearly any more, but vaguely think i recall a constant battle trying to get VB's 3D acceleration to work properly for MJ.
Maybe you could search the MJ Forum for tips [&/or post there too, if you're registered]?
https://wiki.manjaro.org/index.php/VirtualBox
For those intending to use Manjaro under VirtualBox, you can install Manjaro as usual. Please observe below point of setting the correct display type.
Selecting a Display Controller
Before installation of Manjaro ensure the correct display settings for VM. The Manjaro recommendation - to ensure the best experience - is contradicting the recommendations from VirtualBox developers. To have the VM screensize adapting to the window size - you need enable VBoxSVGA but doing so you cannot enable 3D. To use 3D you need to use VMSVGA which will force you to set the VM screen size inside the VM. If you use the VMSVGA adapter - mhwd will keep telling you to switch - you can do it but you will not be able to utilize 3D graphics. -
@doctorg Haven't tried that before in a VM, I believe Virtualbox should provide its own va-api driver for it to work, or you can do it already with other distros?
See here if you can take something for the VM https://forum.manjaro.org/t/howto-enable-hardware-video-acceleration-video-decode-in-google-chrome-brave-vivaldi-and-opera-browsers/51895 , there's the forums as @guigirl has suggested , or you could ping yochananmarqos in this forum, he is the MJ dev who wrote that.
-
Seems the va-api driver is not compatible with VirtualBox 6 graphics. Crashes or freezes VB.
I should try an other VM for my Linuxes.I have not much time to investigate yet, currently my testing Vivaldi version is running with videos.
OMZ! VMWare does not work too with HWA, stuttering videos. Tips to enable video decoding acceleration cause a crash on VMWare.
Windows Hyper-V has not HWA at all.
I live in a testing hell.
OK, i can live without video HWA in my testing PCs.@All Thanks for help.
-
@doctorg Of course, there is one obvious solution that will certainly work fine for you. Don't bother trying to run your V in a Manjaro VM Guest, instead run it in a Manjaro [or Arch] Host, direct on your current HW. Perfect!
No, really, please stop, that's far too many big Thank Yous from you, i'm blushing now.
-
I was about to mention the above too -but @guigirl was faster and she rightfully deserves all the TYs
- I would never suggest Microsoft's Embrace, Extend, Extinguish aka WSL, which could do the work? - no idea && not interested to find out - , then you could use QEMU with VGA passthrough for all your Linuxes and even Winblows if I remember right https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF
Ofc you would need an extra dedicated GPU for that.Better not with hybrid optimus laptops as I tried it with my KaOS Endeavours
and it was a PITA that I had to give up