Bug 12345 - X on Intel 965GM hangs on console switch if compositing is enabled
Summary: X on Intel 965GM hangs on console switch if compositing is enabled
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - Intel) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jesse Barnes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-02 06:04 UTC by Peter Gruber
Modified: 2010-02-18 23:06 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.28
Subsystem:
Regression: No
Bisected commit-id:


Attachments
kernel log with drm debug=0xffff (204.93 KB, text/plain)
2009-01-04 07:56 UTC, Peter Gruber
Details
patch to remember the vblank enable state between leavevt and entervt (1.62 KB, patch)
2009-01-04 08:36 UTC, Peter Gruber
Details | Diff

Description Peter Gruber 2009-01-02 06:04:18 UTC
Latest working kernel version: 2.6.27
Earliest failing kernel version: 2.6.28-rc1
Hardware Environment:
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 03)(prog-if 00 [VGA controller])
Software Environment: Xorg 1.5.3

Problem Description:
X freezes (no keyboard input/sometimes even mouse pointer freeze) on switching to X after switching to another console (either Alt-F* or chvt) if a compositing manager is running (kwin/compiz but not Xfwm/metacity with enabled compositing)
X cannot be killed except for SAK/kill -9

A gdb backtrace of the frozen X:
(gdb) bt
#0  0x00007f8256a113e7 in ioctl () from /lib/libc.so.6
#1  0x00007f82556065d3 in drmIoctl () from /usr/lib/libdrm.so.2
#2  0x00007f8255606c70 in drmWaitVBlank () from /usr/lib/libdrm.so.2
#3  0x00007f82446d869e in ?? () from /usr/lib/dri/i965_dri.so
#4  0x00007f82446d88b3 in driWaitForVBlank () from /usr/lib/dri/i965_dri.so
#5  0x00007f82446e2165 in intelSwapBuffers () from /usr/lib/dri/i965_dri.so
#6  0x00007f82446d9c1f in ?? () from /usr/lib/dri/i965_dri.so
#7  0x00007f8255e6005f in __glXDRIdrawableSwapBuffers (basePrivate=0x2a198b0)
    at ../../glx/glxdri.c:260
#8  0x00007f8255e54036 in __glXDisp_SwapBuffers (cl=0x2982488,
    pc=<value optimized out>) at ../../glx/glxcmds.c:1442
#9  0x00007f8255e572d2 in __glXDispatch (client=0x296dca0)
    at ../../glx/glxext.c:512
#10 0x000000000044c2d4 in Dispatch () at ../../dix/dispatch.c:454
#11 0x0000000000432bcd in main (argc=9, argv=0x7fff60be6888,
    envp=<value optimized out>) at ../../dix/main.c:441

I can "unfreeze" X by attaching/detaching gdb. (in -rc6 also switching on/off of the hardware wlan killswitch a few times (6-10) would unfreeze X [each on/off enabled some drawing ops])

The problem occures with any combination of libdrm 2.4.1/2.4.3 and xserver-xorg-intel 2.5.1/2.5.99.1. 

Same X, driver and drm works fine with 2.6.27.
Comment 1 Peter Gruber 2009-01-04 07:56:25 UTC
Created attachment 19641 [details]
kernel log with drm debug=0xffff

drm log of:
start compiz -> switch to console 1 -> switch back to console 7 (X console)
Comment 2 Peter Gruber 2009-01-04 08:36:27 UTC
Created attachment 19642 [details]
patch to remember the vblank enable state between leavevt and entervt

This patch remembers the vblank enable state for the two pipes between leavevt and entervt. 

This fixes the problem for me but I don't know if its "the right thing to do" since I have little idea how the drm stuff should work.
Comment 3 Gordon Jin 2009-01-04 23:03:01 UTC
This seems the same as http://bugs.freedesktop.org/show_bug.cgi?id=18879
Comment 4 Jesse Barnes 2009-01-05 10:16:43 UTC
Thanks Gordon, I was just going to point that out too.  Peter, can you try the patch in the referenced bug (http://bugs.freedesktop.org/show_bug.cgi?id=18879)?
Comment 5 Peter Gruber 2009-01-06 16:43:20 UTC
(In reply to comment #4)
> Thanks Gordon, I was just going to point that out too.  Peter, can you try
> the
> patch in the referenced bug
> (http://bugs.freedesktop.org/show_bug.cgi?id=18879)?

I have tried the patch: It fixes the VT switching bug but introduces another problem; I can't suspend-to-ram anymore (it simply does not suspend). Without any patch suspend-to-ram works (and resume only without compositing manager). With the patch from comment #2, supend and resume work.
Comment 6 Jesse Barnes 2010-02-18 23:06:47 UTC
This one should be fixed now.

Note You need to log in before you can comment on or make changes to this bug.