Bug 28998 - Breakage with VT switch + mode change + fullscreen OpenGL
Summary: Breakage with VT switch + mode change + fullscreen OpenGL
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Jesse Barnes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-09 19:19 UTC by Nick Bowler
Modified: 2017-07-24 23:07 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Nick Bowler 2010-07-09 19:19:08 UTC
Looks like I managed to break the driver again...

When running a fullscreen OpenGL app at a non-native resolution, performing a
VT switch to the console and back again (resulting in a mode change)
permanently breaks OpenGL apps on the X server, until the server is restarted.
In addition, the space occupied by the window remains black (though sometimes
it disappears after a while).

To reproduce on a 1680x1050 laptop display, use the patched glxgears from bug
28252 to add the -override option.  Then run glxgears -override -geometry
640x480 to open an opengl window in the top left corner.  Run xrandr -s 640x480
to make it fullscreen (which works now that bug 28365 is fixed).  Now, switch
to the console, causing a mode change back to 1680x1050.

Switch back to X and the screen will be black (it seems to occasionally not
fail, retry and it will eventually).  Run xrandr -s 0 to switch back to
1680x1050, and the black area will remain in the top left corner.  glxgears has
hung, and can be killed, but the black area remains.  Subsequent runs of
glxgears will hang immediately and no window will appear at all.  Restarting X
brings everything back to normal.

This is on a ThinkPad T500 laptop with a GM45.  Running latest git
linux/xserver/xf86-video-intel/mesa/libdrm.
Comment 1 Nick Bowler 2010-07-09 19:22:30 UTC
Whoops, I forgot to mention that there is nothing worth mentioning in kernel/xorg logs.
Comment 2 Jesse Barnes 2010-07-10 09:55:18 UTC
Hm I just fixed that bug I thought!  xserver master should have a Ignoreclient/attendclient fix for the VT switch bug, but if that doesn't fix it maybe something new cropped up.  I'll try to reproduce.
Comment 3 Jesse Barnes 2010-07-12 13:55:49 UTC
Hm, this works for me.  Can you confirm you're running a server with these changes:

commit fb239bafab1668ffea1d32920455f03905bdb50d
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Fri Jul 9 10:32:17 2010 -0700

    DRI2: re-allocate DRI2 drawable if pixmap serial changes

commit 663c2a942907d647251439d2cec8f611e99ea303
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Fri Jul 9 10:30:51 2010 -0700

    miModifyPixmapHeader: always update serialNumber

commit 28e33ae6f69f716ece5d68e63fc52557236c5f6e
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Wed Jun 30 07:59:04 2010 -0700

    OS support: fix writeable client vs IgnoreClient behavior
Comment 4 Nick Bowler 2010-07-12 14:11:58 UTC
(In reply to comment #3)
> Hm, this works for me.  Can you confirm you're running a server with these
> changes:

Yup.

> commit fb239bafab1668ffea1d32920455f03905bdb50d
>     DRI2: re-allocate DRI2 drawable if pixmap serial changes
> commit 663c2a942907d647251439d2cec8f611e99ea303
>     miModifyPixmapHeader: always update serialNumber

Definitely have these two, because bug 28365 is fixed on my machine (and they
show up in the git log).

> commit 28e33ae6f69f716ece5d68e63fc52557236c5f6e
>     OS support: fix writeable client vs IgnoreClient behavior

And I see this one in the git log as an ancestor of the above two.

I noticed that your commit IDs above don't match those in xorg/xserver.git,
however; I'm running commit 3209b09 ("DRI2: re-allocate DRI2 drawable if
pixmap serial changes").
Comment 5 Jesse Barnes 2010-07-12 14:22:01 UTC
On Mon, 12 Jul 2010 14:11:58 -0700 (PDT)
bugzilla-daemon@freedesktop.org wrote:

> https://bugs.freedesktop.org/show_bug.cgi?id=28998
> 
> --- Comment #4 from Nick Bowler <nbowler@draconx.ca> 2010-07-12 14:11:58 PDT ---
> (In reply to comment #3)
> > Hm, this works for me.  Can you confirm you're running a server with these
> > changes:
> 
> Yup.
> 
> > commit fb239bafab1668ffea1d32920455f03905bdb50d
> >     DRI2: re-allocate DRI2 drawable if pixmap serial changes
> > commit 663c2a942907d647251439d2cec8f611e99ea303
> >     miModifyPixmapHeader: always update serialNumber
> 
> Definitely have these two, because bug 28365 is fixed on my machine (and they
> show up in the git log).
> 
> > commit 28e33ae6f69f716ece5d68e63fc52557236c5f6e
> >     OS support: fix writeable client vs IgnoreClient behavior
> 
> And I see this one in the git log as an ancestor of the above two.
> 
> I noticed that your commit IDs above don't match those in xorg/xserver.git,
> however; I'm running commit 3209b09 ("DRI2: re-allocate DRI2 drawable if
> pixmap serial changes").

Oh they're from my private repo, so they'd have different commit ids.

Hm, I'll try your specific apps then, I was using openarena.
Comment 6 Jesse Barnes 2010-07-12 15:34:49 UTC
Does reverting 68a9ee8370e6f9b38218376ac92d5130a5b0ef1e help things for you?  On my side I wasn't seeing the AIGLX EnterVT get called after the second VT switch w/o the revert, which means ignore/attend weren't paired correctly and clients could hang.
Comment 8 Nick Bowler 2010-07-12 16:25:03 UTC
(In reply to comment #7)
> http://cgit.freedesktop.org/~keithp/xserver/commit/?h=by-keithp&id=e27d95f1ab4beaf7eea3d5ddb1001c22da3d0bda
> 
> Can you try the above?

This appears to resolve the issue.  (For what it's worth, the revert you asked
me to do also seems to fix this).  Thanks.
Comment 9 Jesse Barnes 2010-07-13 10:17:19 UTC
Commit landed.

commit d75e8146c414bfd512ba5dbd4a83acb334bbe19b
Author: Keith Packard <keithp@keithp.com>
Date:   Mon Jul 12 16:01:34 2010 -0700

    Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.