Bug 108488 - Videos have problems in iGVT-g guest
Summary: Videos have problems in iGVT-g guest
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/iGVT-g (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Terrence Xu
QA Contact: Terrence Xu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-18 20:14 UTC by leozinho29_eu
Modified: 2019-11-29 16:48 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Video showing the problem (3.90 MB, video/webm)
2018-10-18 20:14 UTC, leozinho29_eu
no flags Details
The Windows report file (18.13 KB, application/octet-stream)
2018-11-30 17:12 UTC, leozinho29_eu
no flags Details
The file copied from the Reliability Monitor (1.14 KB, text/plain)
2018-11-30 17:13 UTC, leozinho29_eu
no flags Details

Description leozinho29_eu 2018-10-18 20:14:29 UTC
Created attachment 142086 [details]
Video showing the problem

WMV videos encoded with VC-1 codec cause problems in the iGVT-g guest. If an application as a game try to play the video, it freezes. Movies and TV Windows 10 app don't display the video and with VLC I must set the Output to D3D9 or OpenGL to make it work.

In fact, there is one way to see the video using D3D11: clicking to resize the window makes the video appear. However, this can lead to guest screen blinking and turning off until finding where the window was again to close the window.

Two examples of games with problems due to this are Recettear: An Item Shop's Tale and Hyperdimension Neptunia U: Action Unleashed.

With Recettear the video plays after waiting for some time in the main menu so it's possible to skip it most of the time. With Neptunia U it is in the opening and must be watched to proceed, which makes the game unplayable.

I'm still to find one program with embedded VP8 or VP9 video, but in Movies and TV VP8 and VP9 videos have exactly the same problem as VC-1 videos have.

DiRT 3 Complete Edition has videos in the opening but they are encoded with H264 and they work correctly. In the media players the videos are problematic too.

Tweaking settings in Intel HD Graphics Control Panel had no results.

Specifications:

Guest: 

-Intel driver version 25.20.100.6326;
-Windows 10 1803 x86_64;

Host:

-Xubuntu 18.04.1 x86_64;
-Kernel 4.17.19 patched to fix https://bugs.freedesktop.org/show_bug.cgi?id=107899;
-QEMU 3.0.0;
-Mesa 18.3.0-devel (git-58a51d0a67);

Unfortunately I can't test with drm-tip because of https://bugs.freedesktop.org/show_bug.cgi?id=107945 and

[  271.457221] gvt: vgpu(1) Invalid FORCE_NONPRIV write 83a8 at offset 24ec
[  271.461934] BUG: unable to handle kernel NULL pointer dereference at 0000000000000100

which is crashing my computer when trying to start an iGVT-g guest.
Comment 1 XiongZhang 2018-10-22 02:14:14 UTC
could you fellow this version and try again:
https://lists.freedesktop.org/archives/intel-gfx/2018-October/179043.html

By the way, the latest drm-tip should work with gvt-g now.
Comment 2 leozinho29_eu 2018-10-22 21:17:05 UTC
I tested with the versions from there. The video issues still exist and I noticed the following messages in QEMU terminal when playing videos in the media player:

qemu-system-x86_64: eglCreateImageKHR failed

That repeats multiple times per second.

When using Windows Intel driver version 24.20.100.6136 the media players situation is better: they play the video properly for some time (up to 15 minutes?) and then the video starts to play very slowly. The applications with embedded videos freeze the same way than with latest 25.20.100.6323.

I'm not having luck with drm-tip. I will try to build it again and report the results if I can use it.
Comment 3 leozinho29_eu 2018-10-23 00:04:32 UTC
I was able to build drm-tip and use it, unfortunately this bug is still present.
Comment 4 XiongZhang 2018-10-23 01:59:07 UTC
Could you explain how to reproduce you issue in windows guest ? which app is running and which format video is running ?
Comment 5 leozinho29_eu 2018-10-23 02:30:32 UTC
The video containers which I tested were: webm, mp4, mkv, mov, wmv

The video codecs: VP8, VP9, H264, VC-1

They all have problems. The Movies and TV application that comes with Windows 10 and VLC Media Player (not the UWP) when Video Output is set to Video Output Direct3D11 have the problem of the video not showing unless if moving the window.

The steps with Movies and TV:
1) Choose a video to open;
2) Notice how the video window is black.

Steps with VLC:
1) Check settings to be sure Video Output is Video Output Direct3D11;
2) Choose video to play;
3) Notice how the video is not shown.

For an example of video which can be used to reproduce this, the video I sent when reported this bug can be used, the bug happens with it too.

The games Recettear: An Item Shop's Tale and Hyperdimension Neptunia U: Action Unleashed freeze when they try to play their videos:

