[Unofficial] moonlight-embedded

pardon my ignorance. I just installed coreelec on my fire tv cube gen 3 and I’m now trying to run this moonlight add-on there. my coreelec version is the latest one, not v18 or 19 linked at the top of this post. can I still install this on top of my existing coreelec?

I’m also honestly not clear on how to install this to begin with. is there a repo? is the zip above the repo?

Luna/Moonlight on CoreELEC: black screen while the stream is actually running (fix for launch.sh)

I ran into the “stream runs, sound works, but the TV stays black” problem that several people reported in this thread (e.g. posts 306, 326, 333, and the question in 343 whether it is a black screen or Kodi’s last frame on top), and found something that fixed it reliably for me. Sharing it in case it helps.

Setup: CoreELEC 21.3 (Amlogic, 4.9 kernel), Luna script.luna 1.2.1, Moonlight Embedded 2.5.3, host: Sunshine on Linux (NVIDIA, h264, 1280x1024 @ 60 fps, 8 Mbit/s).

Symptom: after starting a game/desktop from Luna the TV is black, or shows only a frozen Kodi busy spinner, or shows only the top-left corner of the picture. At the same time:

  • /sys/class/vdec/vdec_status shows the frame count increasing (decoder is fine, no dropped frames),
  • the network receives the expected bitrate, no Unrecoverable frame in moonlight’s log,
  • sound works.

So it is not a network/bitrate/fps problem. In my case it happened in about 2 of 3 starts with the stock launch.sh (the stock scripts are identical to current upstream), and it was intermittent - the state I could read (/sys/class/display/mode, /sys/class/video/axis, screen_mode, OSD enable events in dmesg) was the same in black and in working starts, so I can’t tell you the exact kernel mechanism.

What I did find:

  • Kodi is frozen with SIGSTOP while streaming, so its last frame stays on the OSD layer, which is above the video layer. prescript.sh blanks the OSD only once.
  • After a display mode change /sys/class/video/axis can stay at the old resolution (e.g. a 4K axis on a 1080p mode), so only a corner of the picture is visible.
  • Changing things once in the middle of a running stream did not help. Re-applying them from the start of the stream did.

Fix: a modified launch.sh (coreelec launch script) that, while moonlight is running, every 2 seconds re-applies the OSD blank on fb0, sets /sys/class/video/axis to match the current display mode, and sets /sys/class/video/screen_mode to 0 (keeps aspect ratio, useful for non-16:9 sources); it restores axis/screen_mode when moonlight exits. Result on my box: stock script ~2 of 3 starts black, with the fix 0 of ~8.

Note: blanking fb1 every 2 s made the picture flicker for me, so the loop only touches fb0 and fb1 is blanked once.

Install (overlay, no binaries included - apply over an existing Luna 1.2.x install):

unzip -o script.luna-1.2.2-coreelec-osd-fix-overlay.zip -d ~/.kodi/addons/
chmod +x ~/.kodi/addons/script.luna/resources/launchscripts/coreelec/launch.sh

Then restart Kodi and make sure the coreelec launch scripts are selected in Luna.

Release: Release Luna 1.2.2 – CoreELEC black screen fix (overlay) · jose1711/Luna · GitHub
Source (fork of TheChoconut/Luna, matrix branch): GitHub - jose1711/Luna: Luna Script for Kodi · GitHub

The release also fixes a small upstream bug in addon.py: os.system('chmod +x' + path) was missing a space, so create_bug_report.sh never became executable and the “Create bug report?” dialog crashed with PermissionError.

Unfortunately upstream Luna looks unmaintained (last commit Dec 2022, issues disabled), hence the fork. If anyone can test on other hardware (S905X3, S922X, Odroid) and report whether it helps, that would be great.

.202 moonlight, driver

  • Built for CoreELEC 22 nightly 2026-11-12
  • moonlight-common-c updated: security fixes, broken frames, races, leaks, mouse and controller fixes
  • Fix: after Ctrl+Alt+Shift+Q the next stream ended at the first key
  • drm: picture fitted again for each stream
  • drm: possible fix for a black stream after the last one ended with statistics on
  • aml: possible fix for a broken picture after a second decoder error
  • aml balanced: possibly lower latency, standing frame queue cut back
  • aml: reference frame invalidation only when decoder error marks can be turned off
  • Dolby Digital: possible fix for no sound on cards with a small buffer
  • Sound: delay held at 60 ms, whole packets dropped, possibly fewer clicks
  • Possible fix for a game menu scrolling by itself at stream start
  • Microsoft keyboards and mice no longer get rumble commands
  • Experimental: “Bluetooth pads on an older chip”, off by default: asks Xbox BLE pads for an 8.75-11.25 ms link instead of their fixed 7.5 ms; for testing with several pads on older BT chips

