<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - unplug event never reach user space - hpd unplug race vs edid probe"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99031">99031</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>unplug event never reach user space - hpd unplug race vs edid probe
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DRI
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>DRM/Intel
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>prahal@yahoo.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Lenovo Thinkpad Yoga S1
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated
Graphics Controller (rev 09)

kernels:
4.9-rc8
<span class="quote">>= 4.8.5</span >
drm-intel nightly

Mostly unplug event are acked but disconnect is not set : this as sometimes I
do not unplug the external hdmi cable fast enough and from logs edid is
successfully grabbed even though I am removing the cable.
If I unplug fast all is fine.
mind sometimes the logs show mulitple hotplug events at once on unplug and then
disconnect triggers (in fact I get "connect" on first event and disconnect on
later ones).
But unplugging slowly reproduce this.

This is <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [HSW-M/BYT/BDW/BSW]udevadm unable to monitor HDMI plug/unplug event sporadically"
   href="show_bug.cgi?id=82593">https://bugs.freedesktop.org/show_bug.cgi?id=82593</a> .
The patch there never went in , context
<a href="https://patchwork.freedesktop.org/patch/51634/">https://patchwork.freedesktop.org/patch/51634/</a> 
I did not reopen as the report is quite old.



also reported in <a href="https://bugzilla.kernel.org/show_bug.cgi">https://bugzilla.kernel.org/show_bug.cgi</a> and closed as it was
submitted against user space stack.

logs at drm debug 0x46


" slow unplug   4.8.11 debian
[  917.257947] [drm:intel_get_hpd_pins] hotplug event received, stat
0x00400000, dig 0x10101210, pins 0x00000040
[  917.257951] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on PIN 6
- cnt: 0
[  917.257992] [drm:i915_hotplug_work_func] running encoder hotplug functions
[  917.257996] [drm:i915_hotplug_work_func] Connector HDMI-A-2 (pin 6) received
hotplug event.
[  917.258000] [drm:intel_hdmi_detect] [CONNECTOR:52:HDMI-A-2]
[  917.272759] [drm:drm_mode_addfb2] [FB:56]
[  917.283321] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0040
w(1)
[  917.283323] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK on first message,
retry
[  917.283510] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0040
w(1)
[  917.283513] [drm:drm_detect_monitor_audio] Monitor has basic audio support
"

" damn fast unplug   4.8.11 debian
[ 1320.111504] [drm:intel_get_hpd_pins] hotplug event received, stat
0x00400000, dig 0x10101210, pins 0x00000040
[ 1320.111508] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on PIN 6
- cnt: 0
[ 1320.111547] [drm:i915_hotplug_work_func] running encoder hotplug functions
[ 1320.111553] [drm:i915_hotplug_work_func] Connector HDMI-A-2 (pin 6) received
hotplug event.
[ 1320.111561] [drm:intel_hdmi_detect] [CONNECTOR:52:HDMI-A-2]
[ 1320.116255] [drm:intel_get_hpd_pins] hotplug event received, stat
0x00400000, dig 0x10101210, pins 0x00000040
[ 1320.116258] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on PIN 6
- cnt: 1
[ 1320.118337] [drm:intel_get_hpd_pins] hotplug event received, stat
0x00400000, dig 0x10101210, pins 0x00000040
[ 1320.118339] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on PIN 6
- cnt: 2
[ 1320.124280] [drm:drm_edid_block_valid [drm]] *ERROR* EDID checksum is
invalid, remainder is 242
[ 1320.124284] Raw EDID:
[ 1320.124287]          00 ff ff ff ff ff ff 00 41 0c 00 00 01 01 01 01
[ 1320.124289]          08 17 01 03 80 40 24 78 0a f9 ab a2 55 4a 9a 25
[ 1320.124290]          0f 47 4a 21 08 00 81 80 07 ff ff ff ff ff ff ff
[ 1320.124293]          ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[ 1320.124294]          ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[ 1320.124296]          ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[ 1320.124298]          ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[ 1320.124299]          ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[ 1320.124454] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0050
w(1)
[ 1320.124455] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK on first message,
retry
[ 1320.124609] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0050
w(1)
[ 1320.124610] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent adapter
i915 gmbus dpc
[ 1320.124766] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0040
w(1)
[ 1320.124766] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK on first message,
retry
[ 1320.124943] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0040
w(1)
[ 1320.124947] [drm:intel_hpd_irq_event] [CONNECTOR:52:HDMI-A-2] status updated
from connected to disconnected
"

" fast enough unplug  4.8.11 debian
1448.425756] [drm:drm_mode_addfb2] [FB:53]
[ 1448.452749] [drm:intel_get_hpd_pins] hotplug event received, stat
0x00400000, dig 0x10101210, pins 0x00000040
[ 1448.452753] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on PIN 6
- cnt: 0
[ 1448.452761] [drm:i915_hotplug_work_func] running encoder hotplug functions
[ 1448.452765] [drm:i915_hotplug_work_func] Connector HDMI-A-2 (pin 6) received
hotplug event.
[ 1448.452767] [drm:intel_hdmi_detect] [CONNECTOR:52:HDMI-A-2]
[ 1448.458952] [drm:drm_mode_addfb2] [FB:56]
[ 1448.478020] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0040
w(1)
[ 1448.478022] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK on first message,
retry
[ 1448.478223] [drm:do_gmbus_xfer] GMBUS [i915 gmbus dpc] NAK for addr: 0040
w(1)
[ 1448.478229] [drm:drm_detect_monitor_audio] Monitor has basic audio support
"</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are on the CC list for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>