-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yellow tinted framebuffer #3139
Comments
Can you confirm that the problem is purely kernel related? (e.g. same version of firmware shows the problem with newer kernel and not with older kernel)? (I would have expected the firmware to be more likely to have an effect than kernel when running without kms/fkms overlay). If that is true can you bisect the exact point in kernel tree when the problem started? |
It starts with 4.9.52 (cbb5c28). I did not test .51 as its almost the same as .52. 4.9.50 (b220176) is working correctly. I can try to bisect the exact commit but it looks like the commits in between are not always "buildable", e.g., the config seems to be missing. Did the other distros switch to the vc4 overlays already? I wonder why I'm the only one that has this problems. |
I think I have the commit: 4600e91 |
@JamesH65 any ideas? |
No ideas at all. All sounds extremely bizarre. @anyc Do you see the same issues with a new buster install, no userland changes, default config.txt etc |
The problem does not occur with the Raspbian image. If I enable the display output in uboot, it is shown correctly as well. During the kernel boot, I can see the blinking cursor in black and white for a few seconds. I also tried booting my initramfs with the raspbian kernel and firmware files and the colors are wrong too. I can't remember doing something special with the framebuffer or terminal. To me, it looks like it is showing wrong colors as soon as userspace is starting to write to the terminal. Did some kernel structures change that are exchanged with userspace or something like that? |
I just tried different firmware versions: 07937c7d48bcd44cc1015c6257ae2cfa5da51298 "kernel: Bump to 4.19.50" The following commit: 64b5649a41b69d09bfe0ed05448d28a66be3edfd "firmware: Updates for Pi4" does not work with the 4.19.66 kernel. I get the right colors with both firmwares if I use kernel 4.19.50. |
I noticed the following differences in the kernel log when the output is right and tinted: Correct output:
Tinted:
It looks like if bcm2708_fb (DMA?) initialization fails, the output looks correct. |
The above was with kernel 4.19.66 and different firmware versions.
|
After removing Uboot from the config.txt, I also got correct colors and noticed that the "simple-framebuffer" log messages where gone as well. It looks like Uboot adds a framebuffer node to the device tree (u-boot/u-boot@6a195d2#diff-3608b9bd11b662336b1548828cd97e15) which the simple-fb module of the kernel will pick up and use. Maybe it does not play well with the new framebuffer patches and this is causing my issues? Disabling simple-framebuffer in the kernel does not help as the kernel will not start. I had to patch Uboot to remove the simple-fb code, as it was hard-coded in the RPi board code although there is a CONFIG_ option available. But it looks like the kernel will not start as well. No output on the display or over the UART after Uboot started the kernel. :( |
If I disable CONFIG_LCD_DT_SIMPLEFB and CONFIG_VIDEO_BCM2835 in Uboot the kernel framebuffer is shown correcty. So I guess the uboot driver configures the framebuffer in a way the new kernel driver does not like. |
Daft thought - it's not trying to display an RGB565 buffer is it, and the lower bit depth is more obvious? |
Looks like you are right: Wrong colors with uboot: Right colors without display in uboot: It's strange though that the kernel (with wrong colors and distortion) shows: |
Well I know how the firmware sets up simplefb for use before vc4-fkms-v3d is loaded. That uses a gpu_mem allocation to reserve the memory. I have no idea how uboot is trying to reserve memory in this case. The framebuffer mailbox APIs have changed slightly with the multiple framebuffer support, but they should all be backwards compatible (only talking to the primary framebuffer by default). My other suspicion would be that you had managed to get multiple layers being rendered, but that doesn't appear to be the case. |
I have both vc4 overlays disabled. Could this happen if simplefb and bcm2708_fb both try to configure the framebuffer? Because I can see the first lines of the kernel output correctly and after around 6 seconds - when the bcm2708_fb lines appear in the log - the output is corrupted. |
I also tried to set the color depth in the config.txt but it didn't help. |
simplefb is normally set up by the firmware having preallocated a framebuffer and passed it into the display hardware to be on the screen. The kernel can then scrawl whatever it likes into that. It looks like u-boot's simplefb also goes through the same route as bcm2708_fb for configuring the framebuffer with the GPU allocating the buffer - https://github.com/u-boot/u-boot/blob/master/arch/arm/mach-bcm283x/msg.c#L108 I suspect that you're ending up with /dev/fb0 (simplefb) and /dev/fb1 (bcm2708_fb). However both will be going through the same interface to the GPU, therefore simplefb is likely to be losing the buffer it had mapped. simplefb will still be rendering to the old buffer address, and you'll therefore get a moderate mess. If u-boot is creating a simplefb device for the frame buffer, then it really should be ensuring that bcm2708_fb isn't configured. Generally speaking u-boot would be used with a mainline Linux kernel, and that wouldn't have bcm2708_fb present. |
I also encountered this problem. In the /dev, there are fb0 and fb1. I tried to close the simple framebuffer in uboot but it didn't work. Can anyone help me tell me how to close the simple framebuffer? Thank you |
I'd suggest you blacklist bcm2708_fb. Exactly how to do that may vary between distributions, but creating a file in /etc/modprobe.d/ with the contents |
6by9: Thank you! Do you know if bcm2708_fb provides any benefits over simplefb for Pis before v4? |
bcm2708_fb supports a number of parameters such as changing the bit depth of the framebuffer as it knows how to communicate with the firmware. It can also do screen blanking. simplefb literally stuffs a memory buffer on the screen and leaves it there forever. There is no control over it once it is created. |
So, for a proper solution, bcm2708_fb could also read the simplefb device tree node and adopt the initial settings - but only if the simplefb module is disabled? |
This driver is built-in so we disable it's init. We need to disable this kernel driver in order to avoid concurrent access to the GPU from both the kernel bcm2708_fb driver and u-boot's simplefb driver. (See raspberrypi/linux#3139) Changelog-entry: Disable bcm2708_fb driver (kernel 4.19.66) so we have working graphics Signed-off-by: Florin Sarbu <[email protected]>
We need to disable this kernel driver in order to avoid concurrent access to the GPU from both this driver and the bcm2708_fb driver. (See raspberrypi/linux#3139) Changelog-entry: Disable the kernel simple framebuffer driver (kernel 4.19) so we have working graphics Signed-off-by: Florin Sarbu <[email protected]>
I updated from official 4.19.75 to 4.19.81 and now the frame buffer graphics is totally distorted. Console displays correctly, but the boot logo (that is simple 800x480 image copied to /dev/fb0) is rendered wrong. The framebuffer depth seems to be reduced to 16-bit. Adding framebuffer_depth=32 to /boot/config.txt does not help. Is it the bug or has there been some change which I have to adapt to? |
@BigMuscle85 Are you using u-boot? If yes then it is likely to be the same issue (mainly of u-boot) and you need to black-list bcm2708_fb. |
I don't know what u-boot is, so probably not. It is just a plain Raspbian Lite Buster image. I noticed that even Xorg server displays 16-bit colors only. The current workaround is to execute "fbset -depth 32" in our boot script. |
@BigMuscle85 See #3331. Independent regression to this u-boot issue. |
This issue will be closed within 30 days unless further interactions are posted. If you wish this issue to remain open, please add a comment. A closed issue may be reopened if requested. |
On 4.19 kernels this u-boot driver clashes with bcm2708_fb. So let's disable it from here so that we have bcm2708_fb enabled in the kernel, just as Raspbian users might expect. See raspberrypi/linux#3139 Upstream-Status: Inappropriate [configuration] Signed-off-by: Florin Sarbu <[email protected]>
Closing due to lack of activity. Please request to be reopened if you feel this issue is still relevant. |
I recently updated several RPis (2 and 3, with an own-built userland) from kernel 4.9.50 to 4.9.63 and 4.9.64. With these kernels, the framebuffer console has a yellow tint - text and background. If I downgrade the kernel again, the console is shown correctly - white text on black background. All Pis have a different type of monitor attached.
Does somebody have an idea what might cause this behavior?
I also tried different HDMI settings in config.txt like setting the mode manually but it does not help.
If I add
dtoverlay=vc4-kms-v3d
to config.txt, the console is shown correctly.Thank you!
Right now, I have a the following two Pis at hand that show this behavior:
** Raspberry Pi 2 Model B Rev 1.1
** Raspberry Pi 3 Model B Rev 1.2
cat /etc/rpi-issue
)?Own-built userland
vcgencmd version
)?The firmware with the .64 kernel:
Aug 6 2019 13:14:10
Copyright (c) 2012 Broadcom
version dd0dc7bd0bdbeb1ca6be21dc49847c7a5331457c (clean) (release) (start)
config.txt
I will try to debug why this fails:
The text was updated successfully, but these errors were encountered: