Call for testing: Video playback in 18.04

Hi all. As you may know, Ubuntu 17.10 introduced hardware-accelerated video playback support for Intel CPUs (https://wiki.ubuntu.com/IntelQuickSyncVideo).

If you are now using Ubuntu 18.04 then we are interested in hearing your feedback on whether this is working smoothly for you. We are particularly interested in hearing if you have any smoothness issues that are specific to the player (totem or mpv), or to the session type (Wayland or Xorg).

So if you find a combination that’s not smooth, please post below and mention:

  • Wayland or Xorg
  • Totem or MPV
  • Model of CPU you are using
  • Output from the ‘vainfo’ command
4 Likes

Quick question, is this just for Intel CPU? I have a laptop that is running 18.04 that has an AMD CPU.

2 Likes

Yes I’ve had stuttering for some time now. Notice it on both Wayland & Xorg.
In Totem, Gnome-MPV and Kodi

CPU: AMD FX-6100 (6) @ 3.300GHz
GPU: AMD Radeon R7 370
Memory: 4132MiB / 15944MiB

vainfo attached as screengrabScreenshot-20180206103111-889x512

HTH!

On my machine (Zotac Zbox Nano CI327) I cannot even use totem . Here’s what I see anytime I play with totem (works fine on VLC)):

Selection_001

Here’s the output of vainfo:

libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.0 (libva 2.0.0)
vainfo: Driver version: Intel i965 driver for Intel® Broxton - 2.0.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD

EDIT:
I should note that I’m running Ubuntu-Unity-Desktop… not Gnome.

Same here on an xorg session with totem, in a wayland session it’s ok
https://bugs.launchpad.net/ubuntu/+source/gstreamer-vaapi/+bug/1747744

No problem with totem here

frederik@xps:~$ vainfo
libva info: VA-API version 0.40.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_40
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.40 (libva )
vainfo: Driver version: Intel i965 driver for Intel® Kabylake - 1.8.3
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointEncSlice
VAProfileVP9Profile2 : VAEntrypointVLD

frederik@xps:~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) pro Kern: 2
Kern(e) pro Socket: 2
Socket(s): 1
NUMA-Knoten: 1
Anbieterkennung: GenuineIntel
Prozessorfamilie: 6
Modell: 142
Model name: Intel® Core™ i7-7500U CPU @ 2.70GHz
Stepping: 9
CPU MHz: 2900.000
CPU max MHz: 3500,0000
CPU min MHz: 400,0000
BogoMIPS: 5808.00
Virtualisierung: VT-x
L1d Cache: 32K
L1i Cache: 32K
L2 Cache: 256K
L3 Cache: 4096K
NUMA node0 CPU(s): 0-3
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 epb invpcid_single pti intel_pt spec_ctrl tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp

Played some files with Totem and Xorg. All except the Crossroad Guitar Festival played OK. This might depend on the Audio/Video properties. However VLC played the file OK.
Screenshot from 2018-02-06 21-59-40
Screenshot from 2018-02-06 21-58-13
Screenshot from 2018-02-06 21-55-36
Screenshot from 2018-02-06 21-51-39
Screenshot from 2018-02-06 21-50-18
Screenshot from 2018-02-06 21-49-07

The CPU is a Ryzen 7 clocked at 3.75 GHz and the GPU is Radeon RX 580.
The vainfo
Screenshot from 2018-02-06 22-09-20

You are using the older version of libva, 18.04 is now on libva2 (2.0.0-2

Thanks all.

Yes, I meant Intel CPUs but if some AMD work then that’s a bonus.

Please note that I am only asking for testing in Totem and MPV. Not Gnome-MPV, Kodi or VLC. To the best of my knowledge the latter ones either don’t use acceleration (properly) or have other performance problems. So I’m only declaring Totem and MPV as supported right now. Remember; if it’s using high CPU at all then acceleration isn’t working.

If you can reproduce any problems with ‘mpv’ then please also paste the terminal output that command produces when playing a video.

If you can reproduce a problem that’s specific to just one player then please also help by logging a bug against that player. Only totem or mpv for now.

1 Like

Wayland
Gnome-mpv
grep “CPU” /proc/cpuinfo
model name : Intel® Celeron® CPU N3060 @ 1.60GHz
model name : Intel® Celeron® CPU N3060 @ 1.60GHz
lshw |grep -i video
capabilities: pci upgrade shadowing cdboot bootselect edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb biosbootspecification uefi
description: Video
configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
vainfo
No protocol specified
error: can’t connect to X server!
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.0 (libva 2.0.0)
vainfo: Driver version: Intel i965 driver for Intel® CherryView - 2.0.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD

Getting garbled video in totem. Screenshot from 2018-02-07 23-38-36

gst-play-1.0 and mpv plays with hardware acceleration (~5% cpu) without slowdowns.

model name : Intel® Core™ i7-3520M CPU @ 2.90GHz
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.0 (libva 2.0.0)
vainfo: Driver version: Intel i965 driver for Intel® Ivybridge Mobile - 2.0.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD

Re; mpv in wayland & screen blanking
screen blanking is not inhibited in mpv while using wayland . Likely there is no solution for 0.27 in mpv itself.
The current mpv-0.28 does implement but thru zwp_idle_inhibit_manager_v1 protocol (wayland protocols) though it’s not implemented in mutter (- https://gitlab.gnome.org/GNOME/mutter/issues/20

Users can start mpv with gnome-session-inhibit mpv /path/to/file & blanking will be inhibited while mpv is open. It can be added to the front of mpv’s .desktop Exec= line with no apparent ill effects if using X11 instead of wayland.

Totem vaapi issue in X11 seems be from 1 of 3 mesa packages, see bug report for list

All, please avoid discussing too much detail in this topic (bug reports should contain those). And remember gnome-mpv is not recommended, so results from that one are unwanted (see https://community.ubuntu.com/t/hardware-accelerated-video-playback/304/4).

The bugs identified thus far (thanks for being on top of it mc3man), are:

3 Likes

i5-2410M
gnome-shell
XDG_SESSION_TYPE=wayland

mpv works fine, low CPU and shows this in output log “Using hardware decoding (vaapi).”
totem does not work, shows black screen, also shows “Using hardware decoding (vaapi).”
Uninstalling the gstreamer1.0-vaapi fixes totem blackscreen.

@vanvugt Let me know if you need any other info.

Thanks. The black screen which is probably also a little or a lot corrupt, is https://launchpad.net/bugs/1747744 … We have a fix for that coming soon, probably as a patch on top of the migration to Mesa 18.0.

Yes I forgot to mention that removing gstreamer1.0-vaapi is also a workaround. But not if you’re playing high-end 4K/HDR/HEVC type video, because playing that smoothly is really impossible without hardware acceleration.

IMG_20180212_170155

Screenshot illustrates the issue; “weathered” colours (for lack of a better term) during video playback and graphics viewing (I know that it’s a poor photo - I had to take it with my phone).

  • Xorg
  • MPV (but the issue is system-wide, really)
  • Intel i5-4210u with Intel HD Graphics 4400
  • vainfo output:

libva info: VA-API version 1.0.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.0 (libva 2.0.0)
vainfo: Driver version: Intel i965 driver for Intel® Haswell Mobile - 2.0.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD

I can’t yet see what you mean by weathered colours. Can you please try taking more photos? Particularly of a video for which I would be familiar with already, like:
http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_normal.mp4
or any of http://bbb3d.renderfarming.net/download.html

Are the weathered colours limited to MPV, or do they also occur in other apps (like web browsers and photo viewers)? I’m thinking maybe you’re hitting https://launchpad.net/bugs/1727232 which I think probably needs more priority. It’s such an invisible issue though many people would not yet realise it’s a bug.

Screenshots might be better actually (just press PrtScn and then look in your Pictures or home directory). It would be interesting to see if taking screenshots averts the issue.

I can’t yet see what you mean by weathered colours.

“Weathered” is possibly the wrong word; English is my second language. I’ll just call the issue ‘colour artefacts’.

Can you please try taking more photos? Particularly of a video for which I would be familiar with already

The forum only allows me to upload one photo, but here you go (my phone camera is awful, but the colour artefacts aren’t visible on screenshots):

Photo

IMG_20180213_195056

Look at the sky’s light colours. They display with smooth gradients on Ubuntu 16.04, but as the photo illustrates 18.04 seems to display the video with a smaller range of white colours. This is the most apparent with either very dark or very light colours.

Are the weathered colours limited to MPV, or do they also occur in other apps (like web browsers and photo viewers)?

The issue is definitely system-wide; the artefacts are visible on the desktop, in Firefox (mostly when viewing photos) and other apps I use. Even on window titlebars the artefacts are visible (displayed as lines with different shades of grey/black). It honestly looks like the colour range is improperly configured.

I’m thinking maybe you’re hitting https://launchpad.net/bugs/17272321 which I think probably needs more priority. It’s such an invisible issue though many people would not yet realise it’s a bug.

It’s possible that the issue is related to that bug. But, as I mentioned, my issue is system-wide. And I tried the fix that the bug reported suggested - turn Settings > Devices > Color > (my monitor) = OFF - but it didn’t improve the issue.

Screenshots might be better actually (just press PrtScn and then look in your Pictures or home directory). It would be interesting to see if taking screenshots averts the issue.

As I mentioned, the artefacts are not present on PrtSc shots that are taken on Ubuntu 18.04 but viewed on a different system (16.04 and Windows).

What is most interesting: installing a previous kernel version fixes the issue completely! I used UKUU Update Utility to install kernel 4.4 (the same that I use in Ubuntu 16.04 without issues) and upon a reboot with 4.4 running on 18.04 everything displayed smoothly. So this indicates that there is a regression somewhere in the kernel?

That is indeed very interesting and sounds like your system is using a sub-optimal colour depth with the newer kernel. That will cause banding and artefacts.

Can you please log it as a kernel bug? Use this command in a terminal to open the bug:

ubuntu-bug linux

And let us/me know by subscribing user ‘vanvugt’ to the bug.

I don’t think it should be discussed any more here since it’s not a problem confined to video playback.

Update for those playing at home: https://launchpad.net/bugs/1749420

1 Like