You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
apple_avd: H.264 decode jobs fail with order-10 page allocation failure in avd_init_job (green frames / stalled playback in Chrome) #628
Since the AVD driver became available (linux-asahi 7.1.13.asahi3-1), H.264 hardware decoding fails intermittently and then consistently once memory is moderately fragmented. avd_init_job performs an order-10 (4 MB contiguous) kmalloc per decode job, which triggers warn_alloc page allocation failures. The decode job then never delivers frames.
User-visible symptoms in Chrome 153 (which picks up the new V4L2 stateless decoder for H.264):
HLS/H.264 streams: solid green video with working audio
Plain H.264 MP4 playback: player stuck at 0:00, spinner forever (the <video> element hangs)
VP9/AV1 content (e.g. most of YouTube) is unaffected (software decode), which makes the issue look "random" to users
Hardware / versions
Apple MacBook Pro (16-inch, M1 Pro, 2021) — MacBookPro18,1 / J316s
linux-asahi 7.1.13.asahi3-1
mesa 26.1.8-1
google-chrome 153.0.8010.47 (confirmed holding /dev/video0 open via fuser)
Reproduction
Boot, use the machine normally for a while (fragmentation makes it reliable; on a fresh boot it may take longer).
avd_init_job allocates a large per-job buffer with plain kmalloc (order-10 → 4 MB contiguous). Under normal desktop uptime, physically contiguous 4 MB chunks are frequently unavailable, so the allocation fails and the queued job is never completed — the m2m context stalls and userspace waits forever (Chrome's media pipeline hangs or composites empty/green frames). A kvmalloc/vmalloc or a preallocated/DMA pool for this buffer would avoid the failure mode entirely; failing that, the driver should fail the job cleanly so userspace can fall back to software decoding instead of hanging.
Workaround
--disable-accelerated-video-decode in Chrome restores software decoding and fully resolves the user-visible issue.
Confirming this on an M1 Max (MacBookPro18,1 / J316s), linux-asahi 7.1.13.asahi3-1, with the same avd_init_job order-10 trace. Two things to add.
VP9 is also affected, contrary to "VP9/AV1 content is unaffected (software decode)". AVD advertises a VP9 path (v4l2_vp9 is loaded and held by apple_avd) and Chrome takes it:
libva-v4l2request: detected 1 Request API decoder
libva-v4l2request: decoding vp9 via /dev/video0 [avd] (media /dev/media0)
libva-v4l2request: using CAPTURE format NV12 (640x480)
ERROR:media/base/status.h:573] DecoderStatus::0
A solid-magenta VP9 clip renders green, and --disable-accelerated-video-decode fixes it. VP9 on YouTube may look unaffected because a lot of what YouTube serves is AV1, which has no AVD path.
The VP9 failure may be a second mechanism. In my VP9 runs the frames come back zeroed with no warn_alloc trace in dmesg at all, while the H.264 runs log one allocation failure per playback attempt. So fixing the order-10 allocation may not be sufficient for VP9.
On method: a solid-colour clip makes this measurable rather than subjective, since the whole frame is one known value and a screenshot can be measured.
I measured RGB(0,124,0) where magenta was expected, which is what an all-zero YUV buffer gives through the YUV->RGB conversion — consistent with the job never delivering frames rather than delivering wrong ones.
Two controls that may save others time:
VP8 renders correctly, which isolates this to the codecs AVD actually handles.
The green survives --disable-gpu and --use-angle=swiftshader, so it is not Mesa, the GPU driver or the compositor.
Separately, this reaches more users than it might appear: google-chrome on Arch Linux ARM ships with VA-API enabled and picks up AVD automatically, so on distributions that install libva-v4l2_request-avd by default all H.264/VP9 video in Chrome breaks with no user action. Filed downstream at omacom/omarchy#12317.
Activity
sofus13 commentedon Sep 17, 2026
#615 would likely fix it. The chrome thing is also likely a user space issue. Please dont use llms to generate issues for you
thijsbrilleman commentedon Sep 17, 2026
Confirming this on an M1 Max (MacBookPro18,1 / J316s), linux-asahi 7.1.13.asahi3-1, with the same
avd_init_joborder-10 trace. Two things to add.VP9 is also affected, contrary to "VP9/AV1 content is unaffected (software decode)". AVD advertises a VP9 path (
v4l2_vp9is loaded and held byapple_avd) and Chrome takes it:A solid-magenta VP9 clip renders green, and
--disable-accelerated-video-decodefixes it. VP9 on YouTube may look unaffected because a lot of what YouTube serves is AV1, which has no AVD path.The VP9 failure may be a second mechanism. In my VP9 runs the frames come back zeroed with no
warn_alloctrace indmesgat all, while the H.264 runs log one allocation failure per playback attempt. So fixing the order-10 allocation may not be sufficient for VP9.On method: a solid-colour clip makes this measurable rather than subjective, since the whole frame is one known value and a screenshot can be measured.
ffmpeg -y -f lavfi -i "color=c=#FF00FF:s=640x480:d=10,format=yuv420p" \ -c:v libx264 -pix_fmt yuv420p /tmp/magenta.mp4I measured RGB(0,124,0) where magenta was expected, which is what an all-zero YUV buffer gives through the YUV->RGB conversion — consistent with the job never delivering frames rather than delivering wrong ones.
Two controls that may save others time:
--disable-gpuand--use-angle=swiftshader, so it is not Mesa, the GPU driver or the compositor.Separately, this reaches more users than it might appear:
google-chromeon Arch Linux ARM ships with VA-API enabled and picks up AVD automatically, so on distributions that installlibva-v4l2_request-avdby default all H.264/VP9 video in Chrome breaks with no user action. Filed downstream at omacom/omarchy#12317.