Thank you very much!! it runs almost perfect in h264, with hevc picture seems corrupted in my N2

I will test it deeply.

Regards

Thanks for testing! The N2 (S922X) is a chip I dont have, so a few details would help a lot:

  1. What does the corruption look like?

  2. Is “Capture buffers from the display driver” turned on? (addon settings, expert level).

  3. Video backend: drm or aml?

  4. I need logs: set Logging to debug in the addon settings, start an HEVC stream until the corruption shows, quit, and then, before starting anything else, over ssh:

    /storage/.kodi/userdata/addon_data/game.moonlight/moonlight.log

The corruption looks like if every colour were mixed and moving, completely pixeled.

It happens just with Video backend: drm.

No matter if Capture buffers from the display driver is turned on or not.

With aml works perfect in both modes with hevc :slight_smile:

Here you are the log, I hope it helps

moonlight-gui: 2026-11-16 21:32:02
moonlight-gui: frame pacing latency
moonlight-gui: video backend drm
moonlight-gui: capture buffers from the decoder
moonlight-gui: net.core.rmem_max 229376 → 33554432
moonlight-gui: net.core.rmem_default 229376 → 2097152
moonlight-gui: net.core.netdev_max_backlog 1000 → 5000
moonlight-gui: video layer on the way in: disable=0 output=1
moonlight-gui: vfm before loading: [00] default { decoder(0) amvideo} [01] default_amlvideo2 { vdin1(0) amlvideo2.1} [02] dvblpath { dvbldec(0) amlvideo(0) deinterlace(0) amvideo} [03] dvelpath { dveldec(0) dvel} [04] dvblpath2 { dvbldec2(0) videopip} [05] dvelpath2 { dveldec2(0) dvel} [06] dvhdmiin { dv_vdin(0) amvideo} provider list: receiver list: video_render.0 video_render.1 video_render.2 video_render.5 video_render.6 amvideo videopip videopip2 ppmgr videosync.0 dvel ionvideo ionvideo.1 ionvideo.2 ionvideo.3 ionvideo.4 ionvideo.5 ionvideo.6 ionvideo.7 ionvideo.8 v4lvideo.0 v4lvideo.1 v4lvideo.2 v4lvideo.3 v4lvideo.4 v4lvideo.5 v4lvideo.6 v4lvideo.7 v4lvideo.8 amlvideo aml_video.1 amlvideo2.0 amlvideo2.1 deinterlace dimulti.1 dimulti.2 dimulti.3
moonlight-gui: codec_mm before loading dbuf_trace: Dmabuf tracking [disable]
moonlight-gui: codec_mm before loading fastplay_enable: fastplay enable help: echo n > tvp_enable 0: disable fastplay 1: enable fastplay for 1080p playing(use default size)
moonlight-gui: codec_mm before loading tvp_enable: tvp_flag=16 tvp ref count=0 tvp enable help: echo n > tvp_enable 0: disable tvp(tvp size to 0) 1: enable tvp for 1080p playing(use default size) 2: enable tvp for 4k playing(use default 4k size)
moonlight-gui: codec_mm before loading tvp_region:
moonlight-gui: cma before loading: CmaTotal: 1011712 kB CmaFree: 922784 kB
moonlight-gui: loading the V4L2 decoder modules
== before
/dev/video10 /dev/video11 /dev/video12 /dev/video13 /dev/video14 /dev/video15 /dev/video16 /dev/video17 /dev/video18 /dev/video19 /dev/video20 /dev/video21 /dev/video23 /dev/video30 /dev/video31 /dev/video32 /dev/video33 /dev/video34 /dev/video35 /dev/video36 /dev/video37 /dev/video38 /dev/video_composer.0 /dev/video_composer.1 /dev/videosync

== loading amvdec_ports (multiplanar=1)
multiplanar: Y
== loading codec backends
amvdec_av1_fb_v4l
amvdec_av1_v4l
amvdec_avs2_fb_v4l
amvdec_avs2_v4l
amvdec_avs3_v4l
amvdec_h265_fb_v4l
amvdec_h265_v4l
amvdec_h266_v4l
amvdec_mavs_v4l
amvdec_mh264_v4l
amvdec_mmjpeg_v4l
amvdec_mmpeg12_v4l
amvdec_mmpeg4_v4l
amvdec_vc1_v4l
amvdec_vp9_fb_v4l
amvdec_vp9_v4l

== after
/dev/video10 amlvideo
/dev/video11 amlvideo2
/dev/video12 amlvideo2
/dev/video13 ionvideo
/dev/video14 ionvideo
/dev/video15 ionvideo
/dev/video16 ionvideo
/dev/video17 ionvideo
/dev/video18 ionvideo
/dev/video19 ionvideo
/dev/video20 ionvideo
/dev/video21 ionvideo
/dev/video23 amlvideo
/dev/video26 aml-vcodec-dec
/dev/video30 v4lvideo
/dev/video31 v4lvideo
/dev/video32 v4lvideo
/dev/video33 v4lvideo
/dev/video34 v4lvideo
/dev/video35 v4lvideo
/dev/video36 v4lvideo
/dev/video37 v4lvideo
/dev/video38 v4lvideo
/dev/video_composer.0
/dev/video_composer.1
/dev/videosync

Looking for a node named aml-vcodec-dec, usually /dev/video26.
They stay loaded until the next reboot: loading them again after rmmod hangs insmod.
moonlight-gui: V4L2 decoder present
moonlight-gui: amvdec_h265_v4l will keep frames after a lost packet
moonlight-gui: amvdec_mh264_v4l will keep frames after a lost packet
moonlight-gui: AV1 OBUs wrapped by the decoder driver (was 0)
moonlight-gui: vfm after loading: [00] default { decoder(0) amvideo} [01] default_amlvideo2 { vdin1(0) amlvideo2.1} [02] dvblpath { dvbldec(0) amlvideo(0) deinterlace(0) amvideo} [03] dvelpath { dveldec(0) dvel} [04] dvblpath2 { dvbldec2(0) videopip} [05] dvelpath2 { dveldec2(0) dvel} [06] dvhdmiin { dv_vdin(0) amvideo} provider list: receiver list: video_render.0 video_render.1 video_render.2 video_render.5 video_render.6 amvideo videopip videopip2 ppmgr videosync.0 dvel ionvideo ionvideo.1 ionvideo.2 ionvideo.3 ionvideo.4 ionvideo.5 ionvideo.6 ionvideo.7 ionvideo.8 v4lvideo.0 v4lvideo.1 v4lvideo.2 v4lvideo.3 v4lvideo.4 v4lvideo.5 v4lvideo.6 v4lvideo.7 v4lvideo.8 amlvideo aml_video.1 amlvideo2.0 amlvideo2.1 deinterlace dimulti.1 dimulti.2 dimulti.3
moonlight-gui: addon 22.0.12.202
moonlight-gui: stopping Kodi
moonlight-gui: Kodi stopped after 0.0s
moonlight-gui: starting the menu
UI: keys in /storage/.kodi/userdata/addon_data/game.moonlight/keys
UI: client.pem present
UI: key.pem present
UI: uniqueid.dat present
UI: using /dev/dri/card0
UI: connector 129, CRTC 89, 1920x1080@60
UI: display “SAMSUNG”, 17 modes, HDR no
UI: ShanWan PC/PS3/Android: ABS_X 0..255 rests at 128, centre 127, needs 50
UI: ShanWan PC/PS3/Android: ABS_Y 0..255 rests at 128, centre 127, needs 50
UI: ShanWan PC/PS3/Android: ABS_HAT0X -1..1 rests at 0, centre 0, needs 1
UI: ShanWan PC/PS3/Android: ABS_HAT0Y -1..1 rests at 0, centre 0, needs 1
Request http://192...*:47989/serverinfo?uniqueid=0123456789ABCDEF&uuid=013e2358-eb48-46f2-bde2-4a196135bb56
Response:

<?xml version="1.0" encoding="utf-8"?>