-Recettear case: 
1) Install Steam in the Windows 10 iGVT-g guest;
2) Install Recettear: An Item Shop's Tale from Steam;
3) Choose to play the game;
4) Wait in the main menu for around 4 minutes;
5) Notice how the game freezes when it tries to play the video.

-Neptunia U case:
1) Install Steam in the Windows 10 iGVT-g guest;
2) Install Hyperdimension Neptunia U: Action Unleashed from Steam;
3) Choose to play the game;
4) The first screen with a warning against piracy is shown;
5) Notice how the game freezes when it tries to play the first video.

I hope this is enough information. If more information is needed, feel free to ask.
Comment 6 Terrence Xu 2018-11-30 02:56:22 UTC
(In reply to leozinho29_eu from comment #5)
> The video containers which I tested were: webm, mp4, mkv, mov, wmv
> 
> The video codecs: VP8, VP9, H264, VC-1
> 
> They all have problems. The Movies and TV application that comes with
> Windows 10 and VLC Media Player (not the UWP) when Video Output is set to
> Video Output Direct3D11 have the problem of the video not showing unless if
> moving the window.
> 
> The steps with Movies and TV:
> 1) Choose a video to open;
> 2) Notice how the video window is black.
> 
> Steps with VLC:
> 1) Check settings to be sure Video Output is Video Output Direct3D11;
> 2) Choose video to play;
> 3) Notice how the video is not shown.
> 
> For an example of video which can be used to reproduce this, the video I
> sent when reported this bug can be used, the bug happens with it too.
> 
> The games Recettear: An Item Shop's Tale and Hyperdimension Neptunia U:
> Action Unleashed freeze when they try to play their videos:
> 
> -Recettear case: 
> 1) Install Steam in the Windows 10 iGVT-g guest;
> 2) Install Recettear: An Item Shop's Tale from Steam;
> 3) Choose to play the game;
> 4) Wait in the main menu for around 4 minutes;
> 5) Notice how the game freezes when it tries to play the video.
> 
> -Neptunia U case:
> 1) Install Steam in the Windows 10 iGVT-g guest;
> 2) Install Hyperdimension Neptunia U: Action Unleashed from Steam;
> 3) Choose to play the game;
> 4) The first screen with a warning against piracy is shown;
> 5) Notice how the game freezes when it tries to play the first video.
> 
> I hope this is enough information. If more information is needed, feel free
> to ask.

We cannot reproduce it with our kernel. Video plays well on our Win10 guest.
Does any error information output when you meet the game freeze issue? 
Does this issue also exist in our Q3 release kernel? can you try to reproduce it
https://github.com/intel/gvt-linux/tree/gvt-stable-4.17
Comment 7 leozinho29_eu 2018-11-30 17:12:11 UTC
Created attachment 142670 [details]
The Windows report file

I tested with the kernel from there (gvt-stable-4.17) and I had the same results.

What Windows driver version are you using? With 25.20.100.6326, which is the recommended at https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide#422-windows-gfx-driver-support I still face this issue.

In the download center there is only the UWP driver to download (no links for the Legacy driver) and I am worried about the warning that in case of failure I can't go back the same way as before.

QEMU shows the following message constantly when playing a video:

qemu-system-x86_64: eglCreateImageKHR failed

And colors are very strange when the video is in fullscreen: https://i.imgur.com/P9495Vv.png

When the games freeze when starting videos I noticed no message in QEMU stdout or stderr, but on Windows the Event Viewer shows the problem. The attached file is the Report.wer file generated for one Recettear crash. I sincerely don't if there is something meaningful on it.
Comment 8 leozinho29_eu 2018-11-30 17:13:42 UTC
Created attachment 142671 [details]
The file copied from the Reliability Monitor
Comment 9 Terrence Xu 2018-12-02 12:04:03 UTC
(In reply to leozinho29_eu from comment #7)
Can you also provide below information?
1. Hardware platform (with CPU/GPU information).
2. Host grub command.
3. Create VM command.
Comment 10 leozinho29_eu 2018-12-02 15:05:48 UTC
CPU information:

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 78
model name	: Intel(R) Core(TM) i3-6100U CPU @ 2.30GHz
stepping	: 3
microcode	: 0xc6
cpu MHz		: 2300.001
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 22
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d
bugs		: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips	: 4608.00
clflush size	: 64
cache_alignment	: 64
address sizes	: 39 bits physical, 48 bits virtual
power management:

GPU information:

name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)  (0x1916)
    Version: 19.0.0
    Accelerated: yes
    Video memory: 3072MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.0.0-devel (git-058f85d41c)
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.0 Mesa 19.0.0-devel (git-058f85d41c)
OpenGL shading language version string: 1.30
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.0.0-devel (git-058f85d41c)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

GPU0
VkPhysicalDeviceProperties:
===========================
        apiVersion     = 0x40105a  (1.1.90)
        driverVersion  = 75903075 (0x4863063)
        vendorID       = 0x8086
        deviceID       = 0x1916
        deviceType     = INTEGRATED_GPU
        deviceName     = Intel(R) HD Graphics 520 (Skylake GT2)

Host command line:

BOOT_IMAGE=/boot/vmlinuz-4.18.0-12-lowlatency root=UUID=6b4ae5c0-c78c-49a6-a1ba-029192618a7a ro quiet ro kvm.ignore_msrs=1 kvm.halt_poll_ns=0 kvm.halt_poll_ns_grow=0 intel_iommu=on iommu=pt i915.enable_gvt=1 i915.fastboot=1 i915.reset=1 resume=UUID=d8cfc834-ef4f-4a15-9c4e-403c9cbd0685 mtrr_gran_size=2M mtrr_chunk_size=64M cgroup_enable=memory swapaccount=1 zswap.enabled=1 log_buf_len=64M usbhid.quirks=0x0079:0x0006:0x100000 config_scsi_mq_default=y scsi_mod.use_blk_mq=1

QEMU command to start the guest:

env QEMU_AUDIO_DRV=pa QEMU_AUDIO_DAC_FIXED_FREQ=96000 QEMU_AUDIO_ADC_FIXED_FREQ=96000 QEMU_AUDIO_ADC_VOICES=0 nice -n -15 qemu-system-x86_64 -name 'Windows 10' -k pt-br -nodefaults -mem-prealloc -mem-path /dev/hugepages/libvirt/qemu -hda /home/usuario/.local/share/libvirt/images/redm.qcow2 -hdb /home/usuario/.local/share/libvirt/images/redm-D.qcow2 -enable-kvm -cpu host,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_runtime -smp cores=2,threads=2 -m 3072M -bios /usr/local/share/qemu/bios.bin -device usb-tablet,id=tablet -device usb-audio,id=usbaudvir,buffer=6144 -device usb-host,vendorid=0x0079,id=redragon -vga none -monitor vc -serial stdio -display gtk,gl=on -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/123f09b0-4c00-11e8-a6ca-f3c21e47e012,x-igd-opregion=on,rombar=0,display=on,addr=0x3,id=iHD520 -cdrom '/home/usuario/L_Soa/Documents/Jogos Gr@tis I.iso' -machine kernel_irqchip=on -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -M pc,usb=true -netdev user,id=net0 -device e1000,netdev=net0,id=n0,addr=0x8

