CMA memmory leak on Amlogic S928X and s922x piers

Device: Ugoos AM8 Pro
SoC: Amlogic S928X / Amlogic S922X (as per @rykios response)
RAM: 8 GB
Boot medium: microSD
CoreELEC versions tested:
22 Alpha 1
22 Alpha 2
22 Alpha 3
22 Beta 1
22 nightly 20260730
22 nightly 20260806
DTB: stock am8 DTB supplied with each respective release
Firmware: 2.0.8
SD Card - Lexar A2, V30, U3, 128GB
Kodi: bundled with CoreELEC
Playback:
Native + Jellyfin integration
Media stored on NFS mount (kernel-level mount) + usb stick
Display:
1080p projector
SDR only
No HDR
No Dolby Vision

Problem
During hardware video playback, contiguous CMA memory gradually decreases until Kodi crashes and the system reboots.
Typical failure sequence:
Video plays normally.
Audio begins looping the last buffer.
Screen turns black.
Kodi crashes.
Device reboots (watchdog).
The problem only occurs during video playback.
System is stable indefinitely when:
idle (tested for 5 days)
playing music
browsing the UI

CMA observations
Initial:
CmaFree ≈ 1985 MB
During failing playback:
Naomi:~ # while true; do

date
grep -i cma /proc/meminfo
sleep 300
done
Thu Aug 6 14:50:49 CEST 2026
CmaTotal: 2347008 kB
CmaFree: 1817432 kB
Thu Aug 6 14:55:49 CEST 2026
CmaTotal: 2347008 kB
CmaFree: 1452008 kB
Thu Aug 6 15:00:50 CEST 2026
CmaTotal: 2347008 kB
CmaFree: 989240 kB
Thu Aug 6 15:05:50 CEST 2026
CmaTotal: 2347008 kB
CmaFree: 566996 kB
Thu Aug 6 15:10:50 CEST 2026
CmaTotal: 2347008 kB
CmaFree: 128112 kB

(examble on Sherlock Holmes 2009)

After stopping playback:
CmaFree recovers only partially (approximately 670 MB), never returning to the initial value.
Starting another video after this can causes an immediate crash if little of memory was left.
Normal system RAM does not show a comparable increase.

Debugging performed
Fresh SD card formatted before every installation
No restored userdata
Multiple CoreELEC versions tested
Different Arctic and stock estuary skins tested
Debug logging enabled
CMA monitored through:
grep -i Cma /proc/meminfo
DMA-BUF inspection:
cat /sys/kernel/debug/dma_buf/bufinfo
Result remains constant:
3 DMA-BUF objects
~87 MB total
No increasing exported DMA-BUF count was observed.
Kernel log before reboot contains only repeated:
dim:warn:irq:flag 0
No GPU fault, kernel panic, or OOM messages appear before SSH connection is lost.

Codec testing
Initially AV1 appeared stable, but further testing showed codec alone is not the determining factor.

Failing file
Alice in Wonderland
MKV
AV1 Main
1920×1080
10-bit
23.976 fps
AV1 codec string: av01.0.08M.10.0.111.01.01.01.0
Video bitrate: ~8.18 Mb/s
DTS-HD MA + DTS + AC3
2 PGS subtitle tracks
Result:
Rapid CMA depletion
Crash after approximately 20 minutes

Working file
Project Hail Mary
MKV
AV1 Main
1920×1080
10-bit
24 fps
AV1 codec string: av01.0.08M.10.0.110.01.01.01.0
Video bitrate: ~0.77 Mb/s
HE-AAC stereo
35 SRT subtitle tracks
Result:
Over 2 hours playback
No measurable CMA leak

Additional testing
Disabling subtitles does not resolve the issue.
Hard factory reset, stock skin, file played from usb flash drive, movie stripped from everything except video track - no subtitles, audio, tags, chapters etc - leak stills occurred but slower
FFmpeg software decoding reports no bitstream corruption.
Audio playback alone never reproduces the problem.
System idle for multiple days remains stable.

