Amlogic-NO discussion

EDIT: Whitelisting only 1080p and 4K resolutions in the settings resolved the Kodi crashes; the problem has not recurred since.

Hello, I’ve found one possible :bug:. And inspected it with Opus. Is there something from CoreELEC point of view to fix it or is it only my misconfiguration?

Kodi freezes ~5 s into playback when switching to 2880x576p50hz (S905X5M, 22.0 nightly 20261002)

Device: S905X5M (dt-id s7d_s905x5m_4g_1gbit)
Build: CoreELEC 22.0-Piers_nightly_20261002, kernel 5.15.196,
common_drivers 4dbe1c27ae176fde4c1cbef7506618fd7f62b976
Sink: Denon AVR (EDID name “DENON-AVR”)
Full dmesg: https://paste.coreelec.org/2/e5uk

How I found it:
I use the Prima+ add-on (Czech streaming service iPrima):
GitHub - waladir/plugin.video.primaplus · GitHub (v1.5.5)
It only resolves a DASH (Widevine) stream and hands it over to inputstream.adaptive.
When I start an episode of some shows (tested with “ANO, šéfe” and “Zrádci”),
video and audio play normally for about 5 seconds, then the whole of Kodi
freezes (not just the add-on). It started with newer CoreELEC 22 nightlies (about one or two weeks ago).
At first I suspected the add-on, but dmesg shows the problem is in the
HDMI mode switch.

What happens (from dmesg):

  • 59.73 s playback starts, ammvdec_h264 decodes 1024x576 without errors
  • 60.16 s VIDEO_START
  • 65.87 s Kodi stops audio and tries to switch the output mode
    (“Adjust display refresh rate”) for the SD 576p/25fps content:

[65.874235] [drm:meson_hdmitx_decide_color_attr] ERROR invalid vic for 2880x576p50hz
[65.874300] [hdmitx:] HDMITX_ERROR hdmitx_common_validate_mode_locked: get vic from (2880x576p50hz) fail
[65.874312] [drm:meson_hdmitx_encoder_atomic_check] ERROR validate_mode fail for [2880x576p50hz-444,10bit]

After that nothing more is logged and Kodi stays frozen.
HD content does not trigger it, because no switch to a 576p mode happens.

Possible root cause:
The EDID of the AVR advertises VIC 38 (2880x576p50 16:9) but not VIC 37 (4:3).
In hdmitx_mode.c both VIC 37 and VIC 38 share the same name “2880x576p50hz”,
so hdmitx_mode_match_timing_name() returns the first match, VIC 37.
hdmitx_get_prefer_vic() has no 37/38 pair (only 480i/480p/576i/576p pairs),
so VIC 37 is checked against the EDID, is not found, and
hdmitx_common_parse_vic_in_edid() returns HDMI_0_UNKNOWN. The mode is
offered to Kodi, but can never be set. The same probably applies to
2880x480p60 (VIC 35/36; this EDID has only VIC 36).
In addition, Kodi does not recover from the failed atomic modeset and hangs.