DESKTOP-KAIUMSS7.1.431.-13.23.0.74A078EF94-B9B6-BF00-049D-FDA32FB5A7814798447989186944998400:00:00:00:00:00192...*2570881448767SUNSHINE_SERVER_BUSY

Request https://192...*:47984/serverinfo?uniqueid=0123456789ABCDEF&uuid=76d9cae9-2157-4eb0-bf78-2b238890269c
Response:

<?xml version="1.0" encoding="utf-8"?>

DESKTOP-KAIUMSS7.1.431.-13.23.0.74A078EF94-B9B6-BF00-049D-FDA32FB5A781479844798918694499844c:82:a9:00:66:9d192...*2571881448767SUNSHINE_SERVER_BUSY

UI: PLAYSTATION(R)3Conteroller-PANHAI: ABS_X 0..255 rests at 127, centre 127, needs 50
UI: PLAYSTATION(R)3Conteroller-PANHAI: ABS_Y 0..255 rests at 127, centre 127, needs 50
UI: ir_keypad0_0: key 28 value 1 → OK
UI: ir_keypad0_0: key 28 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: ? 4 value 255 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: ? 4 value 127 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 546 value 1 → LEFT
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 546 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 545 value 1 → DOWN
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 545 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 1 → OK
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 547 value 1 → RIGHT
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 547 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 545 value 1 → DOWN
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 545 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 545 value 1 → DOWN
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 545 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 1 → OK
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 545 value 1 → DOWN
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 545 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 1 → OK
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 546 value 1 → LEFT
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 546 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 1 → OK
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 305 value 1 → BACK
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 305 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 305 value 1 → BACK
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 305 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 547 value 1 → RIGHT
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 547 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 1 → OK
UI: opening 192...*
Request http://192...*:47989/serverinfo?uniqueid=0123456789ABCDEF&uuid=ccc913be-838d-4a0a-be60-89f8b57780ff
Response:

<?xml version="1.0" encoding="utf-8"?>

DESKTOP-KAIUMSS7.1.431.-13.23.0.74A078EF94-B9B6-BF00-049D-FDA32FB5A7814798447989186944998400:00:00:00:00:00192...*2570881448767SUNSHINE_SERVER_BUSY

Request https://192...*:47984/serverinfo?uniqueid=0123456789ABCDEF&uuid=65fb9996-8c4f-4f34-aec9-4561ab398e57
Response:

<?xml version="1.0" encoding="utf-8"?>

DESKTOP-KAIUMSS7.1.431.-13.23.0.74A078EF94-B9B6-BF00-049D-FDA32FB5A781479844798918694499844c:82:a9:00:66:9d192...*2571881448767SUNSHINE_SERVER_BUSY

UI: 192...* paired=1 (over https: 1) currentGame=881448767 https=47984
Request https://192...*:47984/applist?uniqueid=0123456789ABCDEF&uuid=72615d75-70d4-4852-adbe-8d4d7febec0a
Response:

<?xml version="1.0" encoding="utf-8"?>

0Desktop8814487670GTA V7807552970Steam Big Picture1093255277

UI: 3 apps
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 547 value 1 → RIGHT
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 547 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 547 value 1 → RIGHT
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 547 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 1 → OK
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 1 → OK
UI: telling the host the display runs at 60.00 Hz
UI: PLAYSTATION(R)3Conteroller-PANHAI went away
UI: cec_input went away
UI: input_ethrcu went away
UI: ShanWan PC/PS3/Android went away
UI: ir_keypad_common went away
UI: ir_keypad0_0 went away
UI: ir_keypad0_1 went away
Request https://192...*:47984/applist?uniqueid=0123456789ABCDEF&uuid=bb25d8d8-2c6f-4a18-8c23-e8eb104facb1
Response:

<?xml version="1.0" encoding="utf-8"?>

0Desktop8814487670GTA V7807552970Steam Big Picture1093255277

Request https://192...*:47984/serverinfo?uniqueid=0123456789ABCDEF&uuid=a9aa1da4-b0b1-4d24-9f8e-dc3699820606
Response:

<?xml version="1.0" encoding="utf-8"?>

DESKTOP-KAIUMSS7.1.431.-13.23.0.74A078EF94-B9B6-BF00-049D-FDA32FB5A781479844798918694499844c:82:a9:00:66:9d192...*2571881448767SUNSHINE_SERVER_BUSY

