Skip to content

HDMI display doesn't come up if not booted with HDMI connected #5017

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

Closed
lategoodbye opened this issue May 1, 2022 · 8 comments
Closed

HDMI display doesn't come up if not booted with HDMI connected #5017

lategoodbye opened this issue May 1, 2022 · 8 comments
Labels
KMS Issue Issues related to KMS/DRM drivers

Comments

@lategoodbye
Copy link
Contributor

Describe the bug

Hi, not sure this ever worked before. If i boot my Raspberry Pi 3 B Plus without HDMI attached and then connect the HDMI display afterwards the displays doesn't comes up and stays black. Looking at the interrupts shows that vc4 hvs (hotplug interrupt?) doesn't increase on plugin and out.

Expected behavior:
The HDMI display comes up like if the board has booted with HDMI connected.

Steps to reproduce the behaviour

  • do not connect the HDMI cable to the Raspberry Pi 3 B Plus
  • boot Raspberry Pi 3 B Plus
  • connect the HDMI cable of the display

There are not modifications to the config.txt (same as shipped by April 2022 release)

Device (s)

Raspberry Pi 3 Mod. B+

System

System Information

Raspberry Pi 3 Model B Plus Rev 1.3
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"

Raspberry Pi reference 2022-04-04
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 226b479f8d32919c9fe36dd5b4c20c02682f8180, stage4

Linux raspberrypi 5.15.32-v7+ #1538 SMP Thu Mar 31 19:38:48 BST 2022 armv7l GNU/Linux
Revision : a020d3
Serial : 00000000377bb917
Model : Raspberry Pi 3 Model B Plus Rev 1.3
Throttled flag : throttled=0x0
Camera : supported=0 detected=0, libcamera interfaces=0

Videocore information

Mar 24 2022 13:20:54
Copyright (c) 2012 Broadcom
version e5a963efa66a1974127860b42e913d2374139ff5 (clean) (release) (start)

alloc failures: 0
compactions: 0
legacy block fails: 0

Logs

cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
50: 411 0 0 0 ARMCTRL-level 1 Edge 3f00b880.mailbox
51: 1148 0 0 0 ARMCTRL-level 2 Edge VCHIQ doorbell
67: 0 0 0 0 ARMCTRL-level 42 Edge vc4
68: 0 0 0 0 ARMCTRL-level 43 Edge 3f004000.txp
75: 346 0 0 0 ARMCTRL-level 50 Edge DMA IRQ
77: 8085 0 0 0 ARMCTRL-level 52 Edge DMA IRQ
78: 0 0 0 0 ARMCTRL-level 53 Edge DMA IRQ
89: 48392 0 0 0 ARMCTRL-level 64 Edge dwc_otg, dwc_otg_pcd, dwc_otg_hcd:usb1
90: 0 0 0 0 ARMCTRL-level 65 Edge vc4 hvs
97: 0 0 0 0 ARMCTRL-level 72 Edge vc4 hdmi cec
99: 0 0 0 0 ARMCTRL-level 74 Edge vc4 crtc
102: 0 0 0 0 ARMCTRL-level 77 Edge vc4 crtc
103: 0 0 0 0 ARMCTRL-level 78 Edge vc4 crtc
110: 104 0 0 0 ARMCTRL-level 85 Edge 3f805000.i2c
113: 770 0 0 0 ARMCTRL-level 88 Edge mmc0
114: 7586 0 0 0 ARMCTRL-level 89 Edge uart-pl011
119: 4809 0 0 0 ARMCTRL-level 94 Edge mmc1
194: 0 0 0 0 bcm2836-timer 0 Edge arch_timer
195: 3969 3549 4054 3183 bcm2836-timer 1 Edge arch_timer
198: 0 0 0 0 bcm2836-pmu 9 Edge arm-pmu
199: 2 0 0 0 lan78xx-irqs 17 Edge usb-001:006:01
FIQ: usb_fiq
IPI0: 0 0 0 0 CPU wakeup interrupts
IPI1: 0 0 0 0 Timer broadcast interrupts
IPI2: 263 291 317 234 Rescheduling interrupts
IPI3: 5019 7214 9822 9448 Function call interrupts
IPI4: 0 0 0 0 CPU stop interrupts
IPI5: 164 72 106 61 IRQ work interrupts
IPI6: 0 0 0 0 completion interrupts

