-
Notifications
You must be signed in to change notification settings - Fork 5.2k
KMS: Blank screen after disconnect/reconnect if HDMI mode requires HDMI2.0 scrambling #4411
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
Comments
Title says KMS. Comments reference FKMS. Could you confirm which we're talking about? KMS has supported hotplug interrupts since #4313 Hash 6edb3992f5df1ec1107f4c5e62b6d63b074f24c3 appears not to exist in https://github.com/Hexxeh/rpi-firmware/commits/master either. |
KMS. KMS does not restore scrambling when a 4Kp60 display is reconnected. raspberrypi/firmware@6edb399 maps to |
OK, ack. Having unplugged, DRM is still registering the CRTC as enabled when viewed via /sys/kernel/debug/dri/1/state. |
I've hit this bug in LibreELEC as well when putting my LG 55C8 into standby and back on. See also my comment here #4371 (comment) |
Ping @mripard |
I discussed it and it indeed seems we should restore the scrambling status on reconnection. I don't really see another driver doing so at the moment, so I'll have to dig into how to do that exactly, but it's on my plate |
Comparing to i915 on my laptop (Ubuntu 20.04 on a 5.4 kernel), it seems to trigger a whole load more stuff within the framework. Note this was at the console to ensure that X and stuff in the Window Manager didn't get involved. |
Looking at vc4 logs on disconnect
So it's just been disconnected, but drm_client_modeset_probe doesn't view the connector as such. |
With the fb emulation it appears to be an issue with reporting HPD state from
So it's gone through the drm_probe_ddc path and determined it's connected. Doesn't work with X. X appears to leave the CRTC/connector enabled after disconnect. That may be an issue in LXDE, so it'd be worth a quick check with x86 Raspberry Pi OS, or a Bullseye image to see if it's changed there. |
The outcome of the discussion with Daniel about this is that we shouldn't modify anything related to the display pipe or vblank in the driver in the case where it's reconnected. Indeed, it might stall the compositor that waits for the vblank. His suggestions were either to set the link status property to indicate a bad link, or to just re-enable the scrambler again. The latter seems to work in more cases, so that's what I implemented in #4412 |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
If the HDMI cable is disconnected then re-attached to the same display then the display is not restored. This only happens if the HDMI mode requires scrambling e.g. 4Kp60.
To reproduce
Add hdmi_enable_4kp60=1 to config.txt
Reboot
Use arandr to select 4Kp60
Disconnect HDMI cable
Reattach HDMI cable
Expected behaviour
Reconnecting to the same display should work. The FKMS firmware monitors the hotplug interrupt and attempts to restore HDMI scrambling if it was previously enabled. This does not happen with KMS.
Hotplugging to different display resolutions doesn't work, but that's a more difficult problem and requires interaction with userspace DRM client to pick alternate modes. However, until userspace supports this we the display driver should support the most frequent use-case which is coping with the HDMI cable being removed e.g. when moving a monitor.
Actual behaviour
Display remains blank
System
Raspberry Pi OS latest
Pi 4B 1.1
rpi-update 6edb3992f5df1ec1107f4c5e62b6d63b074f24c3
Additional context
I think this also fails with LibreElec. Raising a specific bug because this is a blocker for enabling KMS by default on Raspberry Pi OS.
The text was updated successfully, but these errors were encountered: