[KBL] Hotplug on HDMI may leave DRM in inconsistent state
Submitted by Zachary Tahenakos
Assigned to Chris Wilson @ickle
Link to original bug (#106195)
Description
On an HP mt20/mt21, if an HDMI cable is connected and then disconnected after waiting for some time for the hotplug to settle, DRM may get into an inconsistent state where the kernel believes the HDMI cable is connected, but it has been physically disconnected. This results in future hotplugs not necessarily behaving correctly, nor has the desktop properly resized due to the cable being disconnected.
For example, if the laptop panel is 1920x1080 and a monitor is connected to the unit via HDMI with a native resolution of 1920x1080, a hotplug will now have a desktop of size 3840x1080. When the problem occurs, after the cable has been disconnected, the desktop is still 3840x1080.
Running the xrandr command may get the system back into a consistent state, it almost appears as if a uevent bubbled up to userspace got stuck and the handler for that event never exits, which leaves the the system into an inconsistent state. Running xrandr "pokes" this handler and gets it back to processing.
This issue has been reproduced with both the modeset and intel X server drivers, on kernels up to at least 4.15.7.
Software Information
OS: Ubuntu 16.04.3 LTS
Kernel: 4.10.0-28-generic
X: 1.19.3
DDX: modeset
Mesa: 17.0.7-0ubuntu0.16.04.1
libdrm: 2.4.76-1~ubuntu16.04.1
Hardware Information
Processor: Intel Celeron 3865U (Kabylake-U)
Graphics: Intel HD Graphics 610 (8086:5906)
(ark:https://ark.intel.com/products/96507/Intel-Celeron-Processor-3865U-2M-Cache-1_80-GHz)
Quickspecs of the mt21: http://www8.hp.com/h20195/v2/GetDocument.aspx?docname=c05561757