There is an issue on GitHub with the same problem: https://github.com/intel/gvt-linux/issues/59
Comment 11 Terrence Xu 2018-12-03 10:07:03 UTC
(In reply to leozinho29_eu from comment #10)
Hi, today I tried to reproduce it again in Skylake machine, and still cannot reproduce your problem.
We run 1080p / 4K h.264 media file in VLC(2.1.3) in Windows VM (display by dma-buf) for 30 minutes, without any playback black screen issue.

Do you have more idea for the environment difference? 

Environment:
-----------------------
kernel commit id: gvt-staging-2018y-06m-07d-10h-33m-59s(4.17.0-rc7+)
qemu commit id : 6ad9080(v3.0.0-rc4)
Host OS:ubuntu-18.04.img
Guest Os: win10-rs4.img
Gfx driver: ci-master-907
Hardware:skl-nuc

Host grub set :
BOOT_IMAGE=/boot/vgt/dom0-vgt root=UUID=0e25406f-01c8-49b6-aa26-070c4cfefe45 ro ignore_loglevel i915.hvm_boot_foreground=1 log_buf_len=128M drm.debug=0 i915.enable_gvt=1 kvm.ignore_msrs=1 intel_iommu=on

Create VM script:
/usr/bin/qemu-system-x86_64 \
-m 4096 -smp 2 -M pc \
-name win10 \
-hda /home/img/win10.img  \
-bios /usr/bin/bios.bin -enable-kvm \
-net nic,macaddr=$4 -net tap,script=/etc/qemu-ifup \
-vga none \
-k en-us \
-serial stdio \
-machine kernel_irqchip=on \
-global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 \
-cpu host -usb -usbdevice tablet \
-device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/b323e53e-782f-41bb-a7b8-3538d76fc73a,display=on,x-igd-opregion=on \
-display gtk,gl=on
Comment 12 leozinho29_eu 2018-12-03 11:54:00 UTC
Did you try with the Movies and TV program that comes with Windows 10? VLC can have settings that work, while Movies & TV has this problem consistently.

There is no clear distinction I can see, I don't understand what is going wrong on my setup. I tried with the QEMU and Linux kernel from the last release and it has the same problem.

The main factor seems to be the Windows guest driver. What is the Windows driver being used on your guest? There is a single version (24.20.100.6136) that do not have problems with video players, but applications with "embedded" videos crash.

If it is "ci-master-907", how I can obtain it to test?
Comment 13 Terrence Xu 2018-12-03 14:00:08 UTC
(In reply to leozinho29_eu from comment #12)
Our validated Windows GFX driver is 25.20.100.6326, as below:
https://downloadcenter.intel.com/download/28240/Intel-Graphics-Driver-for-Windows-10?product=80939

Can you have a try? If you still can reproduce this issue, can you provide the Movies & TV download link to me?
Comment 14 leozinho29_eu 2018-12-03 14:53:34 UTC
Using the Linux kernel gvt-stable-4.17, QEMU 2018-q3-stable-2.12.0 and on Windows guest the driver 25.20.100.6326 I still had the same result. Part of the terminal output can be seen below, the last messages are the errors when playing a video using Movies & TV:

+ sh -c 'echo 123f09b0-4c00-11e8-a6ca-f3c21e47e012 > /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_4/create'
+ env QEMU_AUDIO_DRV=pa QEMU_AUDIO_DAC_FIXED_FREQ=96000 QEMU_AUDIO_ADC_FIXED_FREQ=96000 QEMU_AUDIO_ADC_VOICES=0 nice -n -15 /home/usuario/qemu_igvt-g/bin/qemu-system-x86_64 -name 'Windows 10' -k pt-br -nodefaults -mem-prealloc -mem-path /dev/hugepages/libvirt/qemu -hda /home/usuario/.local/share/libvirt/images/redm.qcow2 -hdb /home/usuario/.local/share/libvirt/images/redm-D.qcow2 -enable-kvm -cpu host,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_runtime -smp cores=2,threads=2 -m 3072M -bios /usr/local/share/qemu/bios.bin -device usb-tablet,id=tablet -device usb-audio,id=usbaudvir,buffer=6144 -device usb-host,vendorid=0x0079,id=redragon -vga none -monitor vc -serial stdio -display gtk,gl=on -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/123f09b0-4c00-11e8-a6ca-f3c21e47e012,x-igd-opregion=on,rombar=0,display=on,addr=0x3,id=iHD520 -cdrom '/home/usuario/L_Soa/Documents/Jogos Gr@tis I.iso' -machine kernel_irqchip=on -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -M pc,usb=true -netdev user,id=net0 -device e1000,netdev=net0,id=n0,addr=0x8
select_vgahw vga is none
set vendor id(8086) for devfn(0)
set vendor id(8086) for devfn(8)
set vendor id(8086) for devfn(9)
set vendor id(8086) for devfn(a)
set vendor id(8086) for devfn(b)
audio: Bogus number of capture voices 0, setting to 0
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument
set vendor id(0) for devfn(18)
set vendor id(8086) for devfn(40)

(qemu-system-x86_64:5601): Gtk-WARNING **: 12:42:40.168: Theme parsing error: gtk.css:47:15: negative values are not allowed.
qemu-system-x86_64: eglCreateImageKHR failed
qemu-system-x86_64: eglCreateImageKHR failed
qemu-system-x86_64: eglCreateImageKHR failed

The Movies & TV app can be downloaded from https://www.microsoft.com/pt-br/p/movies-tv/9wzdncrfj3p2
Comment 15 Terrence Xu 2018-12-04 10:01:01 UTC
(In reply to leozinho29_eu from comment #14)
Today we tried running media file with "Movies and TV" for half day, with  “qemu-system-x86_64: eglCreateImageKHR failed” log happening sporadically. The reproduce rate is very low.
We will follow it first, thank you!
Comment 16 leozinho29_eu 2019-01-27 14:17:51 UTC
I think that what I reported as one bug are really two bugs. Using QEMU version 3.1.50 (v3.1.0-1218-gad7a21e812-dirty) with Mesa 19.0.0-devel (git-c1efa240c9) and Linux kernel version 5.0.0-rc3-drm-tip-74ec7792af09018594097356ddc79d87cb9504f9+, the games with videos are no longer freezing when the videos start. Hyperdimension Neptunia U: Action Unleashed still freezes as before if I try to skip the video, but if I let the videos play then the game works normally. Recettear: An Item Shop's Tale seems perfect, skipping the video caused no problem.

The video player issue is still present, being needed to use the Windows driver version 24.20.100.6136 to be able to play videos using the media players and Edge.
Comment 17 Martin Peres 2019-11-29 16:48:08 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/intel/issues/12.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.