Skip to content

Releases

Luna 1.2.2 – CoreELEC black screen fix (overlay)

Choose a tag to compare

@jose1711 jose1711 released this 03 Nov 11:58

CoreELEC: black screen / partial picture while streaming

Symptom: Moonlight stream is running (sound works, /sys/class/vdec/vdec_status shows the frame count increasing, no packet loss) but the TV is black, shows only a frozen Kodi spinner, or shows only the top-left corner of the picture.

What I observed (Amlogic, CoreELEC 21.3):

  • Kodi is frozen with SIGSTOP; its last frame stays on the OSD layer, which is above the video layer. prescript.sh blanks the OSD only once.
  • With the stock launch.sh the stream was black in 2 of 3 starts, even though the decoder was fine (frame count rising, no packet loss, correct bitrate) and the OSD had been blanked. The state I could read (display/mode, video/axis, screen_mode, dmesg) was identical in black and working starts, so I cannot name the exact kernel mechanism.
  • After a display mode change /sys/class/video/axis can be left at the old resolution (e.g. a 4K axis on a 1080p mode), which shows only a corner of the picture.
  • Changing things once in the middle of a running stream did not help; re-applying them from the start of the stream did.

Fix (launch.sh): while moonlight runs, re-apply the OSD blank (fb0), the video/axis matching the current display mode and screen_mode=normal (keeps aspect ratio) every 2 s; restore axis/screen_mode afterwards. Result: stock script 2/3 black starts, this one 0 of ~8.

Also fixes a missing space in chmod +x for create_bug_report.sh (the bug report dialog failed with PermissionError).

Install (overlay – no binaries included)

This is not a full add-on. It contains only the changed files and must be applied over an existing Luna 1.2.x install (which already has the bin/ and lib/ moonlight binaries):

# on the CoreELEC box (ssh), adjust path to the zip
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 (or disable/enable the add-on). Make sure the coreelec launch scripts are selected in Luna.

Tested on CoreELEC 21.3 (Amlogic, 4.9 kernel) with Sunshine as the host. Source: see commit on the matrix branch.