HDMI does not display anything with Impish RPi desktop image

Bug #1944397 reported by satmandu
76
This bug affects 9 people
Affects Status Importance Assigned to Milestone
linux-firmware-raspi2 (Ubuntu)
Fix Released
Undecided
Dave Jones
Impish
Fix Released
Undecided
Dave Jones
linux-raspi (Ubuntu)
Fix Released
High
Juerg Haefliger
Hirsute
Fix Released
High
Juerg Haefliger
Impish
Fix Released
High
Juerg Haefliger

Bug Description

[ Impact ]

The desktop does not come up and the screen stays blank when using 'dtoverlay=vc4-kms-v3d' on a Pi 4 (as is the case in raspi desktop images). If the desktop does come up, playing video freezes the desktop and/or the system. The kernel log shows loads of WARNINGs and potentially firmware errors.

[ Test Case ]

Use a raspi desktop image, play video (youtube or VLC), move windows around, switch to and from fullscreen video playback.

[ Where problems could occur ]

The fixes are all local to the VC4 driver so (new) issues should only show up when that driver is in use. Potential problems are UI freezes, kernel stalls and crashes.

[ Original Description ]

Workaround
----------
With media which you will boot off of change the line dtoverlay=vc4-kms-v3d to dtoverlay=vc4-fkms-v3d in /system-boot/config.txt

Original Description
--------------------
Have a HDMI display w/o audio hooked up to this RPI4B.

With the latest kernel update the screen does not turn on due to this.

ProblemType: BugDistroRelease: Ubuntu 21.10
Package: linux-image-5.13.0-1007-raspi 5.13.0-1007.8
ProcVersionSignature: Ubuntu 5.13.0-1007.8-raspi 5.13.13
Uname: Linux 5.13.0-1007-raspi aarch64
ApportVersion: 2.20.11-0ubuntu69
Architecture: arm64
CasperMD5CheckResult: unknown
Date: Mon Sep 20 20:56:14 2021
ImageMediaBuild: 20210421
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
 TERM=vt100
 XDG_RUNTIME_DIR=<set>
 PATH=(custom, user)SourcePackage: linux-raspi
UpgradeStatus: Upgraded to impish on 2021-08-17 (34 days ago)

CVE References

Revision history for this message
satmandu (satadru-umich) wrote :
Revision history for this message
satmandu (satadru-umich) wrote :

Installing the mainline 5.15-rc2 kernel from https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.15-rc2/arm64/ resolves this issue for me.

Revision history for this message
satmandu (satadru-umich) wrote :
Download full text (3.4 KiB)

Here is the error message which is filling up my dmesg:

[ 24.621271] WARNING: CPU: 1 PID: 252 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:445 vc5_hdmi_set_timings+0x984/0xd80 [vc4]
[ 24.621304] Modules linked in: snd_soc_hdmi_codec vc4 joydev drm_kms_helper cec snd_usb_audio btsdio snd_soc_core snd_hwdep snd_usbmidi_lib bluetooth snd_compress ac97_bus snd_pcm_dmaengine hid_multitouch snd_seq_midi snd_seq_midi_event ecdh_generic ecc snd_rawmidi brcmfmac brcmutil cfg80211 snd_seq snd_bcm2835(C) snd_pcm raspberrypi_hwmon bcm2835_isp(C) bcm2835_codec(C) bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) videobuf2_vmalloc v4l2_mem2mem videobuf2_dma_contig videobuf2_memops snd_seq_device vc_sm_cma(C) videobuf2_v4l2 videobuf2_common snd_timer videodev mc bcm2835_gpiomem rpivid_mem snd fb_sys_fops syscopyarea sysfillrect nvmem_rmem sysimgblt uio_pdrv_genirq uio sch_fq_codel ppdev lp parport sunrpc ip_tables x_tables autofs4 btrfs blake2b_generic xor xor_neon zstd_compress raid6_pq libcrc32c hid_generic usbhid uas usb_storage v3d gpu_sched drm i2c_brcmstb crct10dif_ce xhci_pci xhci_pci_renesas phy_generic aes_arm64
[ 24.621468] CPU: 1 PID: 252 Comm: plymouthd Tainted: G WC 5.13.0-1007-raspi #8-Ubuntu
[ 24.621473] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
[ 24.621476] pstate: 40400005 (nZcv daif +PAN -UAO -TCO BTYPE=--)
[ 24.621481] pc : vc5_hdmi_set_timings+0x984/0xd80 [vc4]
[ 24.621507] lr : vc4_hdmi_encoder_pre_crtc_configure+0x3b0/0x514 [vc4]
[ 24.621532] sp : ffff80001094b920
[ 24.621535] x29: ffff80001094b920 x28: 0000000000000000 x27: 0000000000000000
[ 24.621543] x26: 0000000000000000 x25: 0000000000000004 x24: 0000000000000004
[ 24.621551] x23: 0000000000000001 x22: ffff4d8bcafcf000 x21: 0000000004080780
[ 24.621559] x20: ffff4d8bc43b5818 x19: ffff4d8bc8d04080 x18: 0000000000000000
[ 24.621568] x17: 0000000000000000 x16: ffffdb1af5730f80 x15: ffff4d8bc70982e0
[ 24.621576] x14: 0000000000000000 x13: 0000000000000010 x12: ffff800010035000
[ 24.621584] x11: 0000000000000001 x10: 0000000000000001 x9 : ffffdb1a7bedddf0
[ 24.621592] x8 : 0000000000000000 x7 : ffff800010035038 x6 : 0000000000000000
[ 24.621600] x5 : 0000000000000002 x4 : 0000000000000002 x3 : 0000000000000002
[ 24.621608] x2 : ffffdb1a7bef1018 x1 : 0000000000000080 x0 : 0000000000280020
[ 24.621616] Call trace:
[ 24.621619] vc5_hdmi_set_timings+0x984/0xd80 [vc4]
[ 24.621644] vc4_hdmi_encoder_pre_crtc_configure+0x3b0/0x514 [vc4]
[ 24.621669] vc4_crtc_atomic_enable+0x9c/0x140 [vc4]
[ 24.621694] drm_atomic_helper_commit_modeset_enables+0x20c/0x254 [drm_kms_helper]
[ 24.621749] vc4_atomic_commit_tail+0x224/0x36c [vc4]
[ 24.621775] commit_tail+0xac/0x190 [drm_kms_helper]
[ 24.621819] drm_atomic_helper_commit+0x168/0x380 [drm_kms_helper]
[ 24.621862] drm_atomic_commit+0x58/0x70 [drm]
[ 24.621951] drm_atomic_helper_set_config+0xe0/0x120 [drm_kms_helper]
[ 24.621997] drm_mode_setcrtc+0x1b4/0x6e0 [drm]
[ 24.622082] drm_ioctl_kernel+0xd0/0x120 [drm]
[ 24.622162] drm_ioctl+0x25c/0x4f0 [drm]
[ 24.622242] __arm64_sys_ioctl+0xb4/0xfc
[ 24.622252] invoke_syscall+0x50/0x120
[ 24.622259] el0_svc_common.constprop....