Additional information

Found 2 fully working files (ones where cma leak do not appear at all) - one a high bitrate BD rip ive transcoded myself (h265) and internet rip in low bitrate (av1) can provide them for analysis or send some ffmpeg probes
Im not an IT person report above is an export from AI chat after 2 months of trouble shooting and hitting the wall time and time again - if any additional information is necessary, please word it in a way layman can understand.
Approximately 80% (if not more) of my movie library of hundreds of movies are causing problems both files ripped from BD and transcoded by me as well as privatized from internet h264, h265, av1 all cause problems - tho movies and tv series with low bit-rate are in general less problematic than high quality rips (aka the shorter and smaller files the higher change I will manage to watch it through before it crash)
Ive added amologic s922x to tile as another user also reported that cma memory leak in Amlogic-NO discussion thread after ive first posted it there @rykios
according to rykios problem is resolved by rolling back to CE 21 - havent yet, tested it myself.

even tho the kodi crashed it did not create kodi_crash.log id say its sometimes do sometimes dont so im also attaching an older logs that do had that kodi_crash, cma memmory leak is a ssh export of cma memory logging while playing Sherlock Holmes

01_KODI.log (97.1 KB)

02_System.log (102.0 KB)

03_Hardware.log (42.0 KB)

04_Audio.log (12.6 KB)

05_Network.log (23.8 KB)

06_varlog.log (106.3 KB)

07_input.log (2.2 KB)

08_Filesystem.log (6.4 KB)

09_Journal-cur.log (148.5 KB)

CMA memmory leak .txt (539 Bytes)

01_KODI_CRASH.log (1.0 MB)

01_KODI_CRASH(1).log (442.9 KB)

And the samples to reproduce?

Id say if a problem persists on hundreds of movies no mater if thats just video track, straight bd rip, webrip, trascoded bd and on more than one device, its more of a systemic problem, than specific file but sure here is link to 2 movies - sometimes it crashes after 10 min sometimes after an hour so cant provide short samples - hail marry is working fine, no mater the version i do not have any cma leak, while sherlock holmes is leaking no mater which CE 22 ive tried.
https://mega.nz/folder/KrR1EZSL#_HQpXsG0QmuQ6px_jxU3cA

I’m also using 928x (SK1), but my device behaves normally.

Are you using the patched for FEL version of dovi.ko?
I tried that one before and it has memory leak issue on my device—perhaps because FEL doesn’t work on 928x—exhibiting the same symptom as yours, so I reverted back to the original.

Well, dear P, i dont think you can witness this with a sample, its something happening slowly, gradually, and becomes evident after a couple of days playing full movies (My movies are all 1080p, about 10-30 Gb max each) . You need to setup as the main box in your living room, use it normally. Goes without saying, should NOT update daily (as updating to the next nightly would “reset” this effect)

PS : I believe its Kodi-related, i remember i read a post about memory leaks in LE forum some days ago, cant find the post now… Will look again if you tell me its important to find it.

I did try couple different dovi.ko tho I have to be honest haven’t rly dove into them or actually found a reliable source with versions and actual recommendations what’s where. Can u post your dovi.ko or maybe a link where it’s best to source dovi.ko and upcoming releases/ updates?

My recording is crashing after 15 minutes, but at the same time, after a few rounds of testing, CMA’s leak on that exact movie became slower and slower, and it finally managed to play the whole movie, although it finished playing with just a few MB of free memory left. So, yeah, it’s a tricky one to test, and definitely a short, small file will not work for testing. I’m guessing a LOTR director’s cut of all the movies would be ideal, LOL.

@yabai is talking about this.
He is basically asking if you are using 5.15_2.6_dovi_patched_fix_fel.ko or the 5.15_2.6_dovi_patched.ko because it seems he had the same problem with the fix_fel one.

Those two are FEL version, I’m using this non-patched version:

@Silver1 not saying this will fix your issue but give it a whirl.

My bad, thank you for correcting me. :slightly_smiling_face: