meta-raspberrypi icon indicating copy to clipboard operation
meta-raspberrypi copied to clipboard

Raspberry Pi 7inch Display + KMS are displaying black/white bars

Open ykuzma1 opened this issue 1 year ago • 10 comments

Description The official Raspberry Pi 7 inch display consistently shows black and white bars after boot when using the KMS graphics driver. The HDMI display does show the correct output however. Pictures attached.

Steps to reproduce the issue:

MACHINE = "raspberrypi4"
DISTRO = "poky"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
ENABLE_UART = "1"
IMAGE_INSTALL:append = " kmscube"
LICENSE_FLAGS_ACCEPTED += "synaptics-killswitch"
bitbake core-image-base

Describe the results you received: The RPi 7in display does initially show the rainbow screen and four raspberry graphics, but then immediately fades out to black and white bars. The HDMI display shows the rainbow and raspberry graphics like the RPi display but boots to a visible console and can launch kmscube successfully.

Describe the results you expected: console and kmscube working on the RPi 7in display.

Additional information you deem important (e.g. issue happens only occasionally):

  • Attempted using RPi OS - does work correctly!
  • Attempted using FKMS driver (core-image-base) - does work correctly! Performance is lacking.
  • Attempted using FKMS driver (core-image-minimal) - does display correctly but does not respond to touch input and has poor performance (perhaps related to issue #1079?)
  • Attempted building for Raspberry Pi 3 & 4 - no change.
  • Attempted building for Raspberry Pi 5 - RPi display does not show anything or illuminate the backlight.
  • Attempted Kirkstone build - no change.
  • Attempted using 32bit vs 64bit - no change.
  • Attempted using Linux kernel 6.1 - no change.
  • Attempted replacing touchscreen, Pi, cable, reseating everything - no change.
  • Attempted RPi display independently of HDMI - no change.

Additional details (revisions used, host distro, etc.):

  • poky - scarthgap/kirkstone - latest
  • meta-raspberrypi - scarthgap/kirkstone - latest

Let me know if I can provide any logs or can attempt any other debugging steps because I'm running out of ideas.

PXL_20240924_152128629 MP PXL_20240924_163337655 MP

ykuzma1 avatar Sep 24 '24 17:09 ykuzma1

I just realized this may be a continuation of closed issue https://github.com/agherzan/meta-raspberrypi/issues/802. Let me know if you'd rather move this discussion there and reopen that issue.

ykuzma1 avatar Sep 27 '24 16:09 ykuzma1

I am experiencing the exact same issue.

Upgrading kernel to 6.6.51 does not help - neither does downgrading to 6.1.77.

bojanmilevski avatar Oct 24 '24 13:10 bojanmilevski

After many hours of debugging, I have came to the conclusion that setting INIT_MANAGER = "mdev-busybox" was the root of the problem. Once I changed it to systemd and added kernel-modules to IMAGE_INSTALL in my image recipe, the problem was gone.

I installed weston and was surprised for it to auto-start.

I hope this information is relevant and helpful.

bojanmilevski avatar Oct 24 '24 16:10 bojanmilevski

It's important to note that I am on each layer's master branch (poky and meta-raspberrypi).

bojanmilevski avatar Oct 24 '24 17:10 bojanmilevski

@bojanmilevski I was unable to get the problem resolved by adding INIT_MANAGER = systemd and IMAGE_INSTALL:append = " kernel-modules". Would you mind sharing the rest of your local.conf?

ykuzma1 avatar Oct 24 '24 21:10 ykuzma1

After having spent a couple more hours, I can confirm that adding dtoverlay=vc4-kms-dsi-7inch to config.txt, as well as the steps above, works.

Another note to mention - I tried switching back to the scarthgap branch on both layers, and can confirm that everything works as normal, so no need to switch to master

bojanmilevski avatar Oct 24 '24 22:10 bojanmilevski

@bojanmilevski I can confirm that worked on my end as well! Thank you!!

Here is a minimal working example local.conf:

MACHINE = "raspberrypi4"
DISTRO = "poky"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
ENABLE_UART = "1"
DISTRO_FEATURES += "opengl pam wayland"
INIT_MANAGER = "systemd"
IMAGE_INSTALL:append = " kmscube kernel-modules"
LICENSE_FLAGS_ACCEPTED += "synaptics-killswitch"
RPI_EXTRA_CONFIG = "dtoverlay=vc4-kms-dsi-7inch\n"

ykuzma1 avatar Oct 24 '24 23:10 ykuzma1

Initial testing on a Raspberry Pi 5 continues to not show anything on the RPi display or illuminate the backlight with both KMS and FKMS drivers. Which indicates that may be a different issue altogether. I will do more testing and follow-up with a new issue if necessary.

ykuzma1 avatar Oct 24 '24 23:10 ykuzma1

Sorry, I forgot to mention that I was testing this on a RPi4B with 8GB of memory. I am unable to assist you with the RPi5.

bojanmilevski avatar Oct 27 '24 13:10 bojanmilevski

No problem @bojanmilevski. I moved discussion regarding the RPi5 to its own issue tracker #1382. Thanks again for your help on this issue.

ykuzma1 avatar Oct 28 '24 18:10 ykuzma1