[i965] X freezes when TripleBuffer On after resume

Bug #331596 reported by Biji
14
Affects Status Importance Assigned to Milestone
xf86-video-intel
Fix Released
Wishlist
xserver-xorg-video-intel (Ubuntu)
Won't Fix
Wishlist
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-intel

1. set screen saver to 3D screen saver
2. add this to xorg.conf:

Option "PageFlip" "true"
Option "TripleBuffer" "true"

3. set Laptop to sleep, then resume again
4. system lock down (hang)

Revision history for this message
Geir Ove Myhr (gomyhr) wrote :

Which version of ubuntu are you using?

We would also need the following as separate attachments:
- the output of `lspci -vvnn`
- /var/log/Xorg.0.log
- /etc/X11/xorg.conf

Changed in xserver-xorg-video-intel:
status: New → Incomplete
Revision history for this message
Biji (biji) wrote :

intrepid ibex

00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile GM965/GL960 I
ntegrated Graphics Controller [8086:2a02] (rev 03)
        Subsystem: Lenovo Device [17aa:383e]
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 2299
        Region 0: Memory at f8000000 (64-bit, non-prefetchable) [size=1M]
        Region 2: Memory at d0000000 (64-bit, prefetchable) [size=256M]
        Region 4: I/O ports at 1800 [size=8]
        Capabilities: <access denied>
        Kernel modules: intelfb

00:02.1 Display controller [0380]: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller [8086:2a03] (rev 03)
        Subsystem: Lenovo Device [17aa:383e]
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Region 0: Memory at f8100000 (64-bit, non-prefetchable) [size=1M]
        Capabilities: <access denied>

Revision history for this message
Bryce Harrington (bryce) wrote :

We still need the Xorg.0.log and xorg.conf, thanks for the lspci data.

Changed in xserver-xorg-video-intel:
status: Incomplete → New
status: New → Incomplete
Revision history for this message
Biji (biji) wrote :
Revision history for this message
In , Sven Arvidsson (sa) wrote :

As of bug 19635, video tearing has been fixed but only in a non-composited environment. As using compositing is very usual, this is quite a big problem.

haihao commented in bug 19635:
 "Jesse has some commits to eliminate tearing when using composite manager, but
 he doesn't push them out now."

System environment:
-- chipset: G45 / ICH10R
-- system architecture: 32-bit
-- Linux distribution: Debian unstable
-- Machine or mobo model: Asus P5Q-EM
-- Display connector: DVI

-- xf86-video-intel: 4a0d19ef4f210cea9e60c5acc355df03723ef808
-- xserver: 1.5.99.901
-- mesa: 2305642b2e8edcebdc727f1181f7dbfcc78e8028
-- drm: 4a0d19ef4f210cea9e60c5acc355df03723ef808
-- kernel: drm-intel-next 126fd9c96d80260a1f2d8dfc72e444e572bcafb7

Revision history for this message
In , Gordon Jin (gordon-jin) wrote :

I'm not sure who is working on this? (CCing bunch of people)

Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

FWIW, at least compiz and xfwm4 can be configured to unredirect fullscreen windows.

Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

*** Bug 19458 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

Updated the summary and changed to an RFE. Last patch set went to dri-devel under the subject "Another page flipping update".

Basically, compositing managers need a way of making sure their front buffer rendering can occur w/o tearing. This includes composited video. This RFE covers an tear-free glXSwapBuffers implementation that any OpenGL application can use for this purpose. It's possible to do this in other ways, for example through an X extension or something, but that's a subject for another RFE if someone wants to take it on.

Revision history for this message
In , unggnu (unggnu) wrote :

Maybe it is stupid but why not enable vsync for the whole composite output? I mean who needs more than 60 fps anywhere? For benchmark reasons there could be an option which disables it which results in video tearing.

Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

I think a lot of compositing managers will choose that option (when they have updated frames to display of course). Right now though there's no good way for them to sync all output. They can block on a given pipe's vblank event, but that's racy, since the compositor process may not be woken up in time or may not finish its drawing in time to draw w/o tearing. So we really need glXSwapBuffers to be sync'd automatically, which allows the compositor (or other GL apps) to prepare a whole frame, swap buffers, and then continue rendering the next frame and not worry about tearing at all.

Revision history for this message
Carey Underwood (cwillu) wrote : Re: [i965] intel GM965/GL960 causes system hang when triple buffer On after resume

Biji, can you attach the contents of /etc/X11/xorg.conf

tags: added: gmax3100 hang
Bryce Harrington (bryce)
summary: - [i965] intel GM965/GL960 causes system hang when triple buffer On after
- resume
+ [i965] X freezes when triple buffer On after resume
summary: - [i965] X freezes when triple buffer On after resume
+ [i965] X freezes when TripleBuffer On after resume
Revision history for this message
Jesse Barnes (jbarnes-virtuousgeek) wrote :

