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.
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:
Boot in CoreELEC-20.
Login to SSH and remount flash RW, mount -o rw/remount /flash
Edit the config.ini file to have vout=‘720p60hz’, save and close.
Reboot the device the user should not that 720p does not boot as it should, it initially boots 2160p.
Error Case 2:
Boot in CoreELEC-20
Change the display resolution to 720p.
SSH in and type fbset to get the details of the primary buffer.
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.
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:
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.
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.
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.