cat /sys/kernel/debug/clk/clk_summary
enable prepare protect duty hardware
clock count count count rate accuracy phase cycle enable

fw-clk-vec 0 0 0 19200000 0 0 50000 Y
fw-clk-pixel-bvb 0 0 0 0 0 0 50000 Y
fw-clk-m2mc 0 0 0 0 0 0 50000 Y
fw-clk-hevc 0 0 0 0 0 0 50000 Y
fw-clk-pixel 0 0 0 0 0 0 50000 Y
fw-clk-v3d 0 0 0 300000000 0 0 50000 Y
fw-clk-core 0 0 0 250000000 0 0 50000 Y
fw-clk-arm 0 0 0 600000000 0 0 50000 Y
otg 0 0 0 480000000 0 0 50000 Y
osc 7 7 1 19200000 0 0 50000 Y
gp2 1 1 0 32768 0 0 50000 Y
tsens 1 1 0 1920000 0 0 50000 Y
otp 0 0 0 4800000 0 0 50000 Y
timer 0 0 0 1000002 0 0 50000 Y
pllh 4 4 0 864000000 0 0 50000 Y
pllh_pix_prediv 1 1 0 3375000 0 0 50000 Y
pllh_pix 0 0 0 337500 0 0 50000 Y
pllh_aux 1 1 0 216000000 0 0 50000 Y
pllh_rcal_prediv 1 1 0 3375000 0 0 50000 Y
pllh_rcal 0 0 0 337500 0 0 50000 Y
plld 3 3 0 2000000024 0 0 50000 Y
plld_dsi1 0 0 0 7812501 0 0 50000 Y
plld_dsi0 0 0 0 7812501 0 0 50000 Y
plld_per 4 4 0 500000006 0 0 50000 Y
hsm 1 1 0 120075048 0 0 50000 Y
gp1 1 1 0 24000094 0 0 50000 Y
uart 1 1 0 47999625 0 0 50000 Y
plld_core 2 2 0 500000006 0 0 50000 Y
sdram 0 0 0 166666668 0 0 50000 Y
pllc 3 3 1 2000000024 0 0 50000 Y
pllc_per 1 1 0 1000000012 0 0 50000 Y
emmc 0 0 0 200000002 0 0 50000 Y
pllc_core2 0 0 0 7812501 0 0 50000 Y
pllc_core1 0 0 0 7812501 0 0 50000 Y
pllc_core0 2 2 1 1000000012 0 0 50000 Y
vpu 2 2 1 400000000 0 0 50000 Y
3f805000.i2c_div 1 1 1 100000 0 0 50000 Y
aux_spi2 0 0 0 400000000 0 0 50000 N
aux_spi1 0 0 0 400000000 0 0 50000 N
aux_uart 0 0 0 400000000 0 0 50000 N
peri_image 0 0 0 400000000 0 0 50000 Y
pllb 2 2 0 1200000000 0 0 50000 Y
pllb_arm 1 1 0 600000000 0 0 50000 Y
plla 2 2 0 2400000000 0 0 50000 Y
plla_ccp2 0 0 0 9375000 0 0 50000 Y
plla_dsi0 0 0 0 9375000 0 0 50000 Y
plla_core 1 1 0 600000000 0 0 50000 Y
h264 0 0 0 200000000 0 0 50000 Y
isp 0 0 0 200000000 0 0 50000 Y
dsi1p 0 0 0 0 0 0 50000 Y
dsi0p 0 0 0 0 0 0 50000 Y
dsi1e 0 0 0 0 0 0 50000 Y
dsi0e 0 0 0 0 0 0 50000 Y
cam1 0 0 0 0 0 0 50000 Y
cam0 0 0 0 0 0 0 50000 Y
dpi 0 0 0 0 0 0 50000 Y
tec 0 0 0 0 0 0 50000 Y
smi 0 0 0 0 0 0 50000 Y
slim 0 0 0 0 0 0 50000 Y
gp0 0 0 0 0 0 0 50000 Y
dft 0 0 0 0 0 0 50000 Y
aveo 0 0 0 0 0 0 50000 Y
pcm 0 0 0 0 0 0 50000 Y
pwm 0 0 0 0 0 0 50000 Y

