Bug 18192

Summary: [855GM] random crashes on shutdown/logout
Product: xorg Reporter: Sten Heinze <sten.heinze>
Component: Driver/intelAssignee: Jesse Barnes <jbarnes>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: 7.3 (2007.09)   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
diff working vs. non working shutdown none

Description Sten Heinze 2008-10-23 15:53:32 UTC
Created attachment 19834 [details]
diff working vs. non working shutdown

Hi,

As suggested by anholt on IRC, I am filing a bug report here. The original report is in the Debian bug tracking system at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=497116.

Since quite some time now I am experiencing random hangs on shutdown or logout from X, after which no input works anymore, no keystrokes, no mouse, no network. 

I tried to track down the problem, and it seems to be caused by the intel driver (the vesa driver works without those problems, but has no acceleration). After trying many things, bisecting by putting ErrorF() in the source code showed that it hangs in RestoreHWState() function. (I attach the end of a diff of a working shutdown vs. one where a hang occured.)

How should I proceed further? How can I help in finding the cause for my hangs? Which information do I need to provide?

The laptop is a Thinkpad X40 with an i855 graphics:
$ lspci |grep VGA
00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)

I am running Debian testing. Versions are
	xserver-xorg/testing uptodate 1:7.3+18
	xserver-xorg-core/testing uptodate 2:1.4.2-7
	xserver-xorg-video-intel/testing uptodate 2:2.3.2-2+lenny5.1 
(The 2:2.3.2-2+lenny5.1 is the +lenny5 package with my debug output.)

Thanks in advance,
Sten
Comment 1 Sten Heinze 2008-10-24 09:46:46 UTC
This part of the RestoreHWState() function seems to cause the hang. I am trying to find more detailed information.

      /* Restore mode config */
      OUTREG(HTOTAL_B, pI830->saveHTOTAL_B);
      OUTREG(HBLANK_B, pI830->saveHBLANK_B);
      OUTREG(HSYNC_B, pI830->saveHSYNC_B);
      OUTREG(VTOTAL_B, pI830->saveVTOTAL_B);
      OUTREG(VBLANK_B, pI830->saveVBLANK_B);
      OUTREG(VSYNC_B, pI830->saveVSYNC_B);
      OUTREG(BCLRPAT_B, pI830->saveBCLRPAT_B);
      OUTREG(DSPBSTRIDE, pI830->saveDSPBSTRIDE);
      OUTREG(DSPBSIZE, pI830->saveDSPBSIZE);
      OUTREG(DSPBPOS, pI830->saveDSPBPOS);
      OUTREG(PIPEBSRC, pI830->savePIPEBSRC);
      OUTREG(DSPBBASE, pI830->saveDSPBBASE);
      if (IS_I965G(pI830))
      {
	 OUTREG(DSPBSURF, pI830->saveDSPBSURF);
	 OUTREG(DSPBTILEOFF, pI830->saveDSPBTILEOFF);
      }

      OUTREG(PIPEBCONF, pI830->savePIPEBCONF);
Comment 2 Sten Heinze 2008-10-24 13:04:47 UTC
It seems that it hangs on this command (the last one in the previous posted block):

      OUTREG(PIPEBCONF, pI830->savePIPEBCONF);

How can I further verify that? Can I just comment it out? Any help is appreciated.
Comment 3 Sten Heinze 2008-10-25 17:18:19 UTC
Yesterday (10/25/2008) on IRC:
(15:15:13) anholt:   what was your system?
(15:15:41) shze:   thinkpad x40, i855, debian testing, what else do you need?
(15:16:19) anholt:   weird -- you should have a second pipe, and that should actually be the thing your LVDS is running on
(15:16:35) anholt:   oh, you've probably got the pipeaforce quirk
(15:16:47) anholt:   and that does bogus things with plls
(15:16:55) shze:   i think so, at least it was in the changelog
(15:18:15) shze:   but why does it hang randomly, and not always?
(15:18:36) shze:   and how can i solve that hanging?
(15:18:46) anholt:   can you try turning off the forcepipea quirk?
(15:18:51) anholt:   (assuming it's on)
(15:19:06) jbarnes:   anholt: I thought the pll thing was fixed in 2.5?
(15:19:15) shze:   hmm.. do you have a quick pointer where?
(15:19:28) anholt:   i830_quirks.c talking about your laptop?
(15:19:28) shze:   i am still using 2.3.2
(15:20:14) shze:   yes, it does
(15:21:32) shze:   should i comment my laptop out and try again?
(15:25:21) anholt:   that and update to the current code probably
(15:27:03) shze:   update to current==2.5?
(15:30:42) anholt:   yeah

I did comment out the pipeaforce quirk, and it is working without problems since. I will try to update to 2.5 as soon as possible.

Thanks!
Comment 4 Jesse Barnes 2008-12-18 13:25:32 UTC
Assuming this is fixed in 2.5.x where the PLL programming bug got corrected.  Please re-open if you find it's not.

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.