Raspberry Pi framebuffer_swap issue with recent firmware
Stuart Painting (5389) 718 posts |
Recent firmware builds (2024-05-03 and 2024-05-24) have a bug in start.elf/start4.elf – the “framebuffer_swap=0” line in config.txt is no longer honoured. Symptoms are that the screen display has red and blue swapped (the Raspberry Pi logo is purple instead of dark red, and other images are displayed with incorrect colours). Tested on Pi 4B and Pi 3B+, RISC OS 5.30. Workaround: Revert to 2024-02-29 firmware. (note: post edited to remove irrelevant nonsense. Mea culpa.) |
Chris Gransden (337) 1209 posts |
Setting framebuffer_swap=1 does give the correct colours so it still works. |
Stuart Painting (5389) 718 posts |
It looks like this was a deliberate change by Raspberry Pi Ltd. At a guess, they are expecting everyone to use the mailbox method rather than a config.txt setting. |
Rick Murray (539) 13907 posts |
Seems to me that the mailbox option would invert whatever framebuffer_swap had set? Doesn’t mean something got broken anyhoo, and it’s good to have a way of letting RISC OS sort this stuff out for itself. |
Jeffrey Lee (213) 6048 posts |
Yeah, the new behaviour is that the mailbox setting is inverting framebuffer_swap (previously the mailbox setting was being ignored). Which breaks RISC OS with framebuffer_swap=0 because RISC OS is setting the mailbox value to 1 (probably because we assumed 1 was going to be the correct value when the firmware gets fixed) This should fix it: https://gitlab.riscosopen.org/RiscOS/Sources/Video/HWSupport/BCMVideo/-/merge_requests/6 Or for existing ROMs you can just change framebuffer_swap to 1 in config.txt (and that will continue to work when you upgrade to a fixed ROM) |
Rick Murray (539) 13907 posts |
Is it possible to read what the configured framebuffer swap format is, prior to doing this invert behaviour? |
Jeffrey Lee (213) 6048 posts |
Yes – that’s one of the changes the merge request is making, so that the OS can get the correct colours regardless of the config.txt setting |
David Pitt (9872) 364 posts |
Just for clarification, after installing today’s, 24-06-06, beta Pi rom red and blue were transposed on the desktop. The firmware is the latest as downloaded today.
|
Stuart Painting (5389) 718 posts |
Hmmm. I just tried today’s ROM with 2024-05-24 firmware on a Pi 3B+ and a Pi 4B. The colours were correct with all possible settings of framebuffer_swap (0, 1, absent). I also tried switching from a 16-million colour mode to a 256-colour mode and back again. The colours resolutely remained the right way round. As far as I can see, it is working as it should. Is there some model of Pi on which it doesn’t work? |
David Pitt (9872) 364 posts |
That was my understanding, I was slightly surprised to see the colours transposed. Possibly this hinges on what is meant by firmware. By default, I still take that to mean the contents of the Fat partition. But :- *vcgencmd bootloader_version 2024/04/17 13:51:36 I shall now update the firmware properly! edit That is the latest eeprom and having reread the thread the issue is with start.elf/start4.elf. It is a Pi4B BTW. |
David Pitt (9872) 364 posts |
Sorry, blunder this end. |