firmware icon indicating copy to clipboard operation
firmware copied to clipboard

No hdmi signal on Pi4 using "hdmi1" after upgrading

Open richrboo opened this issue 6 years ago • 70 comments

hdmi1 is lost after upgrading Pi4. Switching to hdmi0 gets the Pi4 booting again (the one nearest usb-c), but hdmi1 no longer works.

I can get hdmi1 working again, by reflashing SD card to 2019-06-20 release and avoid upgrading. So I'm assuming software issue, rather than a faulty Pi4.

richrboo avatar Jun 25 '19 22:06 richrboo

The connectors are numbered 0 & 1, where 0 is nearest the USB C power socket.

pelwell avatar Jun 25 '19 22:06 pelwell

Thanks. Sorry for the confusion, I saw that Raspbian uses hdmi1 and 2 in screen config. I have edited the report.

richrboo avatar Jun 25 '19 22:06 richrboo

I assume by upgrade you mean using rpi-update?

Can you explain the exact configuration you have when it fails? e.g. one or two hdmi displays connected? what resolution/refresh rate? Do you have hdmi_enable_4k=1 in config.txt?

popcornmix avatar Jun 25 '19 23:06 popcornmix

When you first boot 2019-06-20 release, it has a gui checking for an update and then upgrades. After upgrading I then reboot and lose hdmi1. I assume it is doing apt-get update and upgrade behind the gui.

I was only using one hdmi connection, hdmi1. This was plugged in to a TV. Res refresh on the working hdmi0 is 3840x2160@30Hz. I assume the same for hdmi1, as I just swapped from hdmi1 to hdmi0, using the same TV.

hdmi_enable_4k=1 is not enabled.

richrboo avatar Jun 26 '19 07:06 richrboo

A colleague tried his Pi4 and his hdmi sockets work. Using his working sdcard in my Pi, and hdmi1 doesn't work ruling out any sdcard issue. So possibly a hardware fault, but it did work with 2019-06-20 release, before the gui did the update.

richrboo avatar Jun 26 '19 09:06 richrboo

Does applying a little pressure (keep it light) to the hdmi plug when booting make it work? Pushing from underside is more likely to help.

If so that would suggest a mechanical failure between PCB/hdmi socket/cable.

popcornmix avatar Jun 26 '19 11:06 popcornmix

Nope. There was no play at all, applying pressure made no difference. I've been back to the Pi shop and exchanged it, Tim helped and is holding my Pi to show an engineer.

However now back in the office and I have the exact same issue with the exchanged one.

richrboo avatar Jun 26 '19 13:06 richrboo

It looks like there may be an issue with 4k30 on HDMI1 as I have replicated this. There are slight hardware differences between the two, and HDMI0 is the more capable port. It looks like the HDMI state machine has stalled as I'm getting flip timeouts on HDMI-1.

Can you try adding

hdmi_mode:1=16
hdmi_group:1=1
hdmi_mode:0=16
hdmi_group:0=1

to config.txt to force it to 1080p60 and reboot? At least that will confirm if you do have another dodgy board, or is it "only" software.

6by9 avatar Jun 26 '19 17:06 6by9

I went back to the shop. They are seeing issues with dual monitor and using hdmi1 too. I have yet to try the above, but have a 3rd Pi4. This is no better. The shop think it isn't hardware issue, but very strange my colleague Pi4 works as expected on either hdmi. I'll use a single monitor on hdmi0 for now. The Pi store have two boards for investigation at least. Hopefully a software fix can be found.

richrboo avatar Jun 26 '19 18:06 richrboo

No point returning more Pi's - this is a software issue that seems to affect some setups and not others. Can you try adding to config.txt core_freq_min=500 and report if this helps

popcornmix avatar Jun 27 '19 14:06 popcornmix

Did you add enable_uart=1 to config.txt? Does the problem disappear without adding that?

popcornmix avatar Jun 28 '19 16:06 popcornmix

I didn't have enable_uart=1 in my config.txt. My config.txt was as per defaults. Adding it prevents display on either hdmi0 or hdmi1.

Using core_freq_min=500 brings hdmi1 back to life, both hdmi0 and hdmi1 work with this setting. Thanks.

richrboo avatar Jun 30 '19 21:06 richrboo

Can you test whether latest rpi-update firmware fixes your issue without adding core_freq_min=500?