Read more...

summary: - hdmi-audio error breaks hdmi
+ hdmi broken on 5.13.0-1007-raspi
Revision history for this message
satmandu (satadru-umich) wrote : Re: hdmi broken on 5.13.0-1007-raspi

linux-image-5.13.0-1006-raspi boots when linux-modules-extra-raspi installed.
linux-image-5.13.0-1007-raspi gives these kernel errors.
linux-image-unsigned-5.15.0-051500rc2-generic boots properly

Revision history for this message
satmandu (satadru-umich) wrote :

Full dmesg from broken linux-image-5.13.0-1007-raspi:

https://paste.ubuntu.com/p/XV6N9bKPnm/

dmesg from working linux-image-unsigned-5.15.0-051500rc2-generic:

https://paste.ubuntu.com/p/Yy3JHR3CHr/

Brad Figg (brad-figg)
Changed in linux-raspi (Ubuntu):
assignee: nobody → Juerg Haefliger (juergh)
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote :

Did this used to work with a previous Ubuntu kernel?

Revision history for this message
Juerg Haefliger (juergh) wrote :

@satmandu can you post the contents of your config.txt and cmdline.txt?

Revision history for this message
Juerg Haefliger (juergh) wrote :

Attaching the dmesg output since the paste will eventually disappear.

Changed in linux-raspi (Ubuntu Impish):
milestone: none → ubuntu-21.10
Revision history for this message
satmandu (satadru-umich) wrote :
Revision history for this message
satmandu (satadru-umich) wrote :

(FYI I set this to overclock to 2Ghz today, which is stable, and within warranty for the device, but the issues were happening before I changed that setting.)

Revision history for this message
satmandu (satadru-umich) wrote :

@brian-murray The linux-image-5.13.0-1006-raspi kernel is working fine, so yes this is a regression.

5.11.0-1016-raspi also works fine.

Revision history for this message
satmandu (satadru-umich) wrote :

vc-log output for working boot:

[ 5.506129] vcos: brfs: File read: /mfs/sd/config.txt
[ 5.506979] vcos: brfs: File read: 1663 bytes
[ 5.560501] vcos: brfs: File read: /mfs/sd/edid.dat
[ 5.578718] vcos: brfs: File read: 256 bytes
[ 5.586393] vcos: brfs: File read: /mfs/sd/config.txt
[ 5.602761] vcos: brfs: File read: 1663 bytes
[ 6.049331] vcos: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined
[ 6.051831] vcos: *** Restart logging
[ 6.071420] vcos: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
[ 6.071433] unknown: HDMI0: hdmi_pixel_encoding: 300000000
[ 6.071447] unknown: HDMI1: hdmi_pixel_encoding: 300000000
[ 8.241326] vcos: brfs: File read: /mfs/sd/initrd.img
[ 8.241342] vcos: Loading 'initrd.img' to 0x0 size 0x25e9454
[ 8.298198] vcos: initramfs loaded to 0x2ca16000 (size 0x25e9454)
[ 8.302695] vcos: dtb_file 'bcm2711-rpi-4-b.dtb'
[ 8.302731] vcos: brfs: File read: 39752788 bytes
[ 8.308755] vcos: brfs: File read: /mfs/sd/bcm2711-rpi-4-b.dtb
[ 8.308787] vcos: Loading 'bcm2711-rpi-4-b.dtb' to 0x100 size 0xc35d
[ 8.340789] vcos: brfs: File read: 50013 bytes
[ 8.366470] vcos: brfs: File read: /mfs/sd/overlays/overlay_map.dtb
[ 8.526095] vcos: brfs: File read: 1667 bytes
[ 8.529227] vcos: brfs: File read: /mfs/sd/config.txt
[ 8.529322] vcos: dtparam: pwr_led_trigger=none
[ 8.556943] vcos: dtparam: pwr_led_activelow=off
[ 8.583619] vcos: dtparam: act_led_trigger=none
[ 8.611069] vcos: dtparam: act_led_activelow=off
[ 8.638069] vcos: dtparam: eth_led0=4
[ 8.664149] vcos: dtparam: eth_led1=4
[ 8.690571] vcos: dtparam: audio=on
[ 8.716068] vcos: brfs: File read: 1663 bytes
[ 8.725249] vcos: brfs: File read: /mfs/sd/overlays/vc4-kms-v3d-pi4.dtbo
[ 8.884909] vcos: Loaded overlay 'vc4-kms-v3d-pi4'
[ 9.288921] vcos: brfs: File read: 3831 bytes
[ 9.297646] vcos: brfs: File read: /mfs/sd/cmdline.txt
[ 9.297750] vcos: Read command line from file 'cmdline.txt':
[ 9.297786] vcos: 'console=tty1 root=LABEL=writable rootfstype=ext4 rootwait quiet splash video=HDMI-A-1:1080x1920M@60,rotate=90,panel_orientation=right_side_up drm.edid_firmware=edid/Waveshare5.5Amoled4.bin fbcon=rotate:1 fsck.mode=force fsck.repair=yes'
[ 10.254631] vcos: brfs: File read: 236 bytes
[ 10.837803] vcos: brfs: File read: /mfs/sd/vmlinuz
[ 10.837838] vcos: Loading 'vmlinuz' to 0x80000 size 0x90b122
[ 13.997830] vcos: Kernel relocated to 0x200000
[ 13.997857] vcos: Device tree loaded to 0x2ca09600 (size 0xc9ef)
[ 14.006215] vcos: bfs_xhci_stop
[ 14.006228] vcos: XHCI-STOP
[ 14.006397] vcos: xHC ver: 256 HCS: 05000420 fc000031 00e70004 HCC: 002841eb
[ 14.008496] vcos: PCI reset
[ 18.085403] vcos: vchiq_core: vchiq_init_state: slot_zero = 0xd9000000, is_master = 1
[ 18.088679] vcos: TV service:host side not connected, dropping notification 0x00000002, 0x00000002, 0x00000004

