<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 - Hard lock when unplugging and reconnecting external USB-C DP display"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=103474">103474</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Hard lock when unplugging and reconnecting external USB-C DP display
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>17.2
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Drivers/DRI/i965
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>daniel.playfair.cal@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=135093" name="attach_135093" title="System log including disconnecting and reconnecting the display">attachment 135093</a> <a href="attachment.cgi?id=135093&action=edit" title="System log including disconnecting and reconnecting the display">[details]</a></span>
System log including disconnecting and reconnecting the display

Using the mesa intel driver, when I disconnect an external screen, all the
screens turn on and off repeatedly, and then when I reconnect it, I get a hard
system lock.

I have a laptop (Dell XPS 9560) with internal graphics (Kaby Lake) and also
NVIDIA discrete graphics, but this is not used in my setup. The laptop has an
HDMI output and a USB-C port, both connected to the intel graphics.

I'm running Arch linux
kernel 4.13.8
mesa 17.2.2
gnome-shell 3.26.1 with wayland
mutter 3.26.1 with patch from here:
<a href="https://bugzilla.gnome.org/show_bug.cgi?id=789501">https://bugzilla.gnome.org/show_bug.cgi?id=789501</a> (doesn't affect the hard lock
but prevents the shell from crashing on disconnect)

The HDMI port is connected to a external Viewsonic VX2433WM with HDMI
The USB-C port is connected to an adapter
(<a href="https://www.scorptec.com.au/product/Adapters/USB/63599-UCDP-ADP?gclid=CjwKCAjwj8bPBRBiEiwASlFLFWzBo5Yv8-dz5Adk7SaR0JHZYLOK0Vrc-7om229vKYUmqRsWUkOXVBoC_FEQAvD_BwE">https://www.scorptec.com.au/product/Adapters/USB/63599-UCDP-ADP?gclid=CjwKCAjwj8bPBRBiEiwASlFLFWzBo5Yv8-dz5Adk7SaR0JHZYLOK0Vrc-7om229vKYUmqRsWUkOXVBoC_FEQAvD_BwE</a>),
which is connected to a Dell U2515H with a displayport cable.

I have set the following options for the i915 kernel module:
i915 enable_psr=1 disable_power_well=0

Possibly notable entries in the log include:
Oct 27 08:26:56 danielpc-arch kernel: xhci_hcd 0000:3e:00.0: xHCI host
controller not responding, assume dead
Oct 27 08:26:56 danielpc-arch kernel: xhci_hcd 0000:3e:00.0: HC died; cleaning
up
Oct 27 08:26:56 danielpc-arch kernel: hub 3-0:1.0: activate --> -19
Oct 27 08:27:01 danielpc-arch kernel: [drm:intel_dp_start_link_train [i915]]
*ERROR* failed to enable link training
Oct 27 08:27:01 danielpc-arch kernel: pcieport 0000:00:1d.6: AER: Corrected
error received: id=00ee
Oct 27 08:27:01 danielpc-arch kernel: pcieport 0000:00:1d.6: PCIe Bus Error:
severity=Corrected, type=Physical Layer, id=00ee(Receiver ID)
Oct 27 08:27:01 danielpc-arch kernel: pcieport 0000:00:1d.6:   device
[8086:a11e] error status/mask=00000001/00002000
Oct 27 08:27:01 danielpc-arch kernel: pcieport 0000:00:1d.6:    [ 0] Receiver
Error         (First)
Oct 27 08:27:01 danielpc-arch kernel: [drm:intel_mst_pre_enable_dp [i915]]
*ERROR* failed to allocate vcpi
Oct 27 08:27:23 danielpc-arch kernel: i2c i2c-4: sendbytes: NAK bailout.
Oct 27 08:27:27 danielpc-arch kernel: i2c i2c-4: sendbytes: NAK bailout.
Oct 27 08:27:31 danielpc-arch kernel: i2c i2c-4: sendbytes: NAK bailout.
Oct 27 08:27:35 danielpc-arch kernel: i2c i2c-4: sendbytes: NAK bailout.
Oct 27 08:27:39 danielpc-arch kernel: i2c i2c-4: sendbytes: NAK bailout.
Oct 27 08:27:43 danielpc-arch kernel: i2c i2c-4: sendbytes: NAK bailout.
Oct 27 08:27:46 danielpc-arch kernel: i2c i2c-4: sendbytes: NAK bailout.
Oct 27 08:28:11 danielpc-arch kernel: [drm:intel_wait_ddi_buf_idle [i915]]
*ERROR* Timeout waiting for DDI BUF C idle bit
Oct 27 08:28:11 danielpc-arch kernel: [drm:intel_dp_set_idle_link_train [i915]]
*ERROR* Timed out waiting for DP idle patterns
Oct 27 08:28:11 danielpc-arch kernel: [drm:intel_wait_ddi_buf_idle [i915]]
*ERROR* Timeout waiting for DDI BUF C idle bit
Oct 27 08:28:12 danielpc-arch kernel: [drm:intel_dp_set_idle_link_train [i915]]
*ERROR* Timed out waiting for DP idle patterns
Oct 27 08:28:12 danielpc-arch kernel: [drm:intel_wait_ddi_buf_idle [i915]]
*ERROR* Timeout waiting for DDI BUF C idle bit
Oct 27 08:28:12 danielpc-arch kernel: [drm:intel_dp_set_idle_link_train [i915]]
*ERROR* Timed out waiting for DP idle patterns
Oct 27 08:28:39 danielpc-arch kernel: [drm:intel_cpu_fifo_underrun_irq_handler
[i915]] *ERROR* CPU pipe C FIFO underrun

--- gnome-shell crashes, hard lock occurs, gnome-shell coredump does not
complete in time ---</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 the QA Contact for the bug.</li>
      </ul>
    </body>
</html>