Request https://192...*:47984/resume?uniqueid=0123456789ABCDEF&uuid=52af4792-346c-433d-9db4-1b1cffdeffd6&appid=881448767&mode=1920x1080x60&additionalStates=1&sops=1&rikey=8b8704756310ec1a3562209e57cc3528&rikeyid=184903263&localAudioPlayMode=0&surroundAudioInfo=196610&remoteControllersBitmap=3&gcmap=3&corever=1
Response:

<?xml version="1.0" encoding="utf-8"?>

rtspenc://192...*:480101

RTSP port: 48010
Initializing platform…done
Resolving host name…done
Initializing audio stream…done
Starting RTSP handshake…Reference frame invalidation is not supported by this host
Audio port: 48000
Video port: 47998
Control port: 47999
done
Initializing control stream…done
Initializing video stream…done
Initializing input stream…done
Starting control stream…done
[hevc_mp4toannexb @ 0xa372f80] The input looks like it is Annex B already
[hevc_v4l2m2m @ 0xa373be0] Using device /dev/video26
[hevc_v4l2m2m @ 0xa373be0] driver ‘aml-vcodec-dec’ on card ‘platform:amlogic’ in mplane mode
[hevc_v4l2m2m @ 0xa373be0] requesting formats: output=HEVC/none capture=YU12/yuv420p
Starting video stream…Using FFmpeg decoder: hevc_v4l2m2m
DRM: using /dev/dri/card0
DRM: connector 129, CRTC 89, mode 1920x1080@60, pixel clock 148500 kHz
DRM: 6 planes on this device, CRTC 89 is index 0
DRM: plane 31: primary, crtcs 0x1 (ours), no NV12, zpos 65
DRM: plane 44: overlay, crtcs 0x1 (ours), no NV12, zpos 66
DRM: plane 57: overlay, crtcs 0x1 (ours), no NV12, zpos 67
DRM: plane 70: primary, crtcs 0x2, no NV12, zpos 68
DRM: plane 83: overlay, crtcs 0x1 (ours), takes NV12, zpos 65
DRM: plane 86: overlay, crtcs 0x1 (ours), takes NV12, zpos 66
DRM: using overlay plane 83 for video (override with MOONLIGHT_DRM_PLANE)
DRM: frame pacing lowest latency
DRM: presenting through atomic commits, synced to the blank
DRM: statistics panel on overlay plane 44
DRM: primary plane 31 switched off
DRM: video layer was disable=0 output=1, switched on
done
Starting audio stream…ALSA: hw:AMLAUGESOUND set for stereo PCM over HDMI
ALSA: period 960, buffer 3840, start at 1920 frames
done
Starting input stream…done
Received first video packet after 100 ms
[hevc_v4l2m2m @ 0xa373be0] capture set to NM12
[hevc_v4l2m2m @ 0xa373be0] capture format nv12, handing out DMA-BUFs
DRM: frame 1920x1080 NV12, 2 object(s), 2 plane(s)
DRM: plane 0: pitch 1920, offset 0, object 0, modifier 0x0
DRM: plane 1: pitch 1920, offset 0, object 1, modifier 0x0
DRM: 1920x1080 video on a 1920x1080 display at 0,0 1920x1080
Received first audio packet after 200 ms
Initial audio resync period: 500 milliseconds
Assigned PLAYSTATION(R)3Conteroller-PANHAI as player 1 (uniq 09:0a:a6:94:63:25)
Controller arrival: player 1, mask 0x1, type 2, caps 0x1 (PLAYSTATION(R)3Conteroller-PANHAI)
Stopping input stream…done
Stopping audio stream…ENet wait interrupted
Control stream connection failed: 4
done
Stopping video stream…DRM: 386 frames committed (385 flips seen), 4 dropped by the pacer (1.03%)
DRM: host frame spacing: 5.7% within 1 ms, 0.0% 1-4 ms off, 0.0% 4-8 ms off, 94.3% more
DRM: network arrival spacing: 4.4% within 1 ms, 0.8% 1-4 ms off, 0.3% 4-8 ms off, 94.6% more
DRM: frames on screen for 1 refresh 18, 2 261, 3 105, 4 or more 0
done
Stopping control stream…ENet peer acknowledged disconnection
done
Cleaning up input stream…done
Cleaning up video stream…done
Cleaning up control stream…done
Cleaning up audio stream…done
Cleaning up platform…done
UI: connector 129, CRTC 89, 1920x1080@60
UI: display “SAMSUNG”, 17 modes, HDR no
UI: PLAYSTATION(R)3Conteroller-PANHAI: ABS_X 0..255 rests at 127, centre 127, needs 50
UI: PLAYSTATION(R)3Conteroller-PANHAI: ABS_Y 0..255 rests at 127, centre 127, needs 50
UI: ShanWan PC/PS3/Android: ABS_X 0..255 rests at 128, centre 127, needs 50
UI: ShanWan PC/PS3/Android: ABS_Y 0..255 rests at 128, centre 127, needs 50
UI: ShanWan PC/PS3/Android: ABS_HAT0X -1..1 rests at 0, centre 0, needs 1
UI: ShanWan PC/PS3/Android: ABS_HAT0Y -1..1 rests at 0, centre 0, needs 1
Request http://192...*:47989/serverinfo?uniqueid=0123456789ABCDEF&uuid=5761edca-2ca1-4eec-baf3-0bddd90fbece
Response:

