diff --git a/arch/firefox-fourier/PKGBUILD b/arch/firefox-fourier/PKGBUILD index ff9ea480b..dfa4e0b3a 100644 --- a/arch/firefox-fourier/PKGBUILD +++ b/arch/firefox-fourier/PKGBUILD @@ -13,7 +13,7 @@ pkgname=firefox-fourier pkgver=150.0.1 -pkgrel=1 +pkgrel=2 pkgdesc='Firefox with V4L2 stateless HW video decode unlocked for mainline Linux Rockchip' arch=('aarch64' 'x86_64') url='https://www.mozilla.org/firefox' @@ -87,8 +87,11 @@ source=( '0002-libwrapper-hwdevice-ctx-create.patch' '0003-ffmpegvideo-v4l2-request-route.patch' '0004-prefs-v4l2-request.patch' + # Vendor-default prefs that gate the patched VAAPI path on RK3399 — + # widget.dmabuf.force-enabled etc. See marfrit-packages#8 for evidence. + 'rockchip-fourier-defaults.js' ) -sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP') +sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP') prepare() { cd "${srcdir}/firefox-${pkgver}" @@ -160,4 +163,12 @@ export MOZ_X11_EGL="${MOZ_X11_EGL:-1}" exec /usr/lib/firefox-fourier/firefox-fourier "$@" LAUNCHER chmod 0755 "${pkgdir}/usr/bin/firefox-fourier" + + # Vendor-default prefs (RK3399 HW-decode unlock) — closes #8. + # Lower precedence than user prefs / about:config; loaded by Firefox + # at startup from the package install dir. The 0004 patch covers + # media.ffmpeg.v4l2-request.enabled; this file covers the three + # additional prefs that gate the path to the patched code. + install -Dm644 "${srcdir}/rockchip-fourier-defaults.js" \ + "${pkgdir}/usr/lib/firefox-fourier/browser/defaults/preferences/rockchip-fourier-defaults.js" } diff --git a/arch/firefox-fourier/rockchip-fourier-defaults.js b/arch/firefox-fourier/rockchip-fourier-defaults.js new file mode 100644 index 000000000..3226311a0 --- /dev/null +++ b/arch/firefox-fourier/rockchip-fourier-defaults.js @@ -0,0 +1,19 @@ +// firefox-fourier — RK3399 V4L2-stateless HW-decode default prefs. +// +// The patch series (0001..0004) builds the VAAPI / V4L2-request routing +// path through libavcodec, but the resulting code path is gated by three +// other prefs that are 'false' upstream because the relevant probes don't +// fire on panfrost EGL or trip the Intel-tuned cost heuristic. Without +// these, firefox-fourier silently SW-decodes on a fresh profile despite +// having all the unlock patches applied. +// +// Filed via marfrit/marfrit-packages#8 — see that issue for MOZ_LOG +// evidence on fresnel (Pinebook Pro / RK3399). +// +// These are *vendor* defaults: lower precedence than user.js and +// about:config user prefs. Power users who want to disable HW decode for +// debugging can flip them in user prefs without touching this file. + +pref("widget.dmabuf.force-enabled", true); +pref("media.hardware-video-decoding.force-enabled", true); +pref("media.ffvpx-hw.enabled", true);