rpi3b+: corrupted screen on hdmi

Bug #1847596 reported by Stefan Bader
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-raspi2 (Ubuntu)
Fix Released
High
Hui Wang

Bug Description

Eoan daily: 20191010
Ubuntu Server arm64+raspi3
HW: Raspberrypi 3 B+

Initial boot ok but as soon as changing to the high resolution framebuffer, the whole screen consists mostly of bright yellow and darker yellow vertical stipes. Further boot messages are visible but barely readable. Device is accessible via ssh. The dmesg there shows some kernel warnings:

[ 1.450650] bcm2708_fb soc:fb: FB found 1 display(s)
[ 1.452916] WARNING: CPU: 2 PID: 1 at mm/page_alloc.c:4696 __alloc_pages_nodemask+0x284/0x2c8
[ 1.460096] Modules linked in:
[ 1.467227] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.3.0-1005-raspi2 #6-Ubuntu
[ 1.474549] Hardware name: Raspberry Pi 3 Model B Plus Rev 1.3 (DT)
[ 1.481908] pstate: 20400005 (nzCv daif +PAN -UAO)
[ 1.489237] pc : __alloc_pages_nodemask+0x284/0x2c8
[ 1.496499] lr : __dma_direct_alloc_pages+0x100/0x1e8
...
[ 1.761649] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 1824x984
[ 1.850950] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[ 1.859009] bcm2835-rng 3f104000.rng: hwrng registered
[ 1.865102] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
...
[ 2.909823] WARN::dwc_otg_hcd_init:1043: FIQ DMA bounce buffers: virt = ffff000010616000 dma = 0x00000000fad10000 len=9024
...
[ 2.946722] WARN::hcd_init_fiq:496: MPHI regs_base at ffff000010075000

Stefan Bader (smb)
description: updated
summary: - rpi3b+: corupted screen on hdmi
+ rpi3b+: corrupted screen on hdmi
Paolo Pisati (p-pisati)
Changed in linux-raspi2 (Ubuntu):
assignee: nobody → Hui Wang (hui.wang)
Revision history for this message
Stefan Bader (smb) wrote :
Revision history for this message
Stefan Bader (smb) wrote :

FWIW, this happens on both the arm64 and armhf image from today.

Revision history for this message
Dave Jones (waveform) wrote :

Can you attach the content of your /boot/firmware/config.txt?

I suspect it's lacking the vc4-fkms-v3d overlay which is now required as of the pi4-compatible kernel (I'd originally, mistakenly, thought this was only required on the pi4 but it turns out all pi models need it). Tomorrow's dailies should have this change, and if you update to the latest u-boot-rpi package it *should* migrate your boot configuration to include this but otherwise you may need to manually add it in.

Revision history for this message
Stefan Bader (smb) wrote :

Yes, this is the content of the file (armhf image) now (and after adding the overlay screen corruption is gone):

enable_uart=1
kernel=uboot.bin
device_tree_address=0x03000000
dtparam=i2c_arm=on
dtparam=spi=on
dtoverlay=vc4-fkms-v3d

Revision history for this message
Stefan Bader (smb) wrote :

For arm64 /boot/firmware/config.txt looks like this (this time before the change):

enable_uart=1
kernel=kernel8.bin
device_tree_address=0x03000000
dtparam=i2c_arm=on
dtparam=spi=on
arm_64bit=1

again, added the dtoverlay and rebooted. After that screen is looking normal.

Hui Wang (hui.wang)
Changed in linux-raspi2 (Ubuntu):
importance: Undecided → High
Revision history for this message
Hui Wang (hui.wang) wrote :

If I don't add dtoverlay=vc4-fkms-v3d in the config.txt, the rpi4 board will have the same corrupted screen as the #1 for armhf kernel + armhf uboot.

On the rpi3 B+ board, if booting with the same uboot without dtoverlay=vc4-fkms-v3d + 4.15/5.0 raspi2 kernel, the hdmi display doesn't have this issue, it proves that the eoan kernel for raspi2 introduces a new issue, will find the root cause for this new issue.

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1847596

tags: added: iso-testing
Revision history for this message
Dave Jones (waveform) wrote :

For now, I've adjusted the boot configuration written by the base image (and migrated by u-boot-rpi) to include the vc4-fkms-v3d overlay on all models. While this seems to alleviate the problem, it should be considered temporary workaround only (we should figure out why this occurs and try and fix it without throwing overlays at the problem).

tags: added: rls-ff-incoming
tags: added: id-5da6d4ddbf55d385e9c31e0b
Revision history for this message
Hui Wang (hui.wang) wrote :

This problem is fixed by this commit, it is in the https://github.com/raspberrypi/linux.git

(the data structure does not match the firmware definition)

commit 26f64fa81357f4b18192432eb8023f99c7eb5cf7 (HEAD -> 26f64fa81357f4b18192432eb8023f99c7eb5cf7)
Author: Michael Brown <email address hidden>
Date: Sun Sep 22 21:51:29 2019 +0100

    bcm2708_fb: Fix layout of struct vc4_display_settings_t

    The display parameters returned by the VC4 firmware in response to the
    RPI_FIRMWARE_FRAMEBUFFER_GET_DISPLAY_SETTINGS tag do not match the
    layout of struct vc4_display_settings_t: the colour depth and row
    pitch are erroneously swapped in the kernel definition. This can
    trigger a kernel warning from pixel_to_pat(), such as:

      pixel_to_pat(): unsupported pixelformat 7296

    Fix by adjusting the layout of struct vc4_display_settings_t to match
    the layout as used by the VC4 firmware.

    Signed-off-by: Michael Brown <email address hidden>

diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c
index 4da577c8a0d8..59443f79f228 100644
--- a/drivers/video/fbdev/bcm2708_fb.c
+++ b/drivers/video/fbdev/bcm2708_fb.c
@@ -88,8 +88,8 @@ struct vc4_display_settings_t {
        u32 display_num;
        u32 width;
        u32 height;
- u32 pitch;
        u32 depth;
+ u32 pitch;
        u32 virtual_width;
        u32 virtual_height;
        u32 virtual_width_offset;

Revision history for this message
Hui Wang (hui.wang) wrote :

And this bug will be fixed with https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1849623

And there is a testing kernel, we could install this testing kernel and remove the vc4-fkms-v3d from the config.txt.
https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1848790/comments/11

Hui Wang (hui.wang)
Changed in linux-raspi2 (Ubuntu):
status: New → In Progress
Revision history for this message
Hui Wang (hui.wang) wrote :

We are going to release a new kernel soon, right now it is in the proposed channel, Welcome to test with the new kernel:

edit the $rpi_rootfs/etc/apt/sources.list and add:
deb http://ports.ubuntu.com/ubuntu-ports eoan-proposed main restricted
deb http://ports.ubuntu.com/ubuntu-ports eoan-proposed universe
deb http://ports.ubuntu.com/ubuntu-ports eoan-proposed multiverse

boot the rpi board, then run:
sudo apt-get update
sudo apt install linux-image-5.3.0-1013-raspi2
sudo reboot

Then you could do the test with the proposed kernel.

At least the 1013 kernel fixed these bugs compared with 1012 kernel:
https://bugs.launchpad.net/bugs/1850876
https://bugs.launchpad.net/bugs/1852510

Hui Wang (hui.wang)
Changed in linux-raspi2 (Ubuntu):
status: In Progress → Fix Committed
Dave Jones (waveform)
Changed in linux-raspi2 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.