Created attachment 140473 [details]
Full dmesg log with drm.debug=0xe
We have few ASUS laptops X705FD (The new WiskyLake), X560UD (intel
i5-8250U), X530UN (intel i7-8550U) share the same problem, which is
the HDMI connector status stays connected even the HDMI cable has been
unplugged. Look into the "/sys/class/drm/card0-HDMI-A-1/status" for
checking the status while plug/unplug the HDMI, it shows
"disconnected" before plug in HDMI cable, then switch to "connected"
after plugin, and still stay "connected" after unplug. This would
cause the audio output path cannot correctly switch from HDMI to
internal speaker after unplugging the HDMI.
I then try to verify with the latest kernel 4.18.0-rc3+, the bug still
present. The full "dmesg" attached.
The HDMI cable is plugged in at ~26th second.
"[ 26.214371] [drm:drm_detect_monitor_audio [drm]] Monitor has basic
then unplug the HDMI at ~73th second.
"[ 73.328361] [drm:drm_detect_monitor_audio [drm]] Monitor has basic
Please advise what I can do to fix this. Thanks
Created attachment 140474 [details]
'xrandr --verbose' before unplugging HDMI
Created attachment 140475 [details]
output of 'xrandr --current --verbose' after unplugging HDMI
On Fri, 06 Jul 2018, Chris Chiu <email@example.com> wrote:
> On Thu, Jul 5, 2018 at 10:40 PM, Ville Syrjälä
> <firstname.lastname@example.org> wrote:
>> On Thu, Jul 05, 2018 at 03:58:36PM +0800, Chris Chiu wrote:
>>> Please advise what I can do to fix this. Thanks
>> Pull the cable out faster?
>> I presume this is the same old case of hpd disconnecting slightly
>> before ddc and we still manage to read the EDID when processing
>> the hpd irq. We kinda tried to fix that with the live status
>> check but that thing failed spectacularly.
> Thanks for the suggestion. I tried pulling the cable out faster, the status
> shows correctly. I also tried branch drm-tip of
> but the symptom persists.
> Anything I can help here? Or any old commit/patch I can try to do some
Presumably we just want to kick off a delayed work (2s?) from a hotplug event if the status remains unchanged (and it's not a long pulse etc etc).
Yes, without looking at the code, doing some kind of debounce delay before handling the hotplug interrupt sounds like a clear solution here. We're ready to test any patches...
I also encountered this bug on ThinkPad T440. In fact, I think this's a regression: I never seen this bug on 4.14. It only appeared when I upgraded to 4.16, and it didn't go away after I upgraded to 4.17.
The most prominent side effect is that systemd-logind fails to suspend on lid close, believing that there's external screen attached.
Interestingly, although `grep . /sys/class/drm/*/status` will say that monitor is connected, on my machine, simply running `xrandr` will unstuck the status (and the grep command will now correctly report "disconnected" as well).
Another thing that I noticed is that `xrandr --output HDMI-1 --off` no longer turns the monitor off, but merely turns it black. I'm absolutely sure that the command used to actually turn the screen off. Not sure if it's related to this bug, though.
Created attachment 140946 [details] [review]
patch to recheck connector state after 2s
I added a patch which solves the issue for the driver used on Genode. Please feel free to test and adjust to your needs on vanilla Linux. The patch is against 4.16.3
Some background: we encountered the issue on our port of the Intel graphic driver to Genode and believed long it is due to some porting issues. Then I stumbled over this bug report and the hint about the 2s delay work. So, implemented a patch and we could resolve the issue with the HDMI disconnect reliable for us - thanks.
Thanks. I verified the attached patch on the problematic X705FD/X560UD. It works fine on both.
(In reply to Alexander Boettcher from comment #8)
> Created attachment 140946 [details] [review] [review]
> patch to recheck connector state after 2s
Is this patch is in upstream?
Please try http://email@example.com
Will your patch go upstream? Or is there any patch that is a good upstream candidate for approval?
Gentle ping. Any better idea for the next step?
Created attachment 143814 [details]
HDMI connection removed slowly
I see similar issue on Chromebook with native HDMI port. When HDMI connection gets removed slowly (wiggling) issue is easily reproducible. (Issue happens with drm-tip also).
Attaching the logs for the same.
Any update on when upstream fix will be available?
(In reply to Chris Chiu from comment #12)
> Hi Jani,
> Will your patch go upstream? Or is there any patch that is a good
> upstream candidate for approval?
Chris, Any feedback from comment 11? Do you still have the issue after applying the patch?
(In reply to Lakshmi from comment #15)
> (In reply to Chris Chiu from comment #12)
> > Hi Jani,
> > Will your patch go upstream? Or is there any patch that is a good
> > upstream candidate for approval?
> Chris, Any feedback from comment 11? Do you still have the issue after
> applying the patch?
No problem with Jani's patch. It's working fine unless a very tricky pull out of HDMI cable (pull out the HDMI cable gentle and slow, with each move of a few millimeters).
(In reply to Jani Nikula from comment #11)
> Please try
Issue is not reproducible with this patch.
@Jani, How to proceed further?