issue with CoreELEC (official): 19.5-Matrix_rc2 (Amlogic-ng.arm)
on the X96 2GB with /media/COREELEC/device_trees/gxl_p212_2g.dtb
copied to dtb.img
:
When TV coldstarts the box (= the box is powered from the TV over USB), then we always end up with kernel_hdmimode=576i50hz in resolution.ini
When it is not working (TV coldstarted the CoreELEC box):
CoreELEC:~ # cat /flash/config.ini | grep ^vout
vout='1080p60hz'
cat /sys/class/amhdmitx/amhdmitx0/disp_mode
VIC:22
CoreELEC:~ # fw_printenv bootargs
bootargs=rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 androidboot.selinux=permissive logo=osd1,loaded,0x3d800000,576cvbs maxcpus=4 vout=576cvbs,enable hdmimode=1080p60hz cvbsmode=576cvbs hdmitx= cvbsdrv=0 androidboot.firstboot=0 jtag=apao androidboot.hardware=amlogic mac=xxx androidboot.mac=xxx
CoreELEC:~ # dmesg | grep "fb:"| head -n 4
[ 0.000000@0]d fb: osd1
[ 0.000000@0]d fb: loaded
[ 0.000000@0]d fb: 0x3d800000
[ 0.000000@0]d fb: 576cvbs
CoreELEC:~ # cat /flash/resolution.ini
# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST!
kernel_hdmimode=576i50hz
frac_rate_policy=0
native_4k_gui=0
hdmitx=,
allfmt_names=2160p60hz 2160p50hz 2160p30hz 2160p25hz 2160p24hz smpte24hz smpte25hz smpte30hz smpte50hz smpte60hz 1080p25hz 1080p30hz 1080p50hz 1080p60hz 1080p24hz 1080p120hz 1080i60hz 1080i50hz 720p60hz 720p50hz 480p60hz 480i60hz 576p50hz 576i50hz 480p60hz_4x3 480i60hz_4x3 576p50hz_4x3 576i50hz_4x3 2160p60hz420 smpte60hz420 2160p50hz420 smpte50hz420 2560x1080p50hz 2560x1080p60hz 640x480p60hz 800x480p60hz 800x600p60hz 852x480p60hz 854x480p60hz 1024x600p60hz 1024x768p60hz 1152x864p75hz 1280x768p60hz 1280x800p60hz 1280x960p60hz 1280x1024p60hz 1360x768p60hz 1366x768p60hz 1400x1050p60hz 1440x900p60hz 1440x2560p60hz 2560x1440p60hz 1600x900p60hz 1600x1200p60hz 1680x1050p60hz 1920x1200p60hz 2048x1080p24hz 2160x1200p90hz 2560x1600p60hz 3440x1440p60hz 2400x1200p90hz 3840x1080p60hz invalid
vs.
when it is working (TV was already on when CoreELEC booted):
CoreELEC:~ # cat /flash/config.ini | grep ^vout
vout='1080p60hz'
CoreELEC:~ # cat /sys/class/amhdmitx/amhdmitx0/disp_mode
VIC:16
CoreELEC:~ # fw_printenv bootargs
bootargs=rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 androidboot.selinux=permissive logo=osd1,loaded,0x3d800000,576cvbs maxcpus=4 vout=576cvbs,enable hdmimode=1080p60hz cvbsmode=576cvbs hdmitx= cvbsdrv=0 androidboot.firstboot=0 jtag=apao androidboot.hardware=amlogic mac=xxx androidboot.mac=xxx
CoreELEC:~ # dmesg | grep "fb:"| head -n 4
[ 0.000000@0]d fb: osd1
[ 0.000000@0]d fb: loaded
[ 0.000000@0]d fb: 0x3d800000
[ 0.000000@0]d fb: 1080p60hz
CoreELEC:~ # cat /flash/resolution.ini
# WARNING DO NOT MODIFY THIS FILE! ALL CHANGES WILL BE LOST!
kernel_hdmimode=1080p60hz
frac_rate_policy=0
native_4k_gui=0
hdmitx=,
allfmt_names=2160p60hz 2160p50hz 2160p30hz 2160p25hz 2160p24hz smpte24hz smpte25hz smpte30hz smpte50hz smpte60hz 1080p25hz 1080p30hz 1080p50hz 1080p60hz 1080p24hz 1080p120hz 1080i60hz 1080i50hz 720p60hz 720p50hz 480p60hz 480i60hz 576p50hz 576i50hz 480p60hz_4x3 480i60hz_4x3 576p50hz_4x3 576i50hz_4x3 2160p60hz420 smpte60hz420 2160p50hz420 smpte50hz420 2560x1080p50hz 2560x1080p60hz 640x480p60hz 800x480p60hz 800x600p60hz 852x480p60hz 854x480p60hz 1024x600p60hz 1024x768p60hz 1152x864p75hz 1280x768p60hz 1280x800p60hz 1280x960p60hz 1280x1024p60hz 1360x768p60hz 1366x768p60hz 1400x1050p60hz 1440x900p60hz 1440x2560p60hz 2560x1440p60hz 1600x900p60hz 1600x1200p60hz 1680x1050p60hz 1920x1200p60hz 2048x1080p24hz 2160x1200p90hz 2560x1600p60hz 3440x1440p60hz 2400x1200p90hz 3840x1080p60hz invalid
This seems to suggest that even before the kernel starts to do anything, the firmware somehow sets the resolution to 576cvbs
when things go wrong.
Why? Is CoreELEC somehow defaulting to 576cvbs whereas we would want it to default to 1080p60hz? What is generating resolution.ini
and how can it be made to default to kernel_hdmimode=1080p60hz
instead of 576i50hz
?
NOTE: In the old LibreELEC with kernel 3.x (where it is working well), I had no custom resolution configured in config.ini but boot.ini conatined this block:
setenv bootrootfs "BOOT_IMAGE=kernel.img boot=UUID=0405-0637 disk=UUID=077f0773-4d14-47dd-9c5c-d73a1134aa1c"
setenv condev "ttyS0,115200"
setenv hdmimode "1080p60hz"
setenv hdmioutput "1"
setenv vpu "1"
setenv libreelec "quiet"
setenv hdmi_cec "1"
setenv uenv_addr 0x13000000
fatload mmc 0:1 ${loadaddr} kernel.img
fatload mmc 0:1 ${dtb_mem_addr} dtb.img
if fatload mmc 0:1 ${uenv_addr} config.ini; then env import -t ${uenv_addr} $filesize; fi
setenv libretech "no_console_suspend logo=osd1,loaded,0x3f800000,${hdmimode} vout=${hdmimode},enable hdmimode=${hdmimode} cvbsmode=nocvbs consoleblank=0"
if test "${hdmi_cec}" = "1"; then setenv cec "hdmitx=cec17"; fi
setenv bootargs "console=${condev} ${bootrootfs} ${libretech} ${cec} ${libreelec}"
So would we need vout=576cvbs hdmimode=1080p60hz,enable cvbsmode=nocvbs
to make it work? How to achieve that?
I have the growing suspicion that config.ini
is entirely ignored.
For comparison, LibreELEC-AMLGX.arm-11.0-nightly-20220918-bb49fdc-box.img.gz
does not have this issue.