popcornmix avatar Jul 02 '19 14:07 popcornmix

I am not the original reporter but I have the same issue: single monitor connected on HDMI1 shows no picture. Result after rpi-update + cold boot: short flash of boot rainbow and raspberries and then dark again.

giddyhup avatar Jul 02 '19 14:07 giddyhup

dmesg shows several entires related to DRM, if that's related.

giddyhup avatar Jul 02 '19 14:07 giddyhup

@giddyhup I assume monitor works when connected to HDMI0? What does:

vcgencmd version
vcgencmd get_config int
vcgencmd measure_clock core

report? Does core_freq_min=500 in config.txt make HDMI1 work?

popcornmix avatar Jul 02 '19 14:07 popcornmix

I can't use HDMI0, my adapter is too wide. HDMI1 worked when I booted the original buster image (slimmed desktop version).

pi@raspberrypi:~ $ vcgencmd version
Jul  2 2019 15:12:05
Copyright (c) 2012 Broadcom
version 440db464adbebc026c8b3f2da2b49ad932e05f64 (clean) (release) (start)
pi@raspberrypi:~ $ vcgencmd get_config int
arm_freq=1500
audio_pwm_mode=514
config_hdmi_boost=5
core_freq=500
core_freq_min=250
disable_commandline_tags=2
disable_l2cache=1
display_hdmi_rotate=-1
display_lcd_rotate=-1
enable_gic=1
force_eeprom_read=1
force_pwm_open=1
framebuffer_ignore_alpha=1
framebuffer_swap=1
gpu_freq=500
gpu_freq_min=500
init_uart_clock=0x2dc6c00
lcd_framerate=60
mask_gpu_interrupt0=1024
mask_gpu_interrupt1=0x10000
max_framebuffers=2
pause_burst_frames=1
program_serial_random=1
hdmi_force_cec_address:0=65535
hdmi_force_cec_address:1=65535
hdmi_pixel_freq_limit:0=0x11e1a300
hdmi_pixel_freq_limit:1=0x11e1a300
pi@raspberrypi:~ $ vcgencmd measure_clock core
frequency(1)=250000496
```
The core minimum frequency workaround works.

P.S., probably unrelated: reboot got stuck, I had to cut the power; could be related to Pimoroni's fan which was running.

giddyhup avatar Jul 02 '19 14:07 giddyhup

What does tvservice -s show?

popcornmix avatar Jul 02 '19 15:07 popcornmix

... (I removed the workaround. Now I have problems booting with a monitor attached.)

giddyhup avatar Jul 02 '19 15:07 giddyhup

Without monitor or when plugging in monitor when the Pi is already running

tvservice -s
state 0x120001 [TV is off]

With monitor after boot:

tvservice -s
state 0xa [HDMI CUSTOM RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive

Remark: it looks like the monitor goes blank at the stage where the greeter would appear. The rainbow pixel, the raspberries and the splash screen appear (albeit it is rather fast).

giddyhup avatar Jul 02 '19 15:07 giddyhup

I'm interested in results of booting with display already connected to HDMI1. Are you saying you can't ssh in at this point?

popcornmix avatar Jul 02 '19 15:07 popcornmix

I can't reproduce the stuck-at-boot situation reliably but I am SSHing all the time, I currently have neither keyboard nor mouse attached.

giddyhup avatar Jul 02 '19 15:07 giddyhup

recent dmesg entries:

[   17.751802] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[   27.991793] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[   38.231799] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CONNECTOR:45:HDMI-A-1] flip_done timed out
[   48.471794] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [PLANE:28:plane-0] flip_done timed out
[   58.711796] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[   68.951798] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[   79.192843] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CONNECTOR:45:HDMI-A-1] flip_done timed out
[   89.433388] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [PLANE:28:plane-0] flip_done timed out
[   99.673667] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[  109.913815] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[  120.153882] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CONNECTOR:45:HDMI-A-1] flip_done timed out
[  130.393919] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [PLANE:28:plane-0] flip_done timed out
[  140.633391] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[  150.872767] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[  161.112277] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CONNECTOR:45:HDMI-A-1] flip_done timed out
[  171.351902] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [PLANE:28:plane-0] flip_done timed out
[  181.591594] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[  191.831480] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[  202.071181] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CONNECTOR:45:HDMI-A-1] flip_done timed out
[  212.311063] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [PLANE:28:plane-0] flip_done timed out
[  222.550900] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[  234.070831] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[  244.310647] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CONNECTOR:45:HDMI-A-1] flip_done timed out
[  254.550515] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[  265.430429] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[  275.670316] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CONNECTOR:45:HDMI-A-1] flip_done timed out
[  285.910208] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [PLANE:28:plane-0] flip_done timed out
[  296.150086] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[  297.257509] fuse init (API version 7.27)
[  308.310193] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
[  318.549905] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [PLANE:28:plane-0] flip_done timed out

giddyhup avatar Jul 02 '19 15:07 giddyhup

So "With monitor after boot:" means the monitor was plugged in before boot? And this is a 1080p display (no 4kp30 support)?

popcornmix avatar Jul 02 '19 15:07 popcornmix

Yes. Monitor was plugged in before boot. Monitor does not appear to support 4k.

giddyhup avatar Jul 02 '19 15:07 giddyhup

Latest syslog output:

Jul  2 17:26:20 raspberrypi kernel: [  908.008941] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CONNECTOR:45:HDMI-A-1] flip_done timed out
Jul  2 17:26:20 raspberrypi kernel: [  908.009049] ------------[ cut here ]------------
Jul  2 17:26:20 raspberrypi kernel: [  908.009117] WARNING: CPU: 3 PID: 668 at drivers/gpu/drm/vc4/vc4_firmware_kms.c:869 vc4_crtc_atomic_flush+0x98/0x9c [vc4]
Jul  2 17:26:20 raspberrypi kernel: [  908.009127] Modules linked in: fuse rfcomm bnep hci_uart btbcm serdev bluetooth ecdh_generic 8021q garp stp llc brcmfmac brcmutil vc4 sha256_generic drm_kms_helper v3d cfg80211 gpu_sched rfkill snd_soc_core snd_bcm2835(C) snd_compress drm snd_pcm_dmaengine syscopyarea snd_pcm sysfillrect raspberrypi_hwmon sysimgblt hwmon drm_panel_orientation_quirks fb_sys_fops snd_timer snd bcm2835_codec(C) bcm2835_v4l2(C) v4l2_mem2mem bcm2835_mmal_vchiq(C) v4l2_common videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev argon_mem media uio_pdrv_genirq uio fixed i2c_dev ip_tables x_tables ipv6
Jul  2 17:26:20 raspberrypi kernel: [  908.009634] CPU: 3 PID: 668 Comm: Xorg Tainted: G         C        4.19.56-v7l+ #1242
Jul  2 17:26:20 raspberrypi kernel: [  908.009642] Hardware name: BCM2835
Jul  2 17:26:20 raspberrypi kernel: [  908.009673] [<c0212c8c>] (unwind_backtrace) from [<c020d49c>] (show_stack+0x20/0x24)
Jul  2 17:26:20 raspberrypi kernel: [  908.009694] [<c020d49c>] (show_stack) from [<c0979880>] (dump_stack+0xd4/0x118)
Jul  2 17:26:20 raspberrypi kernel: [  908.009714] [<c0979880>] (dump_stack) from [<c0222270>] (__warn+0x104/0x11c)
Jul  2 17:26:20 raspberrypi kernel: [  908.009731] [<c0222270>] (__warn) from [<c02223c0>] (warn_slowpath_null+0x50/0x58)
Jul  2 17:26:20 raspberrypi kernel: [  908.009792] [<c02223c0>] (warn_slowpath_null) from [<bf7dba08>] (vc4_crtc_atomic_flush+0x98/0x9c [vc4])
Jul  2 17:26:20 raspberrypi kernel: [  908.009941] [<bf7dba08>] (vc4_crtc_atomic_flush [vc4]) from [<bf79081c>] (drm_atomic_helper_commit_planes+0x1a4/0x298 [drm_kms_helper])
Jul  2 17:26:20 raspberrypi kernel: [  908.010076] [<bf79081c>] (drm_atomic_helper_commit_planes [drm_kms_helper]) from [<bf7dd0e0>] (vc4_atomic_complete_commit+0x60/0x33c [vc4])
Jul  2 17:26:20 raspberrypi kernel: [  908.010171] [<bf7dd0e0>] (vc4_atomic_complete_commit [vc4]) from [<bf7dd49c>] (vc4_atomic_commit+0xe0/0x194 [vc4])
Jul  2 17:26:20 raspberrypi kernel: [  908.010398] [<bf7dd49c>] (vc4_atomic_commit [vc4]) from [<bf375410>] (drm_atomic_commit+0x5c/0x60 [drm])
Jul  2 17:26:20 raspberrypi kernel: [  908.010748] [<bf375410>] (drm_atomic_commit [drm]) from [<bf377508>] (drm_mode_atomic_ioctl+0x98c/0xb78 [drm])
Jul  2 17:26:20 raspberrypi kernel: [  908.011086] [<bf377508>] (drm_mode_atomic_ioctl [drm]) from [<bf362bc4>] (drm_ioctl_kernel+0xb4/0xf0 [drm])
Jul  2 17:26:20 raspberrypi kernel: [  908.011418] [<bf362bc4>] (drm_ioctl_kernel [drm]) from [<bf362ff8>] (drm_ioctl+0x230/0x3cc [drm])
Jul  2 17:26:20 raspberrypi kernel: [  908.011594] [<bf362ff8>] (drm_ioctl [drm]) from [<c03c3edc>] (do_vfs_ioctl+0xbc/0x804)
Jul  2 17:26:20 raspberrypi kernel: [  908.011615] [<c03c3edc>] (do_vfs_ioctl) from [<c03c4668>] (ksys_ioctl+0x44/0x6c)
Jul  2 17:26:20 raspberrypi kernel: [  908.011634] [<c03c4668>] (ksys_ioctl) from [<c03c46a8>] (sys_ioctl+0x18/0x1c)
Jul  2 17:26:20 raspberrypi kernel: [  908.011651] [<c03c46a8>] (sys_ioctl) from [<c0201000>] (ret_fast_syscall+0x0/0x28)
Jul  2 17:26:20 raspberrypi kernel: [  908.011660] Exception stack(0xda489fa8 to 0xda489ff0)
Jul  2 17:26:20 raspberrypi kernel: [  908.011672] 9fa0:                   02616e58 bee6ca78 0000000c c03864bc bee6ca78 00000000
Jul  2 17:26:20 raspberrypi kernel: [  908.011685] 9fc0: 02616e58 bee6ca78 c03864bc 00000036 02637bd8 026a4910 025fbc70 0000002d
Jul  2 17:26:20 raspberrypi kernel: [  908.011695] 9fe0: b6d0108c bee6ca44 b6ce8594 b697451c
Jul  2 17:26:20 raspberrypi kernel: [  908.011705] ---[ end trace b01d708e91ab7b28 ]---
Jul  2 17:26:20 raspberrypi systemd[1]: Starting Cleanup of Temporary Directories...
Jul  2 17:26:20 raspberrypi systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Jul  2 17:26:20 raspberrypi systemd[1]: Started Cleanup of Temporary Directories.
Jul  2 17:26:30 raspberrypi kernel: [  918.249088] [drm:drm_atomic_helper_wait_for_flip_done [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
Jul  2 17:26:40 raspberrypi kernel: [  928.489242] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CRTC:43:crtc-0] flip_done timed out
Jul  2 17:26:51 raspberrypi kernel: [  938.729374] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] *ERROR* [CONNECTOR:45:HDMI-A-1] flip_done timed out

giddyhup avatar Jul 02 '19 15:07 giddyhup

The vc4_crtc_atomic_flush backtrace is known and harmless. See: https://github.com/raspberrypi/linux/issues/3020

popcornmix avatar Jul 02 '19 15:07 popcornmix

Okay your issue may be something new. OP was using 3840x2160@30 which needs more than 250MHz pixel clock (and also core_freq) and I was able to reproduce that.

1080p60 only requires 148.5MHz so I'd have thought 250MHz would be fine (and is in my setup). Stick with core_freq_min=500 for now. @timg236 (who did most of the clock/hdmi code) should be back in the office tomorrow - I'll see if he has any further ideas.

popcornmix avatar Jul 02 '19 15:07 popcornmix

OK, I will stick with core_freq_min=500.

giddyhup avatar Jul 02 '19 15:07 giddyhup

Can you report vcgencmd version just to confirm that the expected firmware actually is running?

6by9 avatar Jul 02 '19 15:07 6by9