Bug 14591 - [G35] machine freeze after Xsession logout (terminateServer: true)
Summary: [G35] machine freeze after Xsession logout (terminateServer: true)
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: 7.3 (2007.09)
Hardware: Other All
: medium normal
Assignee: Wang Zhenyu
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 14784 15923 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-02-20 12:15 UTC by Stefan Dirsch
Modified: 2008-05-13 19:27 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log.freeze (42.98 KB, text/plain)
2008-02-26 03:51 UTC, Stefan Dirsch
no flags Details
Xorg.0.log.freeze.ModeDebug (98.81 KB, text/plain)
2008-02-26 03:54 UTC, Stefan Dirsch
no flags Details

Description Stefan Dirsch 2008-02-20 12:15:18 UTC
Some commit between d59eaa8b1e6eeb9775c9d21c7a5fd28f25b2bc3a and 293120bfc40a5b828567551954d8312639e73578 is the cause for a machine freeze doing a logout from a xdm/kdm/gdm Xsession, if

  DisplayManager._0.terminateServer:      true

is set in /etc/X11/xdm/xdm-config, i.e. a new Xserver is started after each
Xsession.

This happens on a G35 machine. See Bug #14552 for some more details about the hardware in use.
Comment 1 Wang Zhenyu 2008-02-22 01:19:17 UTC
Possible to git-bisect which commit caused your problem?
Comment 2 Stefan Dirsch 2008-02-22 01:33:40 UTC
Maybe next week. Looks like you can't reproduce it, right?
Comment 3 Wang Zhenyu 2008-02-24 17:43:25 UTC
yeah, we have no G35 machine for reproduce. Better to try if current master fixed your problem.
Comment 4 Stefan Dirsch 2008-02-25 01:12:34 UTC
Intel has no G35 machine, so driver development is done without hardware? You must be kidding.
Comment 5 Stefan Dirsch 2008-02-25 08:17:29 UTC
And the "winner" is:

commit 4a42b01f5ee5a673716d6959dfe0e693b037eb48
Author: Keith Packard <keithp@keithp.com>
Date:   Sat Feb 16 18:16:12 2008 -0800

    Decode DSPCLK_GATE, dump PIPE*STAT, MI_MODE, MI_DISPLAY_POWER_DOWN, MI_ARB_STATE, MI_RDRET_STATE, ECOSKPD


Current master (66cdccb021a4748b2af41e415c36ed58ca808df6) didn't resolve the issue.
Comment 6 Wang Zhenyu 2008-02-25 19:54:52 UTC
Have you turned on "ModeDebug"? Could you paste your X log?
Comment 7 Stefan Dirsch 2008-02-26 03:43:50 UTC
ModeDebug was not turned on. I'll attach logfiles with ModeDebug on and off. The freeze happens with both variants.
Comment 8 Stefan Dirsch 2008-02-26 03:51:41 UTC
Created attachment 14579 [details]
Xorg.0.log.freeze
Comment 9 Stefan Dirsch 2008-02-26 03:54:02 UTC
Created attachment 14580 [details]
Xorg.0.log.freeze.ModeDebug
Comment 10 Jesse Barnes 2008-02-26 10:57:16 UTC
Stefan, are you sure you bisected correctly?  The commit you pointed at should only have had an effect if you had modedebug enabled, and more than that, it just reads some extra registers, so it shouldn't have any side effects anyway.
Comment 11 Stefan Dirsch 2008-02-26 12:10:44 UTC
Jesse, yes, I double checked this since I couldn't believe it first either. 
i830CompareRegsToSnapshot() and i830TakeRegSnapshot(), which access i830_snapshot[] (altered by the commit) are also called when ModeDebug is not turned on.

But I was told today, that I am testing on a pre-production system (with DVI+VGA onboard). So in case, you cannot reproduce this issue, I suggest to close the bugreport as INVALID and we can easily plug in an ATI PCIe card instead. :-)
Comment 12 Wang Zhenyu 2008-02-26 19:04:34 UTC
Stefan, in the end of #14559, you meant commit from my dmi quirk patch caused your problem as it's here. But now you bisect to keith's debug patch, i'm little confused which one is the real culprit.

Revert keith's debug patch resolves your problem? If yes, How about try to comment each line of below to find out which one causes hang?

+  DEFINEREG2(DSPCLK_GATE_D, i830_debug_dspclk_gate_d),
    ...
+  DEFINEREG2(PIPEASTAT, i830_debug_pipestat),
    ...
+  DEFINEREG2(PIPEBSTAT, i830_debug_pipestat),
    ...
+    DEFINEREG(MI_MODE),
+    DEFINEREG(MI_DISPLAY_POWER_DOWN),
+    DEFINEREG(MI_ARB_STATE),
+    DEFINEREG(MI_RDRET_STATE),
+    DEFINEREG(ECOSKPD),

We're received one G35, gordon will try to reproduce this one anyway.
Comment 13 Wang Zhenyu 2008-02-26 19:05:15 UTC
oh, that's #14552 as in your first report.
Comment 14 Stefan Dirsch 2008-02-26 19:21:59 UTC
(In reply to comment #12)
> Stefan, in the end of Bug #14552, you meant commit from my dmi quirk patch
> caused your problem as it's here. 

No, at this point I didn't bisect yet, which commit broke it. See also my first comment of this bugreport.

> But now you bisect to keith's debug patch, i'm little confused which one
> is the real culprit.

Keith's one.

> Revert keith's debug patch resolves your problem? If yes, How about try to
> comment each line of below to find out which one causes hang?
> 
> +  DEFINEREG2(DSPCLK_GATE_D, i830_debug_dspclk_gate_d),
>     ...
> +  DEFINEREG2(PIPEASTAT, i830_debug_pipestat),
>     ...
> +  DEFINEREG2(PIPEBSTAT, i830_debug_pipestat),
>     ...
> +    DEFINEREG(MI_MODE),
> +    DEFINEREG(MI_DISPLAY_POWER_DOWN),
> +    DEFINEREG(MI_ARB_STATE),
> +    DEFINEREG(MI_RDRET_STATE),
> +    DEFINEREG(ECOSKPD),

Will try this.

> We're received one G35, gordon will try to reproduce this one anyway.

Thanks!
Comment 15 Gordon Jin 2008-02-27 00:49:53 UTC
I can't reproduce this on the Asus G35 board.
Comment 16 Stefan Dirsch 2008-02-27 08:03:06 UTC
Ok. I finally found it. It's this line:

  DEFINEREG(MI_DISPLAY_POWER_DOWN),

If I comment it the machine no longer freezes.


Comment 17 Stefan Dirsch 2008-02-27 11:38:42 UTC
(In reply to comment #15)
> I can't reproduce this on the Asus G35 board.

You know that G35 (0x2982) is 965G compatible (at least the driver handles it so) and not G33CLASS compatible, right? Sure that your G35 has the Device ID 0x2982? Of course it would be possible that the MI_DISPLAY_POWER_DOWN register is still missing on my preproduction machine or located at a different position. :-(

Comment 18 Stefan Dirsch 2008-02-27 13:44:40 UTC
(In reply to comment #11)
> i830CompareRegsToSnapshot() and i830TakeRegSnapshot(), which access
> i830_snapshot[] (altered by the commit) are also called when ModeDebug is
> not turned on.

I'm wondering why this is done. Is there missing a 

  if (pI830->debug_modes) { ... } 

around these calls? 

I'm also wondering why it still works for the first Xserver startup.
Comment 19 Keith Packard 2008-02-27 15:19:59 UTC
Oh, yeah, some of those registers are Crestline only. I'll bet attempting to read them on G35 will cause failure...
Comment 20 Stefan Dirsch 2008-02-27 18:24:39 UTC
(In reply to comment #19)
> Oh, yeah, some of those registers are Crestline only. I'll bet attempting to
> read them on G35 will cause failure...
Right, in

  Intel 965 Express Chipset Family and Intel G35 Express Chipset Graphics
  Controller PRM --> 8.12.1 MI_DISPLAY_POWER_DOWN ...

this register is marked as "DevCL only". Looks like a found a driver bug and
it's not related to the pre-production system I'm testing on. :-)
Comment 21 Gordon Jin 2008-02-27 18:35:23 UTC
(In reply to comment #17)
> You know that G35 (0x2982) is 965G compatible (at least the driver handles it
> so) and not G33CLASS compatible, right? Sure that your G35 has the Device ID
> 0x2982? 
Right. My G35 is 0x2982 (rev 03).
Comment 22 Stefan Dirsch 2008-02-27 18:40:43 UTC
(In reply to comment #21)
> Right. My G35 is 0x2982 (rev 03).
Mine is "rev 1". But see also commenta #19/20. 

Comment 23 Wang Zhenyu 2008-02-28 21:39:57 UTC
I've commented out MI_DISPLAY_POWER_DOWN in master. Thanks.
Comment 24 Stefan Dirsch 2008-02-29 02:52:34 UTC
Thanks.
Comment 25 Stefan Dirsch 2008-03-05 13:38:58 UTC
*** Bug 14784 has been marked as a duplicate of this bug. ***
Comment 26 Gordon Jin 2008-05-13 19:27:09 UTC
*** Bug 15923 has been marked as a duplicate of this bug. ***


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.