<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>197752</bug_id>
          
          <creation_ts>2019-05-09 12:29:29 -0700</creation_ts>
          <short_desc>[GStreamer] Consider blacklisting gstreamer-vaapi</short_desc>
          <delta_ts>2023-03-23 11:22:53 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=240664</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>calvaris</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>pnormand</cc>
    
    <cc>vjaquez</cc>
    
    <cc>webkit-bugzilla</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1534824</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-05-09 12:29:29 -0700</bug_when>
    <thetext>After removing gstreamer-vaapi from the GNOME runtime, I noticed:

 (a) Video corruption issues reported at https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/100 are fixed
 (b) Dramatically improved scrolling performance and web process responsiveness on pages with certain videos
 (c) Dramatic reduction in web process hangs on pages with certain videos

I&apos;m pretty sure gstreamer-vaapi is responsible for souring a large number of users on WebKit. It makes our web engine perform really bad. The quality difference after disabling it is really huge.

I suggest we disable use of gstreamer-vaapi at the WebKit level, to immediately ensure a quality user experience until we are able to investigate and resolve (b) and (c).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1534960</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2019-05-10 00:59:44 -0700</bug_when>
    <thetext>There are 2 independent options:

- Blacklist AMDGPU in gst-vaapi, until its maintenance is increased and the issues are fixed
- Víctor suggested to add a web-setting to disable hw-accelerated playback in WebKit, which also makes sense.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1534973</commentid>
    <comment_count>2</comment_count>
    <who name="Víctor M. Jáquez L.">vjaquez</who>
    <bug_when>2019-05-10 03:51:42 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #1)
&gt; There are 2 independent options:
&gt; 
&gt; - Blacklist AMDGPU in gst-vaapi, until its maintenance is increased and the
&gt; issues are fixed

https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/merge_requests/72

&gt; - Víctor suggested to add a web-setting to disable hw-accelerated playback
&gt; in WebKit, which also makes sense.

o/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1534991</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-05-10 07:42:54 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #1)
&gt; - Blacklist AMDGPU in gst-vaapi, until its maintenance is increased and the
&gt; issues are fixed

Are Intel users not experiencing these problems? If so, OK, of course. Presuming that patch in gstreamer-vaapi!72 is going to actually land soon.

&gt; - Víctor suggested to add a web-setting to disable hw-accelerated playback
&gt; in WebKit, which also makes sense.

I mean, we could. But if it&apos;s off by default, nobody will ever turn it on. And if it&apos;s on by default, then it would become another setting that just needs to be disabled to make WebKit work, like accelerated compositing mode. For Epiphany, I would disable it unconditionally and then Intel users won&apos;t have -vaapi either.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536210</commentid>
    <comment_count>4</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2019-05-14 13:05:26 -0700</bug_when>
    <thetext>*** Bug 197872 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536469</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-05-15 10:10:00 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #0)
&gt; After removing gstreamer-vaapi from the GNOME runtime, I noticed:
&gt; 
&gt;  (a) Video corruption issues reported at
&gt; https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/100 are fixed
&gt;  (b) Dramatically improved scrolling performance and web process
&gt; responsiveness on pages with certain videos
&gt;  (c) Dramatic reduction in web process hangs on pages with certain videos

(a) should be fixed now (in mesa), but I don&apos;t know about (b) and (c).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536472</commentid>
    <comment_count>6</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2019-05-15 10:14:12 -0700</bug_when>
    <thetext>Do we have detailed and reproducible bug reports for the remaining issues?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536492</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-05-15 10:40:55 -0700</bug_when>
    <thetext>Nope.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536536</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-05-15 12:18:49 -0700</bug_when>
    <thetext>What we could do is: once we get a freedesktop-sdk update containing the new mesa, do a test build with gst-vaapi restored. Then we can decide if we need to report more bugs and rollback (likely) or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536555</commentid>
    <comment_count>9</comment_count>
    <who name="Lionir">webkit-bugzilla</who>
    <bug_when>2019-05-15 13:18:17 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #8)
&gt; What we could do is: once we get a freedesktop-sdk update containing the new
&gt; mesa, do a test build with gst-vaapi restored. Then we can decide if we need
&gt; to report more bugs and rollback (likely) or not.

I&apos;d love to help test this build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1536646</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-05-15 15:52:35 -0700</bug_when>
    <thetext>Great, then we&apos;ll have three data points (you, me, Philippe). More testing is better here.

It&apos;s going to be some time before the new mesa reaches freedesktop-sdk though, and GNOME is often delayed in updating freedesktop-sdk if there are regressions. So now we wait.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1545124</commentid>
    <comment_count>11</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-06-16 06:21:01 -0700</bug_when>
    <thetext>Status update: freedesktop-sdk has adopted Phil&apos;s patch from https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/merge_requests/72 and I&apos;ve re-added gstreamer-vaapi to the GNOME runtime for testing. If it works for me, then we&apos;ll keep gstreamer-vaapi in the runtime for now.

That !72 should really urgently be applied upstream.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1547444</commentid>
    <comment_count>12</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-06-24 11:46:03 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #11)
&gt; If it works for me, then we&apos;ll keep gstreamer-vaapi in the runtime for now.

Yeah, all good here.

&gt; That !72 should really urgently be applied upstream.

Since this merge request still has not been accepted upstream, I really think it&apos;s time to proceed here. Leaving WebKit broken for tons of users isn&apos;t cool. I don&apos;t know how to blacklist GStreamer elements, but surely it&apos;s possible?

I don&apos;t think this would be needed if !72 were merged, but it doesn&apos;t seem likely to happen?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1547487</commentid>
    <comment_count>13</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2019-06-24 12:36:53 -0700</bug_when>
    <thetext>No. We can&apos;t blacklist vaapi unconditionally. It seems to work fine on Intel GPUs so I would rather NOT penalise Intel users for the well-being of AMD users...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1547520</commentid>
    <comment_count>14</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-06-24 13:31:44 -0700</bug_when>
    <thetext>Then could you push harder to land your !72 merge request, please? Because that really works based on my testing, and should eliminate all complaints.

Otherwise, the choice is between performance and correctness. I&apos;d much rather all users receive non-accelerated video that works rather than broken video.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1550365</commentid>
    <comment_count>15</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-07-05 08:31:51 -0700</bug_when>
    <thetext>Update on this, trying to keep a bunch of parallel bugs in sync. freedesktop-sdk stopped using !72 and instead just disabled the gallium vaapi driver. This might have been a mistake, though: now we are getting complaints from non-gstreamer users of vaapi. Turns out everyone agrees that gallium driver is fine and gstreamer-vaapi is to blame for misusing it. That bug is https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/137.

And !72 has still not yet been merged.

This is just such a mess, and what&apos;s worse, it causes me to lose confidence in GStreamer itself as a dependency. It seems too easy to break WebKit by installing a bad GStreamer plugin. :/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1648486</commentid>
    <comment_count>16</comment_count>
    <who name="Víctor M. Jáquez L.">vjaquez</who>
    <bug_when>2020-05-04 02:02:35 -0700</bug_when>
    <thetext>In the last gstreamer hackfest I added a flag in playbin to block hardware-based decoders: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/485

With it we could add a setting to disable hardware accelerated decoders, if the user meet issues in their setup.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1648516</commentid>
    <comment_count>17</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-05-04 07:23:27 -0700</bug_when>
    <thetext>That might be good to do.

Regardless, you solved this issue last year when you merged gstreamer-vaapi!72. I haven&apos;t had a problem since then, and I haven&apos;t heard complaints from users since then either. So I don&apos;t think we need to keep this particular bug open anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1943434</commentid>
    <comment_count>18</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-03-23 11:22:53 -0700</bug_when>
    <thetext>This actually did eventually land in bug #240664</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>