5f21a71770f53e2d6f76929be6d94068230c3914
11 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
5f21a71770 |
firefox-fourier patch #3: accept AV_HWDEVICE_TYPE_V4L2REQUEST too
Closes part of #60 (firefox-side patch update for fourier2 ffmpeg). Background: libavcodec61-fourier2 (Kwiboo v4l2-request-n7.1.3 backed) registers its hwaccels with AV_HWDEVICE_TYPE_V4L2REQUEST (the dedicated enum added in FFmpeg 7.1+), not AV_HWDEVICE_TYPE_DRM as fourier1 did. The firefox-fourier patch #3 walked hw_configs looking only for DRM and fell through to software for every codec. Patch updates: - CreateV4L2RequestDeviceContext now takes an int aDeviceType (Mozillas bundled libavutil headers may lack the V4L2REQUEST enumerator), passed through to av_hwdevice_ctx_create. - hw_configs walk accepts DRM (legacy) OR V4L2REQUEST integer value (13 on Kwibooss no-AMF tree, 14 on upstream-AMF tree). - Renamed mDRMDeviceContext to mV4L2RequestDeviceContext for accuracy. Build pkgrel will be bumped at debian-package level to +fourier2. |
||
|
|
108a3dabe6 |
firefox-fourier: ship .desktop launcher (pkgrel=7)
build and publish packages / distcc-avahi-aarch64 (push) Successful in 1m38s
build and publish packages / lmcp-any (push) Successful in 16s
build and publish packages / lmcp-debian (push) Successful in 9s
build and publish packages / claude-his-any (push) Successful in 14s
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Successful in 13m9s
build and publish packages / claude-his-debian (push) Successful in 9s
build and publish packages / libva-v4l2-request-fourier-aarch64 (push) Successful in 25s
build and publish packages / ffmpeg-v4l2-request-debian (push) Successful in 29m16s
build and publish packages / daedalus-v4l2-debian (push) Successful in 13s
build and publish packages / mpv-fourier-aarch64 (push) Successful in 1m46s
build and publish packages / libva-v4l2-request-fourier-debian (push) Successful in 31s
build and publish packages / daedalus-v4l2-dkms-debian (push) Successful in 7s
build and publish packages / mpv-fourier-debian (push) Successful in 2m31s
Stock firefox.desktop disappears when our 'provides=firefox' replaces stock firefox-arch, so installing firefox-fourier left the user without a Plasma/GNOME start-menu entry. Add firefox-fourier.desktop with Categories=Network;WebBrowser; (routes under Internet on KDE Plasma 6), MIME types for the usual web schemes, new-window / private-window actions, and the 128px icon from the package's internal browser/chrome/icons tree. Reported on ohm (PineTab2 / Plasma 6) — manual /usr/share/applications shim proved the file works; this commits it to the recipe so future installs Just Work. |
||
|
|
0a922a9f36 |
firefox-fourier: explicit CC/CXX=distcc in mozconfig
fermi's makepkg.conf already has BUILDENV=(distcc ...) which prepends /usr/lib/distcc/bin to PATH at build time. But Mozilla's mach configure picks CC/CXX from the environment directly — it doesn't treat the distcc shim in PATH as the default C compiler unless the env vars are set explicitly. Without this guard the distcc workers sat idle while mach drove a local-only build. Mirrors the explicit-distcc pattern already used in ffmpeg-v4l2-request-fourier/PKGBUILD. Caveat documented in the comment: only the C/C++ portion distributes. rustc and host-only build steps stay local. Empirical ~30-40% wall-clock improvement on a 4-worker pool (tesla, dcc1, dcc2, ampere via Avahi zeroconf). pkgrel bumped so a rebuild publishes a new package even though the binary output for users is unchanged (build process speedup only). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
d63d1cef72 |
firefox-fourier: move vendor-prefs to defaults/preferences/ (the path Firefox actually scans)
Empirical follow-up to #9. After packaging 150.0.1-4 and installing on fresnel, MOZ_LOG showed the failure pattern was still present: D/FFmpegVideo FFMPEG: Using preferred software codec h264 No VAAPI_VLD engagement, no dmabuf surface locking — Gecko bailed before reaching the patched VAAPI path. Same symptom as issue #8 pre-fix, despite the prefs file being on disk at the expected path. Root cause: /usr/lib/firefox-fourier/browser/defaults/preferences/ is NOT a vendor-prefs scan location in Firefox 150. Mozilla's canonical scan dir is /usr/lib/<app>/defaults/preferences/ — without the 'browser/' prefix. Verified by hand-copying the same file to /usr/lib/firefox-fourier/ defaults/preferences/ and re-running the H.264 playback test: D/FFmpegVideo FFMPEG: Requesting pixel format VAAPI_VLD D/Dmabuf VideoFrameSurface: VAAPI locking dmabuf surface UID 26267 FFMPEG ID 0x4000000 mAVHWFrameContext ... D/Dmabuf VideoFrameSurface: VAAPI locking dmabuf surface UID 26268 FFMPEG ID 0x4000001 ... (15+ surface locks) End-to-end zero-copy DMABUF path engaged, hantro/rkvdec dekodes the H.264 stream via libva-v4l2-request-fourier iter38b. pkgrel 4 -> 5. No other PKGBUILD changes. |
||
|
|
109858eae5 |
firefox-fourier: flatten patches to top-level (makepkg has no subdir support)
Follow-up to #10. The subdir layout I assumed worked turned out to not work — per 'man PKGBUILD': The filename in the array must NOT include any path components like ./ makepkg's source-staging only honors basenames; the patches/ subdir references staged the files but the basename-lookup at apply time failed with the same 'not found in build directory' error that #9 hit. I copied the chromium-fourier convention thinking it was proven, but chromium-fourier has no CI either and likely has the same latent breakage (separate issue, not in this PR's scope). The actually-working pattern is the mpv-fourier one: patches at the top level next to the PKGBUILD. mpv-fourier iter2 just built green on CI (#92) with that layout. This commit: - Moves all 8 patches (5 fourier + 3 arch upstream) from patches/ to arch/firefox-fourier/ via git mv (preserves blame). - Removes the now-empty patches/ subdir. - Strips 'patches/' prefix from source array entries. - Strips '/patches' from prepare() patch -i paths. No semantic change to the patch content or apply order. pkgrel 3 -> 4. |
||
|
|
f41e9a117b |
firefox-fourier: fix patches layout — ship arch-*.patch + reference patches/
The PKGBUILD has been structurally broken since at least the 150.0.1
import: source array referenced patches at top level ('0001-...patch')
but the actual files live in patches/ — makepkg searched for them in
the package root and failed before doing any work. The arch-0002/3/4
upstream toolchain patches (clang 22, glibc 2.43, Rust 1.95) weren't
shipped in the repo at all.
Caught when boltzmann tried to build 150.0.1-2 (PR #9 follow-up); fails
at the source-staging phase with:
==> ERROR: arch-0002-Bug-2033279-Make-enable-rust-simd-work-with-Rust-1.9.patch
was not found in the build directory and is not a URL.
Why nobody noticed: firefox-fourier has no Gitea Actions job (too heavy
for the runner pool). The shipped 150.0.1-1 .pkg.tar.zst was produced
by hand-staging files; the PKGBUILD itself never reproduced from a
clean checkout.
This commit:
- Moves all source-array patch references under patches/ to match the
on-disk layout (same convention as chromium-fourier).
- Updates prepare() paths accordingly.
- Adds arch-0002/3/4 patches fetched verbatim from
https://gitlab.archlinux.org/archlinux/packaging/packages/firefox
(raw/main/{0002,0003,0004}-...patch). Renamed with arch- prefix in
the repo to avoid namespace collision with the local 0001..0005.
- Adds the previously-omitted 0005-rdd-sandbox-v4l2-media-ctl.patch
to the source array + prepare(); this is the patch that broadens
the RDD sandbox so /dev/media* and /dev/video* ioctls reach the
decoder child (README §1 enumerates it as load-bearing for the HW
path). It was present in patches/ but not wired up.
Dry-run verified all 8 patches apply cleanly against firefox-150.0.1
source (some hunks offset by ≤3 lines, no conflicts).
pkgrel 2 -> 3.
|
||
|
|
62a594ab59 |
firefox-fourier: ship RK3399 HW-decode default prefs (closes #8)
Three prefs that gate the patched VAAPI / V4L2-request code path are 'false' upstream and need to be 'true' for the libva-v4l2-request backend to actually engage on RK3399 / panfrost EGL: widget.dmabuf.force-enabled media.hardware-video-decoding.force-enabled media.ffvpx-hw.enabled Without them, Gecko's DMA-BUF probe silently fails (panfrost EGL doesn't trip the right detection), the (Intel-tuned) HW-vs-SW cost heuristic picks SW, and the FFvpx PDM never selects its HW-capable variant for VP8/VP9. Net result: fresh profiles SW-decode despite the 0001..0004 unlock patches being applied. Shipped as a vendor-default file at: /usr/lib/firefox-fourier/browser/defaults/preferences/rockchip-fourier-defaults.js Lower precedence than user.js / about:config — power users debugging HW decode can still flip them off without touching the package. pkgrel 1 -> 2. Closes: #8 |
||
|
|
d0190e2c05 |
firefox-fourier: 0005 RDD sandbox carve-out for V4L2 stateless decode
Extends Mozilla's RDD sandbox to permit /dev/media* (driver-matched),
the MEDIA_IOC_* ioctl family ('|'), and the sysfs paths libudev would
need to enumerate the media controller (read-only AddTree on
/sys/class, /sys/bus, /sys/dev/char, /sys/devices/platform plus
/run/udev, /etc/udev/udev.conf, /proc/self, /dev/dma_heap).
Necessary but not sufficient on its own: Mozilla's OpenAtTrap
rejects fd-relative openat used by systemd's chase() inside libudev.
The companion ffmpeg-v4l2-request-git patch adds a brute-force
fallback that opens /dev/media[0..15] directly with absolute paths,
which composes with this broker policy.
Validated on RK3399 / Pinebook Pro / mainline rkvdec: with both
patches in place, default RDD sandbox runs HW decode at ~5% CPU on
1080p30 H.264 (vs ~64% software fallback before). Closes the
parity gap with MOZ_DISABLE_RDD_SANDBOX=1 baseline.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
047ed13e3d |
firefox-fourier patch 3: regenerate canonical diff with corrected hunk arithmetic
build and publish packages / distcc-avahi-aarch64 (push) Successful in 32s
build and publish packages / lmcp-any (push) Successful in 6s
build and publish packages / lmcp-debian (push) Successful in 5s
build and publish packages / claude-his-any (push) Successful in 6s
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Successful in 11m45s
build and publish packages / claude-his-debian (push) Successful in 5s
Earlier todays edit on patch 3 (commit
|
||
|
|
e0af915788 |
firefox-fourier patch 3: probe v4l2_request via codec name first
build and publish packages / distcc-avahi-aarch64 (push) Successful in 33s
build and publish packages / lmcp-any (push) Successful in 7s
build and publish packages / lmcp-debian (push) Successful in 6s
build and publish packages / claude-his-any (push) Successful in 8s
build and publish packages / claude-his-debian (push) Has been cancelled
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Has been cancelled
Diagnostic on fresnel (RK3399 / Mali-T860 / mainline) showed
InitV4L2RequestDecoder running at runtime but failing the
hw_configs sanity check:
FFMPEG: Initialising V4L2 stateless (request API) FFmpeg decoder
FFMPEG: codec h264 has no DRM hwaccel —
libavcodec built without --enable-v4l2-request?
FFMPEG: Initialising V4L2-DRM FFmpeg decoder ← falls through to stateful
FFMPEG: V4L2 codec h264_v4l2m2m : V4L2 mem2mem H.264 decoder wrapper
FFMPEG: Couldn't initialise V4L2 decoder ← stateful also fails
…despite the system libavcodec.so being built with
--enable-v4l2-request and exposing h264_v4l2request, vp8_v4l2request,
etc. as named AVCodec entries.
Root cause: libavcodec exposes v4l2_request through one of two
mechanisms depending on the build:
(a) Named AVCodec entry (legacy, distro-portable): looked up via
avcodec_find_decoder_by_name("h264_v4l2request"). ALARM,
Debian, most distros use this.
(b) hw_configs entry on the generic codec (modern, upstream): the
generic codec's AVCodecHWConfig array advertises
AV_HWDEVICE_TYPE_DRM. Setting hw_device_ctx binds the hwaccel.
Patch 3 originally only probed (b). On builds that ship (a) — the
common case — the check failed even though v4l2_request was fully
functional.
Fix: probe (a) first via the codec-name lookup table, fall back to
(b) walking hw_configs. Both shapes work; the decoder is opened with
whichever AVCodec the probe selected. The DRM hwdevice ctx
attachment is unchanged (both mechanisms need it for surface
allocation).
Patch description and the in-code comment block updated to document
the dual mechanism. Behaviour on stateful-only boards (Pi4 / vendor
MPP) preserved: neither named codec nor hw_configs DRM is registered,
the function bails out, the existing InitV4L2Decoder runs as before.
|
||
|
|
8756ce38be |
chromium-fourier r2 + firefox-fourier 150.0.1 + KWIN_PIVOT.md
build and publish packages / distcc-avahi-aarch64 (push) Successful in 46s
build and publish packages / lmcp-any (push) Successful in 9s
build and publish packages / lmcp-debian (push) Successful in 4s
build and publish packages / claude-his-any (push) Successful in 7s
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Successful in 12m8s
build and publish packages / claude-his-debian (push) Successful in 5s
chromium-fourier: - patch 3/3 nv12-external-oes-on-modifier-external-only.patch — adds NativePixmapEGLBinding::ModifierRequiresExternalOES helper, extends OzoneImageGLTexturesHolder::GetBinding to honor EGL external_only flag for NV12 dmabufs on panfrost / panthor. Validated on ohm (RK3566 hantro mainline 6.19.10): bbb_1080p30_h264.mp4 plays at 34.7 % combined CPU vs ~131 % pre-patch baseline (~3.8x). - PKGBUILD pkgrel 1->2, source array + sha256sums + prepare() hook for patch 4, patch numbering 1/2,2/2 -> 1/3,2/3,3/3. - NEXT.md appended with 2026-04-28 section: patch 4 design, validation log, KWin GL_ALPHA bug pinpoint (preexisting since 2026-03-06, affects every wayland video client; unrelated to chromium-fourier), device-renumbering note (/dev/video1 = encoder post-reboot). - KWIN_PIVOT.md: 4-phase plan to identify and patch KWin's glTexImage2D(internalFormat=GL_ALPHA) site, ohm-only test plan, scope discipline. - patches/ now tracked (compiler-rt-adjust-paths, enable-v4l2, wayland-allow-direct-egl-gles2, nv12-external-oes); the dead-end chromeos-pipeline-bypass.patch removed. firefox-fourier: - 4 patches (gfxinfo v4l2 stateless fourccs, libwrapper hwdevice ctx, ffmpegvideo v4l2-request route, prefs v4l2-request default). - PKGBUILD bumped to firefox 150.0.1, Arch toolchain glue patches layered in, mozconfig with --without-wasm-sandboxed-libraries for ALARM, package() launcher fix (rm -f symlink before cat > to avoid ENOENT through the dangling /usr/local symlink mach install drops). - 150.0.1-1-aarch64.pkg.tar.zst built on boltzmann (95 MB), pending fresnel power-on for V4L2 stateless validation on RK3399. |