Matrix - wrong output mode set on boot

Please collect full log after kodi started.
I don’t understand that is wrong on your system
Does it connected via hdmi-hdmi or some other connection?

this is from before. I switched refresh rate by playing a file. after that switch, the picture is there.

it seems ok from my limited understanding. kodi can see that the system is capable of all the resolutions. it can even see that it’s not capable of 576cvbs (I’ve never used cvbs, the box does have a port for a av-cable).

why would it boot up in that mode if it doesn’t find a HDMI sink?

as for the connection, it’s a convoluted setup:

all sources go into a “dumb” old AVR, that just electrically switches HDMI sources without doing anything to it (transparent passthrough). the HDMI output goes into a splitter. from the splitter one cable goes to the projector. the other goes to an HDMI audio extractor, its HDMI out connected to the TV and the Toslink out back to the AVR.

on boot the AVR is off. when it’s off, HDMI doesnt get passed through, so the HDMI cable from the box is “not connected”. as everything gets switched on, the box connects.

anyway, all of that doesn’t bother the old version.

2021-03-19 16:50:57.217 T:4935 INFO <general>: Found (1920x1080@60.000000) at 16, setting to RES_DESKTOP at 16
2021-03-19 16:51:01.503 T:4935 INFO <general>: GUI format 1920x1080, Display 1920x1080 @ 60.00 - Full Screen
From this log all looks ok and it started with 1080p60p resolution

yeah, I know. this is also why “echo 1080p60hz > /sys/class/display/mode” doesn’t do anything (see dmesg). but the screen is dark green. and dispinfo says the output is 576cvbs:
“------------ /sys/class/display/vinfo ------------
current vinfo:
name: 576cvbs”

if I switch refresh rates all is good again and dispinfo has changed to:
“------------ /sys/class/display/vinfo ------------
current vinfo:
name: 1080p50hz”

if I switch back to 60hz all stays good and dispinfo changes accordingly.

edit: so in summary I don’t think the problem is with kodi but with the underlying system.

for comparison, here is a dmesg from my 9.2.5 setup where there is no problem:
I’m not knowledgeable enough to spot the important differences, there is too much different for me to comprehend.

ok, after thinking through what I wrote, I have a working workaround:

created with
echo 1080p50hz > /sys/class/display/mode
echo 1080p60hz > /sys/class/display/mode

effectively letting the script do what I knew helped when done manually. interestingly enough it helps even though it is run before the HDMI connection is established. I don’t complain.

(I have tried to do only “echo 1080p60hz > /sys/class/display/mode” and unsurprisingly this did not work, because the system thinks it already outputs 1080p60hz and therefore doesn’t do anything.)

here is a dmesg with the workaround:
please note how on 0.455282@1 the system already wants to change to 1080p60hz but doesn’t because it thinks it already is there.
the workaround starts much later on 10.899305@1
and right on the next line it says:
[ 10.899411@1] fb: current vmode=576cvbs, cmd: 0x10000

so. this is not a solution but a workaround.

I will therefore not mark it as the solution and will reply and try to help with testing whatever ideas you might have. it is a regression from 9.2.5. (don’t know about the later 9.2. versions).


I don’t have ideas about correct solution right now.
But if something change I’ll inform you

1 Like

Great work, mate. This solves my problem with green, mint, pink colored screens, when I start my box before my TV ist started fully. It’s always a different color.

I was thinking that its strange this is happening. I mean the box booting before tv is too “normal” of an occurence to have all of CE end up in an unworkable state.

Ok, so CE needs to read the EMID data (or whatever its called) from the TV but the TV is off. I dont undestand whyin the absence of that data, why doesnt CE default to whatever is set by the GUI resolution setting.

I’m curious, so when the resolution data is missing what weird resolution does CE try on boot which causes these strange pink screens?

Default GUI resolution is set by Kodi, when it starts, and is not used by CE during boot. To set CE resolution options look into “config.ini” on root partition and there you can set your needed resolution in “HDMI custom mode” section.

correct. unfortunately this does not seem to work with Matrix when there is no HDMI connection established on boot, at least it doesn’t for me.

on 9.2.5-ng I didn’t even need the config.ini, it worked without it. just having a correct /storage/.kodi/userdata/disp_cap was enough.

as for the pink/green colours, from what I know about these things it could be a ycbcr/rgb issue. colour-coding is probably also embedded in the HDMI handshake and as that doesn’t take place properly when CE starts before the display something goes awry. why my workaround helps with that (changing refresh rate forth and back before the HDMI handshake) I don’t understand. but nice!

so I agree with Sholander in the other thread that your problem is probably something that cannot be fixed with my workaround.

more generally I wonder if CE does not use the hot-pluggability of HDMI.

There even is an example for 1080p60 in config.ini. Only problem is, it doesn’t work. At least not on my TV, an older LG non4k. This workaround does, so all is well what ends well.

? It does work, or does not work?

Editing config.ini doesn’t work. This workaround does.

something I noticed:

CE does seem to detect hot-plugging of HDMI and does something I don’t quite understand and maybe someone can enlighten me on this. when I boot my box with the workaround and turn on the display much later, it does seem to only complete boot or loading of Kodi when the HDMI sink gets connected.

my reason for thinking so is that when I do finally turn on the display I get the notifications from the addons right afterwards (in may case: auto update in x minutes, Netflix background services started, trakt sync). so it does seem to wait at least with the notifications for a display that would actually show them.

anyone knows why it does that? I don’t think that has to do with the underlying problem but maybe this functionality can guide us to a real fix. or maybe I will just learn something.

Thx for the workaround, I have the same error on X96 Max+ and an older LG TV connected with hdmi. (celec 9.2.5 and 9.2.7 works without a workaround)

I created a gist too for a more general version. (i have 720p60hz resolution)


# Workaround for CoreELEC 19.x-Matrix green screen error when TV switched on
# after the tv box.
# Tested on:
#   - X96 Max+ (CoreELEC 19.0, 19.1 rc1/rc2)
# Original idea from user dasdreHmomenT on
# File location: ~/.config/

original_value=$(cat "$display_mode_file")


if [ "$original_value" = "$temp_value1" ]; then
    echo "$temp_value2" > "$display_mode_file"
    echo "$temp_value1" > "$display_mode_file"

echo "$original_value" > "$display_mode_file"

I have the same problem with my S905X3-Boxes (HK1 and H96 Max X3) on two different TVs. Green, purple, etc. screen when TV is started.

Older Boxes (S905X, S905D) appear to not suffer from this problem.

This exactly I also asked myself for a long time. I just switch on power to the tv while the tv box has been running for hours already and nevertheless it appears as the box also had just started.

Thanks for the idea. This helps if my avr is down. I have a remote power off switch, and avr needs a manual press of a button. Therefore it is off by default and to late to start.
Now I can start remotely again, start the act and have the correct picture.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.