Comment 29 for bug 276943

Revision history for this message
Austin Chu (eefi) wrote : Re: Resume from suspend doesn't not work on the Mobile 4 Series chipsets

Okay... to follow up from before, here's the patch that adds a sync() call after the call to drmCtlInstHandler() in src/i830_dri.c:I830DRIInstIrqHandler(). If you put the sync() call before the call to drmCtlInstHandler(), resume will hang as before. Putting this sync() call after the call to drmCtlInstHandler() fixes the resume.

I have tested this on my ThinkPad X301 with GM45 graphics. I actually use plain Debian unstable myself, so I've built a package for Debian unstable at http://web.mit.edu/eefi/www/debian-thinkpad-x301/xserver-xorg-video-intel_2.4.2-2~saffroncity.2_amd64.deb based on the Debian experimental package plus the three patches needed for my laptop (details at http://web.mit.edu/eefi/www/debian-thinkpad-x301/ ).

This package may or may not work with Intrepid; I make no guarantees. If someone wants to build a package for intrepid, then do the usual aptitude build-dep xserver-xorg-video-intel ; apt-get source xserver-xorg-video-intel dance. This patch can be dropped into debian/patches and added to debian/patches/series.

For the actual X.Org developers, the fact that this patch works (sync() forces synchronization between the two CPUs, I believe, in order to ensure flushing of all buffered data to disk) along with the fact that for some people, turning all but one CPU off before suspending helps seems to indicate that what's needed is some kind of synchronization after installation of the DRI IRQ handler so that both CPUs pick that up in time. Note that during the resume process, I830DRIInstIrqHandler() is called from I830EnterVT() in src/i830_driver.c (line 3430 or thereabouts in my copy).