[bug#77827] gnu: librewolf: Fix video playback.

Message ID Z_6Nljez-qBNthpT@kernelpanicroom
State New
Headers
Series [bug#77827] gnu: librewolf: Fix video playback. |

Commit Message

Jakob Kirsch April 15, 2025, 4:47 p.m. UTC
  This patch fixes the video playback issue with librewolf.
From ebe6707d964fca6f47cf778559f6890bf67665dd Mon Sep 17 00:00:00 2001
Message-ID: <ebe6707d964fca6f47cf778559f6890bf67665dd.1744735632.git.jakob.kirsch@web.de>
From: Jakob Kirsch <jakob.kirsch@web.de>
Date: Tue, 15 Apr 2025 18:44:58 +0200
Subject: [PATCH] gnu: librewolf: Fix video playback.

Firefox seems to enable VAAPI starting with version 137, which depends on libpciaccess.
Without it, video playback randomly stops and doesn't work until you restart the browser.

* gnu/packages/librewolf.scm (librewolf): [inputs]: Add libpciaccess.

Change-Id: I87332f53a41ef64639c9770c6dbfcac1eefe2e84
---
 gnu/packages/librewolf.scm | 1 +
 1 file changed, 1 insertion(+)


base-commit: dd947985522886f9de6fdfdde3f0601e42219da5
  

Comments

Ian Eure April 16, 2025, 5:07 a.m. UTC | #1
Hi Jakob,

Jakob Kirsch <jakob.kirsch@web.de> writes:

> oops, forgot to actually add it to LD_LIBRARY_PATH

Please send patches with `git send-email'.  The subject line of 
your v2 patch is incorrect (it should be with "[PATCH v2] gnu: 
librewolf: Fix video playback."), which means mumi applied the v1 
patch.  Consquently, I have to manually apply the changes and 
rebuild -- since that takes over an hour, I won’t be able to push 
this patch until tomorrow at the earliest.

Hopefully the GCD to move to Codeberg will be accepted, which will 
be a huge improvement for this kind of problem.

Thanks,

  -- Ian
  
Julian Flake April 18, 2025, 7:41 a.m. UTC | #2
Hi Ian,

thank you for the latest patches. Unfortunately video playback 
still does not work for me on 
4fd529dce953572551e299c0c604a645f0cbeed0 / 137.0.2-1.

Best Regards,
nutcase
  
Ian Eure April 19, 2025, 6:17 p.m. UTC | #3
Hi Julian, Jakob,

Julian Flake <julian@flake.de> writes:

> Hi Ian,
>
> thank you for the latest patches. Unfortunately video playback 
> still
> does not work for me on 4fd529dce953572551e299c0c604a645f0cbeed0 
> /
> 137.0.2-1.

Yep, I pushed the patch even though it didn’t fully fix the issue. 
Are you using non-free video drivers?  I am, and my symptoms don’t 
match what Jakob mentioned: video playback doesn’t work at all for 
me, but Jakob said video playback works, but poorly.

Jakob, can you confirm your symptoms and whether you’re using 
non-free drivers or not?

In the mean time you can go into about:config and set 
media.hardware-video-decoding.enabled to false, then restart the 
browser.  This restores the 136.x status quo of video playback 
working, but without hardware acceleration.  I’ll do some testing, 
but will likely push a patch making this the default.

Hardware video decoding is an issue in Guix for *all* 
Firefox-derived browsers, has been for some time[2], and I think 
the issue has to be something with the underlying libraries on 
Guix, though I don’t know what it is.  I don’t see these issues on 
Debian.  If anyone has ideas or patches, I’d love to hear.

Thanks,
  -- Ian

[1]: 
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/137
[2]: See #72265, this also affects mullvad, torbrowser, icecat, 
and Firefox in nonguix.
  
Julian Flake April 19, 2025, 7:32 p.m. UTC | #4
Hi Ian,

thanks for your response + tests.

On Sat, Apr 19 2025, Ian Eure wrote:

> Yep, I pushed the patch even though it didn’t fully fix the 
> issue. Are
> you using non-free video drivers?

Yes, I think I do. This is what I get in my shell, when trying to 
playback some video:

--8<---------------cut here---------------start------------->8---
➜  ~ librewolf
libva info: VA-API version 1.22.0
libva info: Trying to open 
/run/current-system/profile/lib/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open 
/run/current-system/profile/lib/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
--8<---------------cut here---------------end--------------->8---

> I am, and my symptoms don’t match
> what Jakob mentioned: video playback doesn’t work at all for me, 
> but
> Jakob said video playback works, but poorly.

Same here. Video playback doesn't work for me at all with hardware 
acceleration enabled (starting with 137, I think). Without hw 
acceleration (I disable it in the settings), playback works. 

> Hardware video decoding is an issue in Guix for *all* 
> Firefox-derived
> browsers, has been for some time[2], and I think the issue has 
> to be
> something with the underlying libraries on Guix, though I don’t 
> know
> what it is.  I don’t see these issues on Debian.  If anyone has 
> ideas
> or patches, I’d love to hear.

I did not change my setting (hw acceleration) during the 
transition from 136 to 137. Finally, I confirm that this is the 
state with 137 of another Firefox derivation as well.

best, nutcase
  

Patch

diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm
index 47ac7c74a2..db00e92e89 100644
--- a/gnu/packages/librewolf.scm
+++ b/gnu/packages/librewolf.scm
@@ -661,6 +661,7 @@  (define-public librewolf
                   libgnome
                   libjpeg-turbo
                   libnotify
+                  libpciaccess
                   libpng-apng-for-librewolf
                   libva
                   libvpx