I'm REALLY struggling to get 3D acceleration working in QEMU/KVM. I've done a LOT of searching and reading and watching videos, and I feel like I'm close but I just can't get there. After reading through a number of different forums, I feel like I'm not alone so I'll go into some detail in case this thread ends up helping others.
Background
I'm new to Manjaro but not to Linux. I am no expert. I've built Debian boxes for clients that run Windows 7 guests in VirtualBox. I'm coming from using Macs since 2010. I'm currently still using a 2012 Macbook that runs Windows XP, 7, and 10 guests with Parallels at reasonable (not laggy) speeds.
I need to do LOTS of 3D rendering work and my Macbooks aren't going to cut it. So I built a PC.
A friend who loves Blender recommended Manjaro so here I am.
Expectations
I DO NOT expect "bare metal" performance from a Windows 10 guest on my Manjaro box. I mentioned my 2012 Macbook and the Windows VMs because I use them for everyday work and they don't feel laggy at all. I am not doing 3D rendering in Windows 10 but I do need a Windows that isn't laggy. I need 3D graphics to work, at least as well as they do in a Windows VM on my Macbook.
But, I also want to run Windows 10 in a window. I am not interested in passthrough.
System
I just built this system a few weeks ago. Its still running defaults except for enabling virtualization.
System: Host: pc2019 Kernel: 4.19.49-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.3.0
Desktop: Xfce 4.13.4git-be04da Distro: Manjaro Linux
Machine: Type: Desktop Mobo: ASUSTeK model: ROG MAXIMUS XI HERO (WI-FI) v: Rev 1.xx serial: <root required>
UEFI: American Megatrends v: 0602 date: 10/19/2018
Battery: Device-1: hidpp_battery_0 model: Logitech Wireless Mouse M525 charge: 100% (should be ignored)
status: Discharging
CPU: Topology: 8-Core model: Intel Core i9-9900KF bits: 64 type: MT MCP arch: Kaby Lake rev: C
L2 cache: 16.0 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 115232
Speed: 800 MHz min/max: 800/5000 MHz Core speeds (MHz): 1: 799 2: 801 3: 800 4: 800 5: 800 6: 800 7: 800
8: 800 9: 800 10: 800 11: 800 12: 800 13: 800 14: 800 15: 800 16: 800
Graphics: Device-1: NVIDIA TU106 [GeForce RTX 2070] vendor: eVga.com. driver: nvidia v: 430.14 bus ID: 01:00.0
Display: x11 server: X.Org 1.20.5 driver: nvidia resolution: 2560x1440~60Hz
OpenGL: renderer: GeForce RTX 2070/PCIe/SSE2 v: 4.6.0 NVIDIA 430.14 direct render: Yes
Audio: Device-1: Intel Cannon Lake PCH cAVS vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 00:1f.3
Device-2: NVIDIA TU106 High Definition Audio vendor: eVga.com. driver: snd_hda_intel v: kernel
bus ID: 01:00.1
Sound Server: ALSA v: k4.19.49-1-MANJARO
Network: Device-1: Intel Wireless-AC 9560 [Jefferson Peak] driver: iwlwifi v: kernel bus ID: 00:14.3
IF: wlo1 state: up mac: <nope>
Device-2: Intel Ethernet I219-V vendor: ASUSTeK driver: e1000e v: 3.2.6-k port: efa0 bus ID: 00:1f.6
IF: eno2 state: down mac: <nope>
IF-ID-1: virbr0 state: down mac: <nope>
IF-ID-2: virbr0-nic state: down mac: <nope>
Drives: Local Storage: total: 4.55 TiB used: 119.83 GiB (2.6%)
ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 1TB size: 931.51 GiB
ID-2: /dev/sda vendor: Western Digital model: WD40EFRX-68N32N0 size: 3.64 TiB
Partition: ID-1: / size: 915.60 GiB used: 119.83 GiB (13.1%) fs: ext4 dev: /dev/nvme0n1p2
Sensors: System Temperatures: cpu: 41.0 C mobo: N/A gpu: nvidia temp: 39 C
Fan Speeds (RPM): cpu: 0 gpu: nvidia fan: 0%
Info: Processes: 315 Uptime: 9m Memory: 62.89 GiB used: 1.24 GiB (2.0%) Init: systemd Compilers: gcc: 8.3.0
Shell: bash v: 5.0.7 inxi: 3.0.34
Progress So Far
I've included these things because I've seen MANY other posts on various forums where people were having trouble with one or more of these...
I've enabled virtualization and edited GRUB so now I have:
$ sudo dmesg | grep "Virtualization Technology for Directed I/O"
[ 1.452454] DMAR: Intel(R) Virtualization Technology for Directed I/O
I've installed qemu, ovmf, libvirt, spice, virglrenderer, seabios, and a bunch of other programs with their dependencies. I don't think I'm missing any software, although I could be wrong.
I downloaded the VirtIO iso and configured libvirt:
$ vi /etc/libvirt/qemu.conf
nvram = [
"/usr/share/ovmf/x64/OVMF_CODE.fd:/usr/share/ovmf/x64/OVMF_VARS.fd"
]
$ sudo systemctl stop libvirtd
$ sudo systemctl start libvirtd
$ sudo gpasswd -a design215 libvirt
Now, the UEFI option is not grayed out in the VM setup
I selected QXL for Video
Finally, I created a Windows 10 guest and then installed spice-guest-tools from https://www.spice-space.org/download.html
My Windows 10 guest isn't bad. Its mostly acceptable except there is no 3d support at all and every combination of settings I've tried in Virtual Manager has failed. One of the common messages is:
"spice gl requires virtio graphics configured with accel3d"
On this page: https://wiki.archlinux.org/index.php/QEMU/Guest_graphics_acceleration it says:
"Fully virtualized GPU support via Intel-specific iGVT-g extension
iGVT-g is limited to Intel graphics on recent Intel CPUs"
"Virgil3d virtio-gpu is a paravirtualized 3d accelerated graphics driver, similar to non-graphics virtio drivers (see virtio driver information and virtio Windows guest drivers)." But it appears this is only for Linux guests.
and finally...
"For Windows guests, there is very little information on VirtIO-gpu OpenGL drivers. A project summary, the DOD (Windows kernel) driver and the ICD (Windows userland) driver are available. In addition, see this Phoronix article and its comments."
Some of those links look interesting but I didn't see anything concrete. Am I wrong?
So far I like Manjaro but I'm surprised it was this complicated just to get a Windows 10 VM running.
But HOW do you get 3d acceleration working???
thanks!