Bug 24026 - [G45] Vsync not working?
Summary: [G45] Vsync not working?
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Jesse Barnes
QA Contact:
Keywords: NEEDINFO
Depends on:
Reported: 2009-09-18 12:14 UTC by Sven Arvidsson
Modified: 2010-02-06 16:25 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Xorg log (35.52 KB, text/plain)
2009-10-05 10:52 UTC, Sven Arvidsson
dmesg output (46.75 KB, text/plain)
2009-10-05 10:52 UTC, Sven Arvidsson
xrandr verbose output (4.97 KB, text/plain)
2009-10-05 10:54 UTC, Sven Arvidsson

Description Sven Arvidsson 2009-09-18 12:14:09 UTC
Is vsync/vblank supposed to be working now? I often notice tearing in games, and it seems lack of vblank is the cause of this.

I tried all the different options for vblank_mode in ~/.drirc but as far as I can tell it has no effect. glxgears still reports around 800 fps and OpenArena (with the option r_swapInterval set to 1) is showing a framerate around 80-90.

System environment:
-- chipset: G45 / ICH10R
-- system architecture: 32-bit
-- Linux distribution: Debian unstable
-- Machine or mobo model: Asus P5Q-EM
-- Display connector: DVI
-- KMS: enabled
-- xf86-video-intel: efbcf29dd1a1ca058b7a2a93f0685102c06c9369
-- xserver:
-- mesa: 5ce72c559c027ea03513ed9c0038706733b0586e
-- drm: 67e4172394a88d4922fb8d9c7c3d96ce7e02c5a6
-- kernel: 2.6.31-rc9
Comment 1 Jesse Barnes 2009-10-05 10:37:30 UTC
Yeah, sync to vblank should be working fine for 3D applications.  There's a "swapbufferswait" option for the intel DDX driver that controls this behavior.

If you still see tearing with the latest bits can you attach your X log etc as requested by http://intellinuxgraphics.org/how_to_report_bug.html?
Comment 2 Sven Arvidsson 2009-10-05 10:52:14 UTC
Created attachment 30089 [details]
Xorg log
Comment 3 Sven Arvidsson 2009-10-05 10:52:31 UTC
Created attachment 30090 [details]
dmesg output
Comment 4 Sven Arvidsson 2009-10-05 10:54:05 UTC
Created attachment 30091 [details]
xrandr verbose output

Log files are attached. From Xorg.log it seems swapbuffers are enabled:
(**) intel(0): SwapBuffers wait enabled
Comment 5 Jesse Barnes 2009-11-20 13:04:20 UTC
Even with the swapbufferswait code you can still see high framerates (e.g. if the app paints several frames during one refresh).

Do you see actual tearing with recent kernel and 2D driver code?  Maybe you were seeing flicker due to display FIFO underruns instead?
Comment 6 Sven Arvidsson 2009-11-21 14:36:45 UTC
Yes, I'm using quite up to date version of both the 2D driver and the kernel, and the behaviour is the same.

I'm not really sure if it's FIFO underruns, or how I can tell the difference, but it does seem like tearing to me.

-- xf86-video-intel: 14109abf285866ad4cd99d0cd16b0954a0a73a62
-- xserver: 1.7.0
-- mesa: e8eec9385497053a4172deeff9c0ff2726a10f3b
-- drm: 83a35b68f45cebc70152e55ed3f99db485c9a7cd
-- kernel: 2.6.32-rc7 (debian) 
Comment 7 Jesse Barnes 2010-02-05 14:43:12 UTC
If this is still happening a video would help track it down.  Do you have a phone or camera that can capture a video of what you're seeing?
Comment 8 Sven Arvidsson 2010-02-06 14:24:56 UTC
Interesting, the tearing does indeed seem to be gone. I guess the bug can be closed :)

I'm still getting much higher framerates in games and glxgears than the refresh rate of the monitor, but maybe that's normal?
Comment 9 Jesse Barnes 2010-02-06 16:25:45 UTC
Yeah, that's normal.  They can often display several frames before the vertical scanline intersects with the region they're drawing (sometimes even display multiple frames during a single vblank period), so the FPS will sometimes be higher.

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.