Revision history for this message
satmandu (satadru-umich) wrote :

kitchen sink debug output...

Revision history for this message
satmandu (satadru-umich) wrote :

(I would note that even with this kernel I have issues with getting the screen to come back from sleep... which might explain the dmesg errors at the end.)

Revision history for this message
William Wilson (jawn-smith) wrote (last edit ):

This has been narrowed down to the use of full kms in the desktop image. As a temporary workaround you can change the line dtoverlay=vc4-kms-v3d to dtoverlay=vc4-fkms-v3d in /boot/firmware/config.txt

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/1944397

tags: added: iso-testing
summary: - hdmi broken on 5.13.0-1007-raspi
+ HDMI does not display anything with Impish RPi desktop image
description: updated
Revision history for this message
satmandu (satadru-umich) wrote :

Thanks. This will break Wayland though, no? "The full KMS overlay is required for X11 application support under wayland."

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-raspi (Ubuntu):
status: New → Confirmed
Revision history for this message
Juerg Haefliger (juergh) wrote :

We also need a FW bump, so adding linux-firmware-raspi2.

Changed in linux-firmware-raspi2 (Ubuntu Impish):
assignee: nobody → Dave Jones (waveform)
Juerg Haefliger (juergh)
Changed in linux-raspi (Ubuntu Impish):
status: Confirmed → Fix Committed
tags: added: fr-1752
Changed in linux-firmware-raspi2 (Ubuntu Impish):
milestone: none → ubuntu-21.10
Revision history for this message
Dave Jones (waveform) wrote :

I've reproduced this locally though it seems to take some time for my system to do so: it boots happily, logs in successfully, and can then be a good 10 minutes or more before the screen freeze. Playing video, in particular, appears to make the freeze occur more reliably. The dmesg output immediately before (and just after) the freeze are:

[ 271.583703] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:76:crtc-3] flip_done timed out
[ 271.583697] [drm:drm_crtc_commit_wait [drm]] *ERROR* flip_done timed out
[ 271.584001] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:76:crtc-3] commit wait timed out
[ 281.823842] [drm:drm_crtc_commit_wait [drm]] *ERROR* flip_done timed out
[ 281.824121] vc4-drm gpu: [drm] *ERROR* Timed out waiting for commit

I've uploaded an experimental bump for the linux-firmware-raspi2 package with the latest upstream firmware to the following PPA:

https://launchpad.net/~waveform/+archive/ubuntu/firmware

However, this doesn't appear to fix the issue (or alter its timing) for me.

@satmandu on the subject of FKMS breaking X11 applications, that was the case during part of the hirsute cycle but it did get resolved at some point (I forget exactly when). I've tested xeyes (an X11 application) with the FKMS work-around in place and there's none of the window corruption that we were seeing originally, so FKMS should be a reasonable work-around for now.

Revision history for this message
Juerg Haefliger (juergh) wrote :

On Hirsute 5.11 the display comes up but the kernel is not happy:

$ sudo dmesg | grep -P 'firmware|WARN'
[ 0.124340] raspberrypi-firmware soc:firmware: Attached to firmware from 2021-02-25T12:10:40, variant start
[ 0.128359] raspberrypi-firmware soc:firmware: Firmware hash is 564e5f9b852b23a330b1764bcf0b2d022a20afd0
[ 17.517350] raspberrypi-firmware soc:firmware: Request 0x00030066 returned status 0x80000001
[ 17.530301] vc4-drm gpu: [drm] Couldn't stop firmware display driver: -22
[ 17.674616] raspberrypi-firmware soc:firmware: Request 0x00030066 returned status 0x80000001
[ 17.685979] vc4-drm gpu: [drm] Couldn't stop firmware display driver: -22
[ 17.864574] raspberrypi-firmware soc:firmware: Request 0x00030066 returned status 0x80000001
[ 17.873532] vc4-drm gpu: [drm] Couldn't stop firmware display driver: -22
[ 20.031174] raspberrypi-firmware soc:firmware: Request 0x00030066 returned status 0x80000001
[ 20.040515] vc4-drm gpu: [drm] Couldn't stop firmware display driver: -22
[ 20.127052] WARNING: CPU: 1 PID: 103 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:445 vc4_hdmi_encoder_post_crtc_disable+0x390/0x49c [vc4]
[ 20.493554] WARNING: CPU: 1 PID: 103 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:417 vc4_hdmi_read+0xd8/0x140 [vc4]
[ 20.803013] WARNING: CPU: 1 PID: 103 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:445 vc4_hdmi_encoder_post_crtc_disable+0x388/0x49c [vc4]
[ 21.113145] WARNING: CPU: 1 PID: 103 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:417 vc4_hdmi_read+0xd8/0x140 [vc4]
[ 21.422741] WARNING: CPU: 1 PID: 103 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:445 vc4_hdmi_encoder_post_crtc_disable+0x380/0x49c [vc4]
[ 21.731941] WARNING: CPU: 1 PID: 103 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:417 vc4_hdmi_read+0xd8/0x140 [vc4]
[ 22.041559] WARNING: CPU: 1 PID: 103 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:445 vc4_hdmi_encoder_post_crtc_disable+0x424/0x49c [vc4]
[ 22.351113] WARNING: CPU: 1 PID: 103 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:417 vc4_hdmi_read+0xd8/0x140 [vc4]
[ 22.662902] WARNING: CPU: 1 PID: 103 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:445 vc4_hdmi_encoder_post_crtc_powerdown+0x178/0x1c0 [vc4]
[ 22.978912] WARNING: CPU: 1 PID: 103 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:445 vc5_hdmi_phy_disable+0x198/0x220 [vc4]
[ 23.300587] WARNING: CPU: 1 PID: 103 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:445 vc5_hdmi_phy_disable+0x190/0x220 [vc4]
[ 23.619497] WARNING: CPU: 1 PID: 103 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:417 vc4_hdmi_read+0xd8/0x140 [vc4]

Changed in linux-raspi (Ubuntu Hirsute):
assignee: nobody → Juerg Haefliger (juergh)
Revision history for this message
Juerg Haefliger (juergh) wrote :

We need a FW bump on H as well, along with similar kernel fixes as in 5.13.

Revision history for this message
Juerg Haefliger (juergh) wrote :

New plan: I'll back out the vc4 breakage from 5.11 so we don't need a FW bump on hirsute.

no longer affects: linux-firmware-raspi2 (Ubuntu Hirsute)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-firmware-raspi2 (Ubuntu):
status: New → Confirmed
Changed in linux-raspi (Ubuntu Hirsute):
status: New → Confirmed
Juerg Haefliger (juergh)
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Bug 1945842 suggests that 5.13.0-1008.9-raspi still isn't working.

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

@satmandu I'm unable to reproduce the complete display failure you're seeing on impish here, although I can certainly produce the freezing video failure I mentioned above (and that is still occurring on the -proposed kernel). Given that a fix for this is unlikely prior to impish's release I'm currently pondering the pros and cons of switching at least the desktop image to fkms as a (temporary) workaround.

On hirsute, I'm unable to reproduce either the display failure *or* the display freeze I'm seeing on impish, which is odd (and suggests that perhaps there's a different root cause in each).

Is there any chance you (or any other interested party seeing the same issue) could test the current hirsute kernel to verify that you're seeing display failure there too and, if you are, whether a test kernel [1] that Juerg's produced fixes the issue? I've also produced a bump for the boot firmware which may affect the results (of either hirsute or impish) in my firmware PPA [2].

The firmware bump seems to affect some of the error messages produced, but at least in my case it hasn't affected the display freeze (on impish) so I anticipate it may not affect the display failure issue either (on either release).

[1] https://kernel.ubuntu.com/~juergh/hirsute-raspi/
[2] https://launchpad.net/~waveform/+archive/ubuntu/firmware/+packages

Revision history for this message
satmandu (satadru-umich) wrote :

Here is more debug logging from using the latest RPI firmware from https://github.com/Hexxeh/rpi-firmware/commits/master

(Using the 5.13.0-1008.9-raspi kernel, obviously.)

My display is blank, but the system thinks that the display is working, as I have ffplay playing a video stream upon automatic login and I can hear the audio.

https://paste.ubuntu.com/p/FMsYPnJG5T/

Revision history for this message
satmandu (satadru-umich) wrote :

5.11.0-1017-raspi is fine, also using the same latest hexxeh firmware. (Not using the .dtb files from the hexxeh repo.)

Revision history for this message
satmandu (satadru-umich) wrote :

Apologies.

flash-kernel --force 5.11.0-1017-raspi results in working video, using the firmware that came with it.

Using newer firmware does not fix the system.

(Now testing the kernel at https://kernel.ubuntu.com/~juergh/hirsute-raspi/ )

Revision history for this message
satmandu (satadru-umich) wrote :

The kernel at https://kernel.ubuntu.com/~juergh/hirsute-raspi/ does let video work.

It even works with the current firmware!

debug info attached using current firmware..

Revision history for this message
satmandu (satadru-umich) wrote :

@waveform The issue might be with the bcm2711-rpi-4-b.dtb...

sudo dpkg -i linux-firmware-raspi2_5-0ubuntu0~21.04~ppa1_arm64.deb ; sudo flash-kernel --force 5.11.22-9021-raspi ; sudo reboot

Result: no video.

sudo dpkg -i linux-firmware-raspi2_5-0ubuntu1~ppa1_arm64.deb ; sudo flash-kernel --force 5.11.22-9021-raspi ; sudo reboot

Result: no video.

cd /boot ; sudo cp dtb-5.11.22-9021-raspi /boot/firmware/bcm2711-rpi-4-b.dtb ; sudo reboot

Result: Video!

sudo flash-kernel ; cd /boot ; sudo cp dtb-5.11.22-9021-raspi /boot/firmware/bcm2711-rpi-4-b.dtb ; sudo reboot

Result: Video!

So maybe there's an issue with the bcm2711-rpi-4-b.dtb which the newer firmwares are installing causing issues with the newer kernels?

Working firmware versions I am seeing that work with the older 5.11 bcm2711-rpi-4-b.dtb:

sudo vcgencmd version
Aug 31 2021 14:52:47
Copyright (c) 2012 Broadcom
version 67615e950e1e28b92dfae6303cf7a8b879a8908f (clean) (release) (start)

sudo vcgencmd version
Sep 30 2021 19:21:03
Copyright (c) 2012 Broadcom
version 51215b4f6e3966401ecd99652a35cf1c25069113 (clean) (release) (start)

Revision history for this message
satmandu (satadru-umich) wrote :

I do still get this error eventually with the 5.13.0-1008-raspi kernel. This usually happens overnight after the screen has gone to sleep, after which I can not bring the screen back up until a reboot.

[ 6411.078361] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:77:crtc-3] flip_done timed out
[ 6411.078388] [drm:drm_crtc_commit_wait [drm]] *ERROR* flip_done timed out
[ 6411.078621] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:77:crtc-3] commit wait timed out
[ 6421.318663] [drm:drm_crtc_commit_wait [drm]] *ERROR* flip_done timed out
[ 6421.319004] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [PLANE:71:plane-3] commit wait timed out
[ 6431.558919] [drm:drm_crtc_commit_wait [drm]] *ERROR* flip_done timed out
[ 6431.559217] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [PLANE:206:plane-25] commit wait timed out
[ 6441.799164] [drm:drm_crtc_commit_wait [drm]] *ERROR* flip_done timed out
[ 6441.799388] vc4-drm gpu: [drm] *ERROR* Timed out waiting for commit

(this is followed by the display

Stefan Bader (smb)
Changed in linux-raspi (Ubuntu Hirsute):
importance: Undecided → High
status: Confirmed → Fix Committed
Revision history for this message
Juerg Haefliger (juergh) wrote :

@satmandu I'm confused by your comment #30. You say 5.11.0-1017-raspi results in working video but using newer firmware does not fix the system. What needs fixing in this case??

Revision history for this message
Juerg Haefliger (juergh) wrote :

@satmandu, re your comment #32: 5.11.22-9021-raspi is supposed to go along with current hirsute linux-firmware-raspi2 4-0ubuntu3. We don't want to bump the FW on hirsute. Also, the DTBS are provided by the kernel and not the firmware package.

And:
$ dpkg -i linux-image-5.11.22-9021-raspi_...
$ flash-kernel --force 5.11.22-9021-raspi
$ md5sum /boot/dtb-5.11.22-9021-raspi /boot/firmware/bcm2711-rpi-4-b.dtb
f2f90ac1a0c075d3961914c2d345d4ae /boot/dtb-5.11.22-9021-raspi
f2f90ac1a0c075d3961914c2d345d4ae /boot/firmware/bcm2711-rpi-4-b.dtb

The DTBs are identical.

I'm not sure what you're trying to proof, especially since in comment #31 you claim that 5.11.22-9021-raspi works for you.

Can you do your testing without overclocking?

Revision history for this message
knoedel fan (knoedelfan) wrote :

This problem exists since beginning of 21.10.
#1946112 means that older or newer kernel or firmware have nothing to do with this issue.

Revision history for this message
satmandu (satadru-umich) wrote :

@juergh removing overclocking fixed the issue. Looks like the GPU was giving errors when overclocked.

Thanks for asking me to check that.

The firmware in linux-firmware-raspi2_5-0ubuntu1~ppa1_arm64.deb works fine with the 5.13.0-1008-raspi kernel.

You can mark this issue as resolved for me.

Revision history for this message
satmandu (satadru-umich) wrote :

(The screen still doesn't come back after blanking properly... but we might have to kick that issue upstream, as I'm still even seeing that in 5.15-rc4 kernels built from https://github.com/raspberrypi/linux )

Revision history for this message
Xinle Yao (sean-was-taken) wrote :

Removing overclock did not work for me. Still getting freezes even at default clock speeds.

Revision history for this message
knoedel fan (knoedelfan) wrote :

Removing overclock did not work for me too. Still getting freezes even at default clock speeds.

Revision history for this message
knoedel fan (knoedelfan) wrote :

Today, Raspi gets an update for Ubuntu Budgie 20.10.
Raspi Pi 4 8GB is running with 1.5Mhz. GPU-Memory is set to 128MB default.

Same issue! Starting Video-Sequence and moving then Mouse cursor Video stops, audio stops, screen is frozen, mouse cursor is frozen. When Video runs in Windows mode then 20 to 30 times press ESC helps out but when video runs in full-screen mode then only hard shutdown with power off helps out.

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

@knoedalfan and others experiencing the freezing issue on impish: I suspect the freezing is a separate issue (I was incorrect when conflating the two earlier). I've filed LP: #1946368 to track this, as I've only managed to replicate that on impish thus far, and the stack traces (while similar in some cases) do appear distinct.

Revision history for this message
knoedel fan (knoedelfan) wrote :

I think, 10/7/2021 can't be the Release Candidate Day.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sorry I just realized -- this may not be a kernel regression at all.

Mutter 40 was when atomic KMS started being used by GNOME. But it doesn't work reliably for all kernel drivers. If that happens to include vc4 then we just need to add it to Mutter's atomic_driver_deny_list.

As a workaround you can add this to /etc/environment:

  MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0

Changed in mutter (Ubuntu Impish):
assignee: nobody → Daniel van Vugt (vanvugt)
importance: Undecided → High
status: New → Incomplete
Changed in mutter (Ubuntu Impish):
status: Incomplete → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sadly I'm still getting vc4 freezes in atomic KMS functions even when GNOME has been told not to use it:

Oct 08 16:16:31 pi400 gnome-shell[968]: Mode setting implementation for '/dev/dri/card1' (vc4) forced (non-atomic).

...

Oct 08 16:24:38 pi400 kernel: [drm:drm_crtc_commit_wait [drm]] *ERROR* flip_done timed out
Oct 08 16:24:38 pi400 kernel: [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:76:crtc-3] commit wait timed out
Oct 08 16:24:48 pi400 kernel: [drm:drm_crtc_commit_wait [drm]] *ERROR* flip_done timed out
Oct 08 16:24:48 pi400 kernel: [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [PLANE:70:plane-3] commit wait timed out

I guess the vc4 kernel is trying to implement non-atomic KMS using a buggy atomic implementation. :(

Changed in mutter (Ubuntu Impish):
status: In Progress → Invalid
Revision history for this message
satmandu (satadru-umich) wrote :

@vanvugt would you be willing to open an issue about this at
https://github.com/raspberrypi/linux/issues since this does look like a kernel issue?

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-raspi/5.11.0-1021.22 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-hirsute' to 'verification-done-hirsute'. If the problem still exists, change the tag 'verification-needed-hirsute' to 'verification-failed-hirsute'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-hirsute
Revision history for this message
satmandu (satadru-umich) wrote :

I'm also seeing this same issue with a 5.15-rc4 kernel built from https://github.com/raspberrypi/linux/tree/rpi-5.15.y

[ 408.326395] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:77:crtc-3] flip_done timed out
[ 408.326477] [drm:drm_crtc_commit_wait [drm]] *ERROR* flip_done timed out
[ 408.326711] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:77:crtc-3] commit wait timed out

Revision history for this message
William Wilson (jawn-smith) wrote :

linux-raspi/5.11.0-1021.22 does not fix this problem. I am still seeing the flip_done timed out error message.

tags: added: verification-failed-hirsute
removed: verification-needed-hirsute
Revision history for this message
knoedel fan (knoedelfan) wrote (last edit ):

Same by me. Update today Ubuntu Budgie 21.10 (roundabout 164MB) but issue is going on. Propose-Update is active!
 Starting Video and after some seconds screen freeze, mouse cursor freeze, system freeze.
Standard after update is reboot before testing!

Revision history for this message
William Wilson (jawn-smith) wrote :

We've found that this bug is much easier to create on certain monitors. satmandu, dnoedelfan: what monitors are you using?

Revision history for this message
satmandu (satadru-umich) wrote :

@jawn-smith, I'm using this display:
https://www.waveshare.com/5.5inch-hdmi-amoled-with-case.htm

with this cmdline.txt:
console=tty1 root=LABEL=writable rootfstype=ext4 rootwait quiet splash video=HDMI-A-1:1080x1920M@60,rotate=90,panel_orientation=right_side_up drm.edid_firmware=edid/Waveshare5.5Amoled4.bin fbcon=rotate:1 fsck.mode=force fsck.repair=yes

and that edid file is attached.

no longer affects: mutter (Ubuntu)
no longer affects: mutter (Ubuntu Impish)
Revision history for this message
Juerg Haefliger (juergh) wrote :

We seem to be talking about multiple issues in this ticket. The first is the blank screen at boot, which this ticket is about. The second is the freeze when playing video. The kernel in impish proposed is fixing the 1st but not the 2nd issue (which was discovered later).

Can we please take the discussion about the freeze to the new ticket that Dave opened: LP: #1946368.

Revision history for this message
knoedel fan (knoedelfan) wrote (last edit ):

#51 Monitor is Dell 1600x900 19" HDMI no Audio. This monitor is fine with Ubuntu Budgie 21.04 Desktop and no issue with Video.
Suspecting the error in the monitor is the wrong way.

Revision history for this message
Juerg Haefliger (juergh) wrote :

@jawn-smith This bug and linux-raspi/5.11.0-1021.22 is *not* about 'flip_done timed out'. That is tracked in LP: #1946368. 5.11.0-1021.22 is supposed to fix blank screen at boot (which I have yet to experience) and errors like the ones mentioned in comments #3 and #21. Can you confirm that that is fixed and if so, modify the tag accordingly?

Revision history for this message
William Wilson (jawn-smith) wrote :

@juergh sorry for the mix-up. I actually haven't recreated this specific issue either, only the one in LP: #1946368

I've reset the tag to verification-needed since I haven't been able to recreate this, and I'll go add some more detail about my recreation of the other bug on the appropriate page.

Juerg Haefliger (juergh)
tags: added: verification-needed-hirsute
removed: verification-failed-hirsute
Revision history for this message
Juerg Haefliger (juergh) wrote :

Installed hirsute desktop image, upgraded all packages and confirmed the problem:

$ uname -a
Linux rpi-4b-rev1d4-d9f5 5.11.0-1019-raspi #20-Ubuntu SMP PREEMPT Tue Sep 21 15:23:42 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
$ dmesg | grep -P 'firmware|WARN'
[ 0.116402] raspberrypi-firmware soc:firmware: Attached to firmware from 2021-02-25T12:10:40, variant start
[ 0.120417] raspberrypi-firmware soc:firmware: Firmware hash is 564e5f9b852b23a330b1764bcf0b2d022a20afd0
[ 94.323547] raspberrypi-firmware soc:firmware: Request 0x00030066 returned status 0x80000001
[ 94.332200] vc4-drm gpu: [drm] Couldn't stop firmware display driver: -22
[ 94.352626] WARNING: CPU: 3 PID: 1171 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:417 vc4_hdmi_read+0xd8/0x140 [vc4]
[ 94.708647] WARNING: CPU: 3 PID: 1171 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:445 vc4_hdmi_cec_init+0x3ac/0x540 [vc4]
[ 95.061054] WARNING: CPU: 1 PID: 1171 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:417 vc4_hdmi_read+0xd8/0x140 [vc4]
[ 95.416872] WARNING: CPU: 1 PID: 1171 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:445 vc4_hdmi_cec_init+0x398/0x540 [vc4]
[ 95.768827] WARNING: CPU: 0 PID: 323 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:417 vc4_hdmi_read+0xd8/0x140 [vc4]
[ 96.088013] WARNING: CPU: 0 PID: 323 at drivers/gpu/drm/vc4/vc4_hdmi_regs.h:445 vc4_cec_irq_handler_tx_bare+0xf8/0x140 [vc4]

Installed kernel from proposed and verified that the issue is fixed and the display comes up:
$ apt-add-repository -p proposed
$ apt install linux-raspi
$ reboot
<snip>
$ uname -a
Linux rpi-4b-rev1d4-d9f5 5.11.0-1021-raspi #22-Ubuntu SMP PREEMPT Wed Oct 6 17:30:38 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
$ dmesg | grep -P 'firmware|WARN'
$ sudo dmesg | grep -P 'firmware|WARN'
[ 0.120342] raspberrypi-firmware soc:firmware: Attached to firmware from 2021-02-25T12:10:40, variant start
[ 0.124357] raspberrypi-firmware soc:firmware: Firmware hash is 564e5f9b852b23a330b1764bcf0b2d022a20afd0

tags: added: verification-done-hirsute
removed: verification-needed-hirsute
Revision history for this message
knoedel fan (knoedelfan) wrote (last edit ):

Have done this.

$ apt-add-repository -p proposed
$ apt install linux-raspi

Switch from fkms to kms

$ reboot

uname -a
Linux RW-RPI2 5.13.0-1008-raspi #9-Ubuntu SMP PREEMPT Wed Sep 29 08:27:44 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

Test with kms. Result: video and system freeze after ca. 6sec video-playing. So i return to fkms.

$ sudo dmesg | grep -P 'firmware|WARN'
[ 0.116401] raspberrypi-firmware soc:firmware: Attached to firmware from 2021-02-25T12:10:40, variant start
[ 0.120420] raspberrypi-firmware soc:firmware: Firmware hash is 564e5f9b852b23a330b1764bcf0b2d022a20afd0
[ 10.819588] vc4-drm gpu: bound fe600000.firmwarekms (ops vc4_fkms_ops [vc4])

With kms video freeze, mouse cursor freeze, system freeze. With fkms no issue. Sorry, but this don´t helps.

Revision history for this message
Juerg Haefliger (juergh) wrote :

Sigh. @knoedelfan, please read comment #53.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (13.5 KiB)

This bug was fixed in the package linux-raspi - 5.13.0-1008.9

---------------
linux-raspi (5.13.0-1008.9) impish; urgency=medium

  * impish/linux-raspi: 5.13.0-1008.9 -proposed tracker (LP: #1944938)

  * Speakup modules not included in Hirsute kernel (LP: #1942459)
    - [Config] raspi: Enable ACCESSIBILITY and set SPEAKUP*=m

  * Virtual CAN (vcan) driver missing in raspi 5.13 kernel (LP: #1944593)
    - [Packaging] Add drivers/net/can/* to linux-image-modules

  * HDMI does not display anything with Impish RPi desktop image (LP: #1944397)
    - Move clk_request_done() for hsm_req to the correct location
    - drm/vc4: hdmi: Make sure the controller is powered up during bind
    - drm/vc4: hdmi: Remove unnecessary pm_runtime_put

  * Miscellaneous Ubuntu changes
    - [Packaging] raspi: remove remaining references to ports

  [ Ubuntu: 5.13.0-17.17 ]

  * impish/linux: 5.13.0-17.17 -proposed tracker (LP: #1944943)
  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/master)
    - debian/dkms-versions -- update from kernel-versions (main/master)
  * Medion Notebook Keyboard not working (LP: #1909814)
    - ACPI: resources: Add DMI-based legacy IRQ override quirk
  * Can not boot impish in Cavium ThunderX (LP: #1942633)
    - arm64: Restore forced disabling of KPTI on ThunderX
  * PCIE LnkCtl ASPM not enabled under VMD mode for Alder Lake platforms
    (LP: #1942160)
    - SAUCE: vmd: fixup bridge ASPM by driver name instead
  * CirrusLogic/CS8409: No headset mic device when plugged earphone jack when
    HDMI/DP is used on Dolphin platform (LP: #1943935)
    - SAUCE: ALSA: hda/cs8409: Setup Dolphin Headset Mic as Phantom Jack
    - ALSA: hda/cs8409: Initialize Codec only in init fixup.
    - ALSA: hda/cs8409: Ensure Type Detection is only run on startup when
      necessary
  * psock_snd.sh in net from ubuntu_kernel_selftests ADT failure with
    focal/groovy/hirsute/impish (LP: #1892213)
    - selftests/net: remove min gso test in packet_snd
  * Update mpt3sas Driver to 38.100.00.00 for Ubuntu 21.10 and 20.04
    (LP: #1935034)
    - scsi: mpt3sas: Documentation cleanup
    - scsi: mpt3sas: Handle firmware faults during first half of IOC init
    - scsi: mpt3sas: Handle firmware faults during second half of IOC init
    - scsi: core: Introduce scsi_build_sense()
    - scsi: mpt3sas: Fix fall-through warnings for Clang
    - scsi: mpt3sas: Fix Coverity reported issue
    - scsi: mpt3sas: Bump driver version to 38.100.00.00
  * Update fix for LP: #1936708 (LP: #1942972)
    - Revert "UBUNTU: SAUCE: drm/i915/dp: Use max params for older panels"
    - drm/i915/dp: Use max params for panels < eDP 1.4
  * [SRU][H/OEM-5.13/OEM-5.14/U] Fix invalid MAC address after hotplug tbt dock
    (LP: #1942999)
    - SAUCE: igc: wait for the MAC copy when enabled MAC passthrough
  * Speakup modules not included in Hirsute kernel (LP: #1942459)
    - [Config] CONFIG_SPEAKUP=m
  * s390x BPF JIT vulnerabilities (LP: #1943960)
    - s390/bpf: Fix branch shortening during codegen pass
    - s390/bpf: Fix 64-bit subtraction of the -0x80000000 constant
    - s390/bpf: Fix optimizing out zero-extensions
  * CVE-2021-4...

Changed in linux-raspi (Ubuntu Impish):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-firmware-raspi2 - 5-0ubuntu1

---------------
linux-firmware-raspi2 (5-0ubuntu1) impish; urgency=medium

  * New upstream boot firmware release, 1.20210831
    - Contains workaround for compatibility with "full" KMS overlay on the
      Ubuntu Pi desktop (LP: #1944397)
  * Removed d/compat (replaced with debhelper-compat build-dep)

 -- Dave Jones <email address hidden> Tue, 28 Sep 2021 21:04:23 +0100

Changed in linux-firmware-raspi2 (Ubuntu Impish):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (21.6 KiB)

This bug was fixed in the package linux-raspi - 5.11.0-1021.22

---------------
linux-raspi (5.11.0-1021.22) hirsute; urgency=medium

  * hirsute/linux-raspi: 5.11.0-1021.22 -proposed tracker (LP: #1945897)

  * HDMI does not display anything with Impish RPi desktop image (LP: #1944397)
    - drm/vc4: hdmi: Make sure the controller is powered up during bind
    - drm/vc4: hdmi: Remove unnecessary pm_runtime_put
    - drm/vc4: hdmi: Fix bvb clock enable error checking
    - SAUCE: Revert "drm/vc4: Fix typo when getting firmware node"
    - SAUCE: Revert "vc4/drv: Only notify firmware of display done with kms"
    - SAUCE: Revert "drm/vc4: Notify the firmware when DRM is in charge"
    - SAUCE: Revert "drm/vc4: hdmi: Warn if we access the controller while
      disabled"

linux-raspi (5.11.0-1020.21) hirsute; urgency=medium

  * hirsute/linux-raspi: 5.11.0-1020.21 -proposed tracker (LP: #1944857)

  * Speakup modules not included in Hirsute kernel (LP: #1942459)
    - [Config] raspi: Enable ACCESSIBILITY and set SPEAKUP*=m

  [ Ubuntu: 5.11.0-38.42 ]

  * hirsute/linux: 5.11.0-38.42 -proposed tracker (LP: #1944863)
  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/2021.09.27)
  * Wobbly graphics on built-in display since linux-image-5.11.0-22-generic
    (LP: #1936708)
    - drm/i915/dp: Use max params for panels < eDP 1.4
  * Hirsute update: upstream stable patchset 2021-09-22 (LP: #1944610)
    - net: qrtr: fix another OOB Read in qrtr_endpoint_post
    - bpf: Fix ringbuf helper function compatibility
    - bpf: Fix NULL pointer dereference in bpf_get_local_storage() helper
    - ASoC: rt5682: Adjust headset volume button threshold
    - ASoC: component: Remove misplaced prefix handling in pin control functions
    - ARC: Fix CONFIG_STACKDEPOT
    - netfilter: conntrack: collect all entries in one cycle
    - once: Fix panic when module unload
    - blk-iocost: fix lockdep warning on blkcg->lock
    - ovl: fix uninitialized pointer read in ovl_lookup_real_one()
    - net: mscc: Fix non-GPL export of regmap APIs
    - can: usb: esd_usb2: esd_usb2_rx_event(): fix the interchange of the CAN RX
      and TX error counters
    - ceph: correctly handle releasing an embedded cap flush
    - riscv: Ensure the value of FP registers in the core dump file is up to date
    - Revert "btrfs: compression: don't try to compress if we don't have enough
      pages"
    - drm/amdgpu: Cancel delayed work when GFXOFF is disabled
    - Revert "USB: serial: ch341: fix character loss at high transfer rates"
    - USB: serial: option: add new VID/PID to support Fibocom FG150
    - usb: renesas-xhci: Prefer firmware loading on unknown ROM state
    - usb: dwc3: gadget: Fix dwc3_calc_trbs_left()
    - usb: dwc3: gadget: Stop EP0 transfers during pullup disable
    - scsi: core: Fix hang of freezing queue between blocking and running device
    - RDMA/bnxt_re: Add missing spin lock initialization
    - IB/hfi1: Fix possible null-pointer dereference in _extend_sdma_tx_descs()
    - RDMA/bnxt_re: Remove unpaired rtnl unlock in bnxt_re_dev_init()
    - ice: do not abort devlink info if board identifier can't be found
    ...

Changed in linux-raspi (Ubuntu Hirsute):
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.