Hi, I am testing Intel GVT-g on my notebook. Ubuntu 18.04 guests with the 4.16.7 kernel are working near flawlessly but I'm having trouble with a Windows 10 guest.
The Ubuntu guest has never experienced a crash but, on rare occasions when playing a video using VA-API decoder in mpv, ffplay or vlc in fullscreen, artifacts appear in the guest. This only happens when using the VA-API decoder. This is sporadic and it lasts for one frame, but happens sometimes. FreeRDP server is being used in the guest and FreeRDP in the host. The video is VP8 (encoded with vp8_vaapi) and Opus (libopus).
On this same guest, encoding with FFmpeg works properly with VA-API. A sample video is encoded with approximately 6x the speed in the guest, while the host is able to encode the same video with the same settings at 13x the speed. So the guest has around 45% the performance the host has encoding with VA-API. Using glmark2, the host scores around 1300 points while the guest scores between 260 and 422 (xfwm4 and mutter, respectively).
The commands used:
QEMU command: qemu-system-x86_64 -k pt-br -hda /var/lib/libvirt/images/BionicDesktop.qcow2 -enable-kvm -cpu host,kvm=off -smp cpus=2 -usb -device usb-tablet -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/123f09b0-4c00-11e8-a6ca-f3c21e47e012,rombar=0,x-igd-opregion=on -m 2048 -netdev bridge,id=hostnet0,br=virbr0 -soundhw hda -device e1000,netdev=hostnet0,id=net0,mac=aa:bb:cc:dd:ee:11,bus=pci.0,addr=0x8 -vga none
FFmpeg command: ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -i input.webm -vf format=nv12,hwupload -acodec aac -vcodec h264_vaapi output.mp4
The Ubuntu guest is nearly flawless, the only issue I've found being very minor. The first question is: are the guest results consistent with a correct setup of a Ubuntu guest using iGVT-g?
The Windows 10 guests is problematic. It's slow to setup as Windows tries to install a 2016 Intel HD Graphics driver which makes the Windows 10 guest unusable and causes problems to the host (including GPU hangs and this issue: https://i.imgur.com/eMtdDAG.png ). It must be set up without internet, have the updates paused and then download a utility from Microsoft's site to stop the download of that driver. Installing the driver 184.108.40.20660 is then possible. The Windows 10 guest works with full functionality for one boot after the graphics driver was installed, but after that it has many driver errors, making the screen freeze frequently and making its usage challenging. Windows 10 RDP is being used in the guest and the host is using FreeRDP to access it.
As it has limited functionality and stability issues, its performance couldn't be check, but it wouldn't be surprising if there was a 70% performance hit.
QEMU command: qemu-system-x86_64 -k pt-br -hda /var/lib/libvirt/images/redm.qcow2 -enable-kvm -cpu host,kvm=off -smp cpus=2 -usb -device usb-tablet -m 3072 -vga none -display none -netdev bridge,id=hostnet0,br=virbr0 -device e1000,netdev=hostnet0,id=net0,mac=aa:bb:cc:dd:ee:11,bus=pci.0,addr=0x8 -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/123f09b0-4c00-11e8-a6ca-f3c21e47e012,rombar=0,x-igd-opregion=on
The second question is: what should be done to set up a stable and functional Windows 10 guest using iGVT-g? The examples I have found were only for Linux guests.
The third question is related to the host. There are strange errors in the screen, where it may blink, lines may appear, the image may be distorted and/or external screens turn off and on sporadically when using iGVT-g. This only happens with the required options to use iGVT-g and sometimes dmesg show the following when this happens:
[drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun
The command line used for boot in grub is:
linux /vmlinuz root=UUID=6b4ae5c0-c78c-49a6-a1ba-029192618a7a ro firstname.lastname@example.org/eth0,email@example.com/<mailto:firstname.lastname@example.org/eth0,email@example.com/> net.ifnames=0 debug i915.enable_gvt=1 btusb.enable_autosuspend=1 kvm.ignore_msrs=1 intel_iommu=on
btusb.enable_autosuspend=1 is unavoidable because of a unrelated bug, netconsole, debug and net.ifnames=0 are set to be able to get information in the case a problem, as the Windows 10 guest could hang the host.
The host is a Lenovo Ideapad 310-14ISK with a Intel Core i3-6100U and a Intel HD Graphics 520, has Xubuntu 18.04 installed with kernel version 4.16.7 with the required options set in the kernel according the GitHub page, 8 GB of RAM with 128 MB available to virtual GPUs, allowing one or two of them, depending if the one limited to 1024x768 or 1920x1200 is used. The graphical bugs appear to be related with mesa: if mesa has issues, then the host presents the problems. With a stable mesa (Ubuntu 18.04 has 18.0.0-rc5 now) apparently there are no issues.
The third and fourth questions are: what should be done to make those graphical corruptions don't happen in host? And should I be worried with them?
I have a laptop PC setup in a muxless/optimus way with an intel
i7-7700HQ and an NVIDIA 1050Ti.
I've tried following this guide you can find here:
*Note:* I'm unsure if I was able to install the *patch firmwares*
correctly, specially because the tar files are no more.
I've followed the guide and I was able to read up until qemu startup
I made a launch script (see attachment) which is based on the one
suggested in the guide with some changes and adaptations based on what I
have found on the internet.
Currently, the VM starts and asks to press any key to install from CD.
Right after pressing any key, I get:
Which I fail to understand properly. It seems like I'm missing
configuration data but I don't understand what such configuration data
is. The "Status:" number didn't help either. I only found help related
to that for people not being able to boot windows.
As for the files mentioned in the script,
/usr/share/OVMF/OVMF_CODE.fd : [See the guide; the file is there]
WindowsVM.img: |qemu-img create -f raw WindowsVM.img 100G
|WIN_VARS.fd: [See the guide]
When I start QEMU, I do get the warning: (qemu) qemu-system-x86_64:
vfio-pci: Cannot read device rom at 0000:01:00.0
That's where the NVIDIA GPU is connected to. This warning happens at
times and not very consistent.
[1.619524] bbswitch: disabling discrete graphics
[1.639032] pci 0000:01:00.0: Refused to change power state, currently in D0
[2.354952] vfio-pci 0000:01:00.0: enabling device (0000 -> 0003)
[3.379141] vfio_ecap_init: 0000:01:00.0 hiding ecap 0x1e@0x258
[3.379168] vfio_ecap_init: 0000:01:00.0 hiding ecap 0x19@0x900
[4.678656] vfio-pci 0000:01:00.0: Invalid PCI ROM header signature:
expecting 0xaa55, got 0xffff
[16.079068] bbswitch: disabling discrete graphics
[16.098593] pci 0000:01:00.0: Refused to change power state, currently in D0
Please help me successfully passing NVIDIA through to the VM. I'm quite
low on ideas