<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - [HSW] X server hang when toggling fullscreen in media player"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=100162#c15">Comment # 15</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - [HSW] X server hang when toggling fullscreen in media player"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=100162">bug 100162</a>
              from <span class="vcard"><a class="email" href="mailto:thomas.lindroth@gmail.com" title="Thomas Lindroth <thomas.lindroth@gmail.com>"> <span class="fn">Thomas Lindroth</span></a>
</span></b>
        <pre>I was looking in /sys for something and accidentally discovered that reading
from /sys/kernel/debug/dri/0/i915_gem_pageflip can trigger the hang. The
following content in i915_gem_pageflip will result in a hang:

Flip queued on pipe A (plane A)
Flip queued on blitter ring at seqno a9e95, next seqno a9e97 [current
breadcrumb a9e96], completed? 1
Flip queued on frame 533858, (was ready on frame 0), now 533858
Stall check enabled, 1 prepares
Current scanout address 0x00b80000
New framebuffer address 0x02780000
MMIO update completed? 0
No flip due on pipe B (plane B)
Flip queued on pipe C (plane C)
Flip queued on blitter ring at seqno a9e96, next seqno a9e97 [current
breadcrumb a9e96], completed? 1
Flip queued on frame 533715, (was ready on frame 0), now 533715
Stall check enabled, 1 prepares
Current scanout address 0x00b8f000
New framebuffer address 0x0278f000
MMIO update completed? 0

but this content will not hang:

No flip due on pipe A (plane A)
No flip due on pipe B (plane B)
No flip due on pipe C (plane C)

So basically reading from i915_gem_pageflip when there is a pageflip queued can
cause the hang but like before the hang also happens when I'm not reading from
/sys

The hang is like before. I can move the mouse and use keyboard shortcuts but
the screen is frozen. If I try switching to framebuffer it will come up after
60 sec.

Using UXA instead of SNA or using modesetting will never hang.
i915_gem_pageflip will always read "No flip due on pipe ..." for those. If I
try to use a compositor like compton with modesetting there are still no hangs
even though i915_gem_pageflip shows pageflips.

I'm running kernel 4.4.110 now but I also tested 4.9.75 and it also hangs. The
hang in 4.9.75 is worse because I couldn't move the mouse or switch to
framebuffer. I had to sysrq reboot.

Since I now have a deterministic way of triggering the hang (or a similar hang)
it should be easier to test.</pre>
        </div>
      </p>


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

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