dmesg
[ 10.255961] fb0: switching to vc4 from simple
[ 10.262718] Console: switching to colour dummy device 80x30
[ 10.279883] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[ 10.287550] Registered IR keymap rc-cec
[ 10.292851] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 10.297937] rc rc0: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0
[ 10.298258] input: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0/input2
[ 10.456120] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
[ 10.556175] brcmfmac: F1 signature read @0x18000000=0x15264345
[ 10.556439] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[ 10.561546] Registered IR keymap rc-cec
[ 10.561806] rc rc0: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0
[ 10.562095] input: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0/input3
[ 10.571061] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 10.571994] usbcore: registered new interface driver brcmfmac
[ 10.581760] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin failed with error -2
[ 10.667205] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[ 10.671498] Registered IR keymap rc-cec
[ 10.671755] rc rc0: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0
[ 10.672051] input: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0/input4
[ 11.127366] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 11.127544] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 11.179635] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Nov 1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
[ 11.298755] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[ 11.304596] Registered IR keymap rc-cec
[ 11.304915] rc rc0: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0
[ 11.305412] input: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0/input5
[ 11.314795] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
[ 11.315369] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4])
[ 11.315990] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 11.317393] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 11.317971] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 11.318492] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
[ 11.337884] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[ 11.338205] vc4-drm soc:gpu: [drm] Cannot find any crtc or sizes

Additional context

No response

@popcornmix popcornmix added the KMS Issue Issues related to KMS/DRM drivers label May 2, 2022
@popcornmix
Copy link
Collaborator

I think this is at least partly to do with mutter.
mutter is enabled by default on Pi4 with 2G or more sdram, if VNC is not enabled.
Otherwise it is disabled.

I find if mutter is enabled, then I can boot with hdmi disconnected and later connect hdmi and desktop appears.
Without mutter (e.g. by enabling VNC) I get a blank screen when connecting hdmi.

I've repeated on Pi3+ and see the same thing.

hotplug is detected (e.g. checking with kmsprint shows (connected)) as expected.
You can force mutter on a pi3+ by editing /usr/bin/startlxde-pi and changing the TOTAL_MEM check form 2048 to 1024. Then hotplug works as desired.

I'd be interested in knowing what mutter does to make this work, and if it can be replicated in the non-mutter world.

But this doesn't look like a kernel issue.

@popcornmix
Copy link
Collaborator

@lategoodbye do you agree with my analysis?
Does hotplug work for you when mutter is used and fail to work when mutter is not used?

@lategoodbye
Copy link
Contributor Author

@popcornmix Sorry for the late reply, but i didn't receive a notification. Can you please tell which kernel version you used? I noticed that Maxime recently fixed a related issue 82f448e, but my version didn't include this change. I will try to retest at the weekend.

@popcornmix
Copy link
Collaborator

I was using latest rpi-update kernel (would have been rpi-5.15.36, but I don't think newer ones behave any differently).

There was a small window when 5.15.34 would hang on boot when booted without hdmi on Pi0-3, but for me that was fatal (I couldn't ssh in or log in through uart).

The mutter issue I've described doesn't interfere with uart/ssh access - just whether hdmi gets enabled on a hotplug if it wasn't enabled previously.

@popcornmix
Copy link
Collaborator

@EdiDD your issue doesn't sound at all related to this one.
It seems much closer to #4962

@lategoodbye
Copy link
Contributor Author

@popcornmix First i upgrade to 5.15.38 and the issue still occured, then i changed /usr/bin/startlxde-pi as you suggested and it worked. Thanks, would be great to get this fixed in Raspbian OS.

@popcornmix
Copy link
Collaborator

Okay to close this as it's not fixable in firmware?
I have been told that this won't be an issue in RPiOS Bookworm.

@lategoodbye
Copy link
Contributor Author

Sorry, i missed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
KMS Issue Issues related to KMS/DRM drivers
Projects
None yet
Development

No branches or pull requests

2 participants