[radeon] Totem with gstreamer1.0-vaapi and Wayland is just a black screen, then crashes.

Bug #1720820 reported by Kristoffer Brissman
58
This bug affects 11 people
Affects Status Importance Assigned to Milestone
gstreamer-vaapi (Ubuntu)
Confirmed
High
Unassigned
mesa (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

WORKAROUNDS

Just for totem: sudo apt remove gstreamer1.0-vaapi

Or to workaround in all players: sudo apt remove mesa-va-drivers

ORIGINAL DESCRIPTION

Totem with gstreamer1.0-vaapi and Wayland crashes on my machine with AMD Fury graphics card and open source drivers. Video output is just a black frame and crash happens within just a few seconds after video playback starts.

Could not reproduce bug on two older Intel laptops with iGPU's where hardware acceleration seemed to work fine under Wayland.

Issue is only present on Wayland, not x.

I can get hardware accelerated video playback working on Wayland with 'mpv --hwdec=vaapi-copy --opengl-backend=wayland' but this is the only way I have found so far. Even in mpv, no other option than vaapi-copy works.

gst-play-1.0 outputs the following error:
ERROR Internal error: could not render surface for file:///***
ERROR debug information: ../../../gst/vaapi/gstvaapisink.c(1483): gst_vaapisink_show_frame_unlocked (): /GstPlayBin:playbin/GstPlaySink:playsink/GstBin:vbin/GstVaapiSink:vaapisink0

lsb_release -rd
Description: Ubuntu Artful Aardvark (development branch)
Release: 17.10

totem 3.25.90.1-0ubuntu3
gstreamer1.0-vaapi:amd64 1.12.3-1ubuntu1

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It sounds like gstreamer-vaapi has found a VA driver that it thinks will work, rather than none at all which should fall back to software rendering.

Please install: sudo apt install vainfo
Then run 'vainfo' and paste its output here.

Changed in totem (Ubuntu):
status: New → Incomplete
Changed in gstreamer-vaapi (Ubuntu):
status: New → Incomplete
Revision history for this message
Kristoffer Brissman (brisse) wrote :

$ 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/radeonsi_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: mesa gallium vaapi
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointEncSlice
      VAProfileH264High : VAEntrypointVLD
      VAProfileH264High : VAEntrypointEncSlice
      VAProfileHEVCMain : VAEntrypointVLD
      VAProfileNone : VAEntrypointVideoProc

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. Please try this as a workaround:

  sudo apt remove mesa-va-drivers

tags: added: radeon
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Although if you really need hardware acceleration then just use Xorg sessions rather than Wayland.

Revision history for this message
Kristoffer Brissman (brisse) wrote :

That's okay, I already have some workarounds as described in the initial bug report, and Totem isn't my main video player of choice anyway.

Just thought I would point it out since Totem and Wayland are defaults out of the box and this might cause some headaches for the not so tech savvy folks who just want things to be working.

And as a sidenote, even on Xorg, Totem with hardware acceleration doesn't work perfectly because I get a few distorted frames at random intervals, about every 5 - 10 minutes. I guess that's for another bug report though.

Revision history for this message
Kristoffer Brissman (brisse) wrote :

Not that I think it brings anything new to the table, but here's a screencast demonstrating the issue.

https://youtu.be/3uVeVZ3kmZE

Changed in gstreamer-vaapi (Ubuntu):
status: Incomplete → New
Changed in totem (Ubuntu):
status: Incomplete → New
summary: - Totem with gstreamer1.0-vaapi and Wayland crashes on AMD graphics
+ Totem with gstreamer1.0-vaapi and Wayland is just a black screen, then
+ crashes on AMD/radeon graphics
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Totem with gstreamer1.0-vaapi and Wayland is just a black screen, then crashes on AMD/radeon graphics

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gstreamer-vaapi (Ubuntu):
status: New → Confirmed
Changed in totem (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
Dimitrij Mijoski (dimztimz) wrote :

I just got hit by this bug completely randomly. I did not wanted hardware acceleration, I just wanted to play some video and got black screen. It just happened that previously I had installed ubuntu-restricted-extras which automatically installs this vaapi thing. After I uninstalled ubuntu-restricted-extras i got my picture back.

Changed in mesa (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

See also bug 1767312.

summary: - Totem with gstreamer1.0-vaapi and Wayland is just a black screen, then
- crashes on AMD/radeon graphics
+ [radeon] Totem with gstreamer1.0-vaapi and Wayland is just a black
+ screen, then crashes.
no longer affects: totem (Ubuntu)
Changed in gstreamer-vaapi (Ubuntu):
importance: Undecided → High
Revision history for this message
Taddeo Manzi (sinistristradali) wrote :

Uninstalling gstreamer1.0-vaapi does not solve the issue for me.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sounds like we have a semi-permanent workaround now:

gstreamer-vaapi (1.16.0-3ubuntu2) eoan; urgency=medium

  * debian/patches/git_no_amd.patch:
    - backport an upstream change to disable vaapi with the amd drivers,
      the current experience is buggy and it's better to just not enable it
      see the discussions on this mailing list and the referenced bug
      https://mail.gnome.org/archives/distributor-list/2019-September

 -- Sebastien Bacher <email address hidden> Mon, 09 Sep 2019 17:09:08 +0200

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.