Bug 1455101 - Playing videos through LibVA always fails on Wayland
Summary: Playing videos through LibVA always fails on Wayland
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libva
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Nicolas Chauvet (kwizart)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: WaylandRelated
TreeView+ depends on / blocked
 
Reported: 2017-05-24 09:28 UTC by Christian Stadelmann
Modified: 2018-05-13 20:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-13 20:32:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 748634 0 None None None 2018-03-20 19:44:47 UTC

Description Christian Stadelmann 2017-05-24 09:28:59 UTC
Description of problem:
When trying to run any libVA based application on wayland, they always fail.

Version-Release number of selected component (if applicable):
totem-3.24.0-1.fc26.x86_64
gstreamer1-vaapi-1.12.0-1.fc26.x86_64
libva-1.8.2-1.fc26.x86_64
libva-intel-driver-1.8.2-1.fc26.x86_64

How reproducible:
always. Ever since I started using wayland (about 2 years ago).

Steps to Reproduce:
1. have the packages installed as noted above
2. run a gnome/wayland session
3. start totem
4. play video file

Actual results:
Green screen, no video output.
Output of totem:

VA error: wayland: failed to identify /dev/dri/card0: Permission denied (errno 13)
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)

Expected results:
Work fine

Additional info:
This renders libva completely useless on wayland.

The warning (first line) is printed from drm_handle_device in libva/va/wayland/va_wayland_drm.c.

$ ls -al /dev/dri
drwxr-xr-x.  3 root root       100 23. Mai 06:53 .
drwxr-xr-x. 19 root root      4240 24. Mai 09:54 ..
drwxr-xr-x.  2 root root        80 23. Mai 06:53 by-path
crw-rw----+  1 root video 226,   0 23. Mai 06:53 card0
crw-rw----+  1 root video 226, 128 23. Mai 06:53 renderD128

$ vainfo 
libva info: VA-API version 0.40.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/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(R) Ironlake Desktop - 1.8.2
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc

Should I add myself to the video group? If yes, shouldn't that be the default for any user?

Comment 1 Nicolas Chauvet (kwizart) 2017-05-24 09:59:49 UTC
Please report the issue upstream.

Comment 2 Nicolas Chauvet (kwizart) 2017-05-24 10:00:39 UTC
FYI https://github.com/01org/libva

Comment 3 Christian Stadelmann 2017-05-24 10:08:04 UTC
(In reply to Nicolas Chauvet (kwizart) from comment #1)
> Please report the issue upstream.

Will do. Since this is a permissions issue, I thought it might be a packaging bug.

Comment 4 Christian Stadelmann 2017-05-24 10:10:25 UTC
(In reply to Christian Stadelmann from comment #3)
> (In reply to Nicolas Chauvet (kwizart) from comment #1)
> > Please report the issue upstream.
> 
> Will do. Since this is a permissions issue, I thought it might be a
> packaging bug.

https://github.com/01org/libva/issues/53

Comment 5 Christian Stadelmann 2017-05-25 07:33:33 UTC
Upstream answer:

> devices under /dev/dri/ are not only used by libva, but also used by other DRI driver, such as opengl, opencl. you should add yourself to the video group if you want to use DRI driver.

So shouldn't this package add users to the video group?

Comment 6 Christian Stadelmann 2017-05-28 10:00:48 UTC
Anyway, adding myself to the video group or setting `chmod og+rw /dev/dri/card0` does not make this issue go away (more details upstream). Something else is wrong here and I don't know what it is.

Comment 7 Christian Stadelmann 2017-05-28 12:12:06 UTC
(In reply to Christian Stadelmann from comment #0)
> VA error: wayland: failed to identify /dev/dri/card0: Permission denied
> (errno 13)
> libva error: va_getDriverName() failed with unknown libva
> error,driver_name=(null)
> libva error: va_getDriverName() failed with unknown libva
> error,driver_name=(null)

Actually, this output is caused by the video thumbnailer which drops privileges at start and then tries to stat() and open() /dev/dri/card0. I reported it upstream to https://bugzilla.gnome.org/show_bug.cgi?id=783169. This issue is not causing the playback failure.

Comment 8 Paul Menzel 2018-03-20 12:54:08 UTC
The upstream bug was closed as too many issues were mixed together.

Comment 9 Christian Stadelmann 2018-03-20 19:44:47 UTC
(In reply to Paul Menzel from comment #8)
> The upstream bug was closed as too many issues were mixed together.

There is an upstream tracking bug, I'm referring to that one instead.

Comment 10 Nicolas Chauvet (kwizart) 2018-03-23 11:38:10 UTC
Okay, are soon as libva is concerned. I confirm that I've managed to use vaapi under f28 wayland (with cvlc, so not using qt gui enforcing x11 on the video pipeline).


Can I have any recent reproducer on f28? 
(or can we close the bug).
Thx

Comment 11 Fedora End Of Life 2018-05-03 08:13:20 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 12 Christian Stadelmann 2018-05-13 20:32:06 UTC
It looks like on Fedora 28, adding the current user to the "video" group is not necessary any more.


Note You need to log in before you can comment on or make changes to this bug.