<?xml version="1.0" encoding="utf-8"?>

DESKTOP-KAIUMSS7.1.431.-13.23.0.74A078EF94-B9B6-BF00-049D-FDA32FB5A7814798447989186944998400:00:00:00:00:00192...*2570881448767SUNSHINE_SERVER_BUSY

Request https://192...*:47984/serverinfo?uniqueid=0123456789ABCDEF&uuid=c733f5c0-38e4-4b74-8010-48cf3be52ddf
Response:

<?xml version="1.0" encoding="utf-8"?>

DESKTOP-KAIUMSS7.1.431.-13.23.0.74A078EF94-B9B6-BF00-049D-FDA32FB5A781479844798918694499844c:82:a9:00:66:9d192...*2571881448767SUNSHINE_SERVER_BUSY

UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 1 → OK
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 545 value 1 → DOWN
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 545 value 0 → -
UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 1 → OK
Request https://192...*:47984/cancel?uniqueid=0123456789ABCDEF&uuid=bdb28b35-1fb1-4fc9-ba6f-5b35d8738f04
Response:

<?xml version="1.0" encoding="utf-8"?>

1

UI: PLAYSTATION(R)3Conteroller-PANHAI: key 304 value 0 → -

.208 moonlight

  • fix: aml sometimes dropped frames down, new settings “one frame per refresh” (expert setting, on by default)
  • aml AV1: statistics no longer stuck at 48 fps
  • test fix: drm HEVC on S922X only (no compressed copy),
  • Menu: newer stb_image and stb_truetype

I forgot to ask @Sharuman : did you turn off UVM in the settings? Before you install the latest version, please disable it first. The “no compressed copy” change only applies to DRM without UVM, because UVM needs the compressed copy.

.209 moonlight

  • Settings rebuilt. Options that work without restarting Moonlight are now in the menu, at the bottom. Options that need a restart stay in Kodi’s expert settings.

I did it.

Now, if drm and UVM are actived picture is corrupted in one area (attached pocture)

With drm on, and UVM off, full screen is corruped/completely pixeled

Aml is working properly

The UVM result is a useful clue: corruption shrinking to one area with UVM on, then becoming full-screen with UVM off, points more to the DRM/compressed-copy buffer path than HEVC decoding itself, especially since aml is clean. I’d compare .208 and .209 with UVM toggled on the same HEVC sample, and capture a debug log for each run before restarting. If the one-area corruption stays in the same screen region with UVM on, that also helps distinguish a buffer/stride issue from decoder output corruption.

Thanks for testing, that helped a lot.

I think I found the cause. On the S922X chip in the N2, the HEVC decoder makes two copies of every frame. One of them is broken on this chip. Coreelec own decoder knows this and turns that copy off, so aml works. The decoder that drm uses doesn’t do this, so the picture breaks.

Drm alone can’t fix that. With UVM, drm uses the good copy instead. In 210 i added possibly fix for the S922X: drm now always turns UVM ON (only for N2 S922x) and makes only the good copy, just like coreelec aml.

aml works well on your box, so you can keep using it.