FYI triplebuffer and page flipping options have been removed in later versions of the driver. The implementation was broken by design (I'm reworking it as part of fdo #20664).

Revision history for this message
Carey Underwood (cwillu) wrote :

Won't fix, triplebuffer & page flipping is known to be buggy, and has been ripped out of later versions.

http://bugzilla.freedesktop.org/show_bug.cgi?id=20664 is the request-for-enhancement to add it back in, which I believe is being worked on.

<jbarnes> fyi the old triplebuffer & page flipping implementations are horribly buggy
<jbarnes> and will likely cause corruption and/or hangs after awhile
<cwillu> so that's a won't fix then?
<jbarnes> yeah
<jbarnes> they've been removed in later versions
<jbarnes> (I'm working on adding them back in though)
<jbarnes> fdo bug 20664 is the rfe for adding it back in

Bryce Harrington (bryce)
Changed in xserver-xorg-video-intel (Ubuntu):
importance: Undecided → Wishlist
status: Incomplete → Triaged
Changed in xserver-xorg-video-intel:
status: Unknown → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote :

We have a PPA with some new tools for debugging X freezes:

  https://launchpad.net/~ubuntu-x-swat/+archive/x-freeze-test

I know how irritating X freezes can be. They're also typically
quite hard to debug, but the information provided by these new
tools should help upstream figure them out.

You can help by doing the following:

 A. Install the PPA packages on Jaunty and boot kernel 2.6.30-rc2
 B. Reproduce your freeze
 C. ssh into the machine and run the steps to collect the info
 D. Attach the tarball of the results to this bug report

With this information, we'll be able to forward your bug upstream.

(For more information on triaging X freeze bugs, see
 https://wiki.ubuntu.com/X/Troubleshooting/Freeze )

Changed in xserver-xorg-video-intel (Ubuntu):
status: Triaged → New
status: New → Incomplete
Bryce Harrington (bryce)
tags: added: freeze
removed: hang
Revision history for this message
In , unggnu (unggnu) wrote :

Are there any patches to test or a plan for integration. Is it likely that it make it into stable until October?

If so the next release will be really great for Composite.

Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

I just updated the patches to incorporate some feedback last week; I hope to have them integrated for this release.

Bryce Harrington (bryce)
tags: added: resume
Revision history for this message
Andres Mujica (andres.mujica) wrote :

As comment #8 this won't be fixed until triplebuffer appears upstream again.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → Won't Fix
Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

commit ec2fde7c8250fdc30984f16c8a1d3587d70b0144
Author: Jesse Barnes <email address hidden>
Date: Tue Jun 2 16:42:56 2009 +0100

    Sync DRI2 CopyRegion to vertical retrace

Changed in xserver-xorg-video-intel:
status: Confirmed → Fix Released
Revision history for this message
Łukasz Kuryło (lukasz-kurylo) wrote :

Update to
xserver-xorg-video-intel_2%3a2.7.99.1+git20090602.ec2fde7c-0ubuntu0sarvatt~jaunty_amd64.deb
from xedgers broke my X. After logging in screen freezes (I believe when Compiz gets enabled), mouse pointer still moves. I use kubuntu jaunty with compiz enabled and 2 monitors:
Screen 0: minimum 320 x 200, current 3600 x 1200, maximum 4096 x 4096
VGA connected 1920x1200+1680+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200 60.0*+
   1600x1200 60.0
   1680x1050 60.0
   1280x1024 76.0 75.0 72.0 60.0
   1440x900 75.0 59.9
   1152x864 75.0
   1024x768 75.0 70.1 60.0
   832x624 74.6
   800x600 72.2 75.0 60.3
   640x480 75.0 72.8 66.7 59.9
   720x400 70.1
LVDS connected 1680x1050+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1680x1050 60.1*+ 84.9 74.9 69.9 60.0
   1600x1024 60.2
   1400x1050 85.0 74.8 70.0 60.0
   1280x1024 85.0 75.0 60.0
   1440x900 59.9
   1280x960 85.0 60.0
   1360x768 59.8
   1152x864 100.0 85.1 85.0 75.0 75.0 70.0 60.0
   1024x768 85.0 75.0 70.1 60.0
   832x624 74.6
   800x600 85.1 72.2 75.0 60.3 56.2
   640x480 85.0 72.8 75.0 59.9
   720x400 85.0
   640x400 85.1
   640x350 85.1

Maybe this setup is the problem.

reverting to
xserver-xorg-video-intel_2%3a2.7.99.1+git20090601.704771f1-0ubuntu0sarvatt~jaunty_amd64.deb
works fine.

Revision history for this message
In , Łukasz Kuryło (lukasz-kurylo) wrote :

(In reply to comment #9)
> commit ec2fde7c8250fdc30984f16c8a1d3587d70b0144
> Author: Jesse Barnes <email address hidden>
> Date: Tue Jun 2 16:42:56 2009 +0100
>
> Sync DRI2 CopyRegion to vertical retrace
>

This commit caused screen to stop redrawing. I use two monitors, laptop screen and external one. Works ok if I disconnect external monitor but it it's connected screen freezes.

Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

(In reply to comment #10)
> (In reply to comment #9)
> > commit ec2fde7c8250fdc30984f16c8a1d3587d70b0144
> > Author: Jesse Barnes <email address hidden>
> > Date: Tue Jun 2 16:42:56 2009 +0100
> >
> > Sync DRI2 CopyRegion to vertical retrace
> >
>
> This commit caused screen to stop redrawing. I use two monitors, laptop screen
> and external one. Works ok if I disconnect external monitor but it it's
> connected screen freezes.

Did you pull the updates after this commit? Eric fixed a few issues with this patch in a later commit...

If things are still broken with master, please open a new bug.

Revision history for this message
In , Łukasz Kuryło (lukasz-kurylo) wrote :

(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > commit ec2fde7c8250fdc30984f16c8a1d3587d70b0144
> > > Author: Jesse Barnes <email address hidden>
> > > Date: Tue Jun 2 16:42:56 2009 +0100
> > >
> > > Sync DRI2 CopyRegion to vertical retrace
> > >
> >
> > This commit caused screen to stop redrawing. I use two monitors, laptop screen
> > and external one. Works ok if I disconnect external monitor but it it's
> > connected screen freezes.
>
> Did you pull the updates after this commit? Eric fixed a few issues with this
> patch in a later commit...
>
> If things are still broken with master, please open a new bug.
>

I used version updated up to commit
4698b3bd79452ae2066a3d195cf58dd5e30c93f3, so with those fixes.

Revision history for this message
In , Łukasz Kuryło (lukasz-kurylo) wrote :

I've found out what causes the problem. As I said before I have 2 monitors and I use them in extended desktop configuration:
xrandr --output VGA --right-of LVDS --auto.

The problem is that my LVDS is 1680x1050 and VGA is 1920x1200. So what I get after xrandr is virtual screen 3600x1200.

______________________
| | |
| S1 | S2 |
| | |
|_________| |
|XXXXXXXXX|___________|

if I instead did:

xrandr --output VGA --right-of LVDS --mode 1680x1050
_____________________
| | |
| S1 | S2 |
| | |
|_________|_________|

everything works fine.

So I believe the problem is when driver has to redraw area that is bigger then physical screen. Maybe then there is no MI_WAIT_FOR_PIPEB_SCAN_LINE_WINDOW for
region which includes XXXXXXXX part (is partially below the screen).

Revision history for this message
In , Łukasz Kuryło (lukasz-kurylo) wrote :

(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > commit ec2fde7c8250fdc30984f16c8a1d3587d70b0144
> > > Author: Jesse Barnes <email address hidden>
> > > Date: Tue Jun 2 16:42:56 2009 +0100
> > >
> > > Sync DRI2 CopyRegion to vertical retrace
> > >
> >
> > This commit caused screen to stop redrawing. I use two monitors, laptop screen
> > and external one. Works ok if I disconnect external monitor but it it's
> > connected screen freezes.
>
> Did you pull the updates after this commit? Eric fixed a few issues with this
> patch in a later commit...
>
> If things are still broken with master, please open a new bug.
>

Opened bug 22203.

Revision history for this message
In , unggnu (unggnu) wrote :

This is still an issue with -intel 2.8 and i915. It is much better than before but still tears often during tracking shots.
So atm I have to disable KMS to use Overlay again.

Revision history for this message
In , Łukasz Kuryło (lukasz-kurylo) wrote :

(In reply to comment #15)
> This is still an issue with -intel 2.8 and i915. It is much better than before
> but still tears often during tracking shots.
> So atm I have to disable KMS to use Overlay again.
>

Try using Option "SwapbuffersWait" "true" in xorg.conf

Revision history for this message
In , unggnu (unggnu) wrote :

Yeah, the option >>Option "SwapbuffersWait" "true"<< seems to fix the problem for me.

Many thanks!

Revision history for this message
In , unggnu (unggnu) wrote :

The option "SwapbuffersWait" prevents the tearing of long lines but there are still from time to time fractals like short rectangles slower than the rest which makes watching a movie still kind of annoying some times.
The main problem is that it isn't possible to use Overlay again with KMS.

Changed in xserver-xorg-video-intel:
importance: Unknown → Wishlist
Changed in xserver-xorg-video-intel:
importance: Wishlist → Unknown
Changed in xserver-xorg-video-intel:
importance: Unknown → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.