[CoreElec 20] FrameBuffer Errors for Amlogic S905W and below

OS: CoreElec 20
Image Name: CoreELEC-Amlogic-ng.arm-20.0-Nexus_nightly_20221203-Generic.img.gz
Display Resolution: Try to use 720p or below.

Issue:
The virtual frame buffer does not try to match the resolution of the display/mode. It ALWAYS sets to 1920x3240 no matter what resolution you try to set it too. CoreELEC has a workaround that it resizes the virtual buffer to the display mode set, but this breaks resolutions in just about every emulator EmuELEC uses, because they expect the primary virtual buffer to be the same or use double buffering for the resolution to display correctly.

Error Case 1:

  1. Boot in CoreELEC-20.
  2. Login to SSH and remount flash RW, mount -o rw/remount /flash
  3. Edit the config.ini file to have vout=‘720p60hz’, save and close.
  4. Reboot the device the user should not that 720p does not boot as it should, it initially boots 2160p.

Error Case 2:

  1. Boot in CoreELEC-20
  2. Change the display resolution to 720p.
  3. SSH in and type fbset to get the details of the primary buffer.
mode "1280x720-0"
	# D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
	geometry 1280 720 1920 3240 32
	timings 0 0 0 0 0 0 0
	accel false
	rgba 8/16,8/8,8/0,8/24
endmode
  1. Try to change the geometry with:
    fbset -fb /dev/fb0 -g 1280 720 1280 1440 32
    Check fbset again, the virtual buffer will not have changed and remained fixed.

This is incorrect, the geometry should be 1280 720 1280 1440 32 (for progressive).
XRes virtual is defaulting to 1920, and YRes virtual is defaulting to 3240 (presumably 1080x3).

If you check dmesg | grep fb at the start it displays an error near the start, fb failed to init memory. I suspect that this issue may be related to the chipset fixing it’s virtual buffer and not allowing it changed.

I tested also on CoreELEC-Amlogic-ng.arm-19.5-Matrix_rc3-Generic.img.gz and 19.5 has the exact same issue.

Dmesg output for CoreELEC 19.5 with same error:

edit ref:

Main purpose of CoreELEC is video playback and there is no issue I assume?

If you have suggestion how to improve this behaviour then tell.

I don’t think CoreELEC has an issue unless some of your add-ons use the virtual frame buffers for dimensions of playing video.
EmuELEC emulators however most if not all added applications rely on the virtual frame buffer for being the same and the physical frame buffer. That is it should match like this:

mode "1280x720-0"
	# D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
	geometry 1280 720 1280 1440 32
	timings 0 0 0 0 0 0 0
	accel false
	rgba 8/16,8/8,8/0,8/24
endmode

Note the geometry line 1280x720 then 1280x1440 (for progressive display).
S905X chips upward do not have this issue as they allow modification of the virtual frame buffers dimensions, but the S905W chips and below, do not for the latest CoreELEC releases. I think in the past we used CoreELEC version 9.2 and it did not suffer from this bug.

I checked the older releases in EmuELEC to find where it exactly started occurring and found it was between versions 4.3 and 4.4 that the bug became present.

UPDATE:
I tried compiling Linux amlogic-4.9 into EmuELEC 4.4 and it still contained the error. So that leads me to believe that the issue is occuring between the CoreELEC versions.

And CoreELEC versions, v9.2 devel and v20.0 Nexus alpha

What I remember there is a libMali bug till S905X and the fb must be limited to 1080p. Not sure how it handle non standard resolutions. libMali is closed source and there will be no Bugfix for it anymore.

Ah that’s a shame. I guess if S905W and below need to drop resolutions properly they will have to use EmuELEC 4.3. Thanks anyway for the feedback.

Would you know where abouts the linux code it sets the virtual xres and yres for the first time and the conditional thats blocking it from lowering the virtual buffer than from what it’s initialized as? Maybe I can create a fix for lower resolutions.

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