<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Fullscreen OpenGL programs (e.g. games) crash if focus lost then regained, something to do with automatic compositing suspension"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=80933">80933</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Fullscreen OpenGL programs (e.g. games) crash if focus lost then regained, something to do with automatic compositing suspension
          </td>
        </tr>

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

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nrfoconnor+freedesktop@gmail.com
          </td>
        </tr>

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

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

        <tr>
          <th>Version</th>
          <td>10.2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>See also: <a href="https://github.com/ValveSoftware/Dota-2/issues/886">https://github.com/ValveSoftware/Dota-2/issues/886</a>

Yes, the above link is specific to Dota 2, though I've found that I have the
exact same problem with all other *fullscreen* programs (including Flash and
Silverlight plugins running in Wine/Pipelight): namely, if the program loses
focus for whatever reason (something appears in front of it, I use my Alt-Tab
window switch hotkey, et cetera), then occasionally when I return to the
program in question, it crashes.

The problem seems to be related to compositing window managers and the feature
they have to automatically suspend compositing. Disabling compositing, as well
as disabling the automatic suspension feature, causes the problem to cease. And
due to the nature of the feature in question, running the game in "window mode"
also avoids the problem.

Having redirected both stderr and stdout to a log file in the case of
Civilization V, no error message seems to be present when the crash occurs.
Silverlight in Wine/Pipelight brings up a mockup of the Windows "Program has
encountered an error" dialog, so I suspect Linux native programs merely
segfault or something equally unhelpful in troubleshooting. :V

I believe this is a bug within Mesa, and not my drivers or window manager,
because the above link shows the problem occuring across multiple driver and WM
combinations (and my own tests have ruled out the possibility of it being a bug
in the specific program). With KDE/KWin, the workaround is painless - if you
disable the automatic suspension feature in the advanced tab of its "Desktop
Effects" page, the problem ceases and you can forget it was ever a problem to
begin with. I am unsure of the instructions for other window managers, but I
would imagine they have a similar checkbox stashed away somewhere, or you can
of course disable compositing entirely if you prefer.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>