← Back to team overview

registry team mailing list archive

[Bug 544496] Re: [RS100] desktop became slow after upgrading to Lucid

 

Launchpad has imported 26 comments from the remote bug at
http://bugs.freedesktop.org/show_bug.cgi?id=28771.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2010-06-26T12:14:35+00:00 Sven Arvidsson wrote:

With kernel 2.6.35, there doesn't seem to be a way to turn off
vsync/vblank.

E.g. "vblank_mode=0 glxgears" has no effect.

This seems to be the same for both r300c and r300g.

System environment:
-- system architecture: 32-bit
-- Linux distribution: Debian unstable
-- GPU: RV570
-- Model: Asus EAX1950Pro 256MB
-- Display connector: DVI

-- xf86-video-ati: 801e83227a59a29eea425ea612083bbf2b536c30
-- xserver: 1.8.1.901
-- mesa: a5c44986a3f19936df448fe4ae47ca77ece9b0ce
-- drm: 6ea2bda5f5ec8f27359760ce580fdad3df0464df
-- kernel: 2.6.35-rc3

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/61

------------------------------------------------------------------------
On 2010-06-28T09:31:56+00:00 Jesse Barnes wrote:

You need both:

commit 234286c0f8b7d30ed49223c648d4c73c1a517ab3
Author: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
Date:   Thu Apr 22 12:47:41 2010 -0700

    DRI2: add config query extension

and

commit 45e2b51c853471b79004a954ce3092a253b20b77
Author: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
Date:   Thu Apr 22 12:49:03 2010 -0700

    DRI2/GLX: check for vblank_mode in DRI2 GLX code

for vblank_mode to work.  Does your Mesa build have those?

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/63

------------------------------------------------------------------------
On 2010-06-28T13:18:51+00:00 Sven Arvidsson wrote:

Yes, I'm using git master, so they're both there.

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/64

------------------------------------------------------------------------
On 2010-06-28T15:41:03+00:00 Jesse Barnes wrote:

Oh, for the DRI2 radeon driver you'll probably need to add an explicit
option somewhere; maybe the code path that used to check the vblank_mode
flags is no longer called.

See intel_screen.c:
...
DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_ALWAYS_SYNC)
...

there's probably a similar section in the radeon driver somewhere.  You'll also need to add support for the new DRI2 config extension to the driver, again see intel_screen.c's intelScreenExtensions array:
...
    &dri2ConfigQueryExtension.base,
...

Hope that helps.

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/65

------------------------------------------------------------------------
On 2010-07-15T11:55:31+00:00 agd5f wrote:

Should be fixed in:
0a7803cbaca13033d9ed31ef33f59efa913fbfce

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/66

------------------------------------------------------------------------
On 2010-07-15T12:28:10+00:00 Sven Arvidsson wrote:

Created an attachment (id=37084)
dri2 vblank for gallium

(In reply to comment #4)
> Should be fixed in:
> 0a7803cbaca13033d9ed31ef33f59efa913fbfce

Thanks, it works with the classic r300 driver now.

For the Gallium one I had to make the same change in the dri state
tracker. Not sure if it's the correct fix, but it works here.

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/67

------------------------------------------------------------------------
On 2010-07-15T13:18:07+00:00 Sven Arvidsson wrote:

Hmm, I still can't toggle vsync on/off inside games, it has no effect,
but maybe that's a separate bug?

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/68

------------------------------------------------------------------------
On 2010-07-16T05:03:29+00:00 Lists-andyfurniss wrote:

(In reply to comment #4)
> Should be fixed in:
> 0a7803cbaca13033d9ed31ef33f59efa913fbfce

For me using rv670 it doesn't work from .drirc eg.

<driconf>
    <device screen="0" driver="r600">
        <application name="all">
            <option name="force_s3tc_enable" value="false" />
            <option name="disable_s3tc" value="true" />
            <option name="vblank_mode" value="0"/>
        </application>
    </device>
</driconf>

It does work as an env so vblank_mode=0 ./gears works - but I still get
wait for vline sync which means that fullscreen games or gears maximised
gets capped to refresh.

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/69

------------------------------------------------------------------------
On 2010-07-16T06:30:13+00:00 Sven Arvidsson wrote:

I can confirm that setting vblank_mode=0 in drirc doesn't work here
either.

Can't reproduce the other problem though, window or fullscreen doesn't
make a difference.

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/70

------------------------------------------------------------------------
On 2010-07-16T06:37:58+00:00 Lists-andyfurniss wrote:

(In reply to comment #8)
> I can confirm that setting vblank_mode=0 in drirc doesn't work here either.
> 
> Can't reproduce the other problem though, window or fullscreen doesn't make a
> difference.

Maybe the wait for vline type vsync I get is r600 specific.

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/71

------------------------------------------------------------------------
On 2010-07-17T22:36:22+00:00 Toni Spets wrote:

(In reply to comment #9)
> (In reply to comment #8)
> > I can confirm that setting vblank_mode=0 in drirc doesn't work here either.
> > 
> > Can't reproduce the other problem though, window or fullscreen doesn't make a
> > difference.
> 
> Maybe the wait for vline type vsync I get is r600 specific.

I can also confirm .drirc gets ignored but env vblank_mode works.

To disable vsync completely you currently (and before) need a DDX hack
along with vblank_mode=0.

With this patch interestingly glxgears goes from ~1400 fps to ~2100 fps
and Quake 2 can run uncapped.

What is the real solution and why is this patch needed in DDX?

>From 311d4c299ed8de4f28d3fd637a7bde8176db245b Mon Sep 17 00:00:00 2001
From: Toni Spets <toni.spets@xxxxxx>
Date: Wed, 17 Feb 2010 17:37:49 +0200
Subject: [PATCH] Disable vsync

---
 src/radeon_dri2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index a0ed085..b74a18b 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -315,7 +315,7 @@ radeon_dri2_copy_region(DrawablePtr drawable,
     }   
 
     vsync = info->accel_state->vsync;
-    info->accel_state->vsync = TRUE;
+    info->accel_state->vsync = FALSE;
 
     (*gc->ops->CopyArea)(src_drawable, dst_drawable, gc, 
                          0, 0, drawable->width, drawable->height, 0, 0); 
-- 
1.7.1

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/72

------------------------------------------------------------------------
On 2010-07-18T01:10:40+00:00 agd5f wrote:

(In reply to comment #10)
> 
> What is the real solution and why is this patch needed in DDX?

The real solution to what?  The various GLX vsync/vblank extensions
basically just expose frame counters and vertical retrace events to
applications so they can use them for synchronization.  They have
nothing to do with tearing prevention directly.  The code in the ddx you
are asking about has nothing to do with the GLX vsync/vblank extensions;
it is there to prevent tearing on GL buffer swaps.  The variable should
probably have been called vline_wait rather than vsync.  What the code
does is forces the GPU to wait until the current scanline is past the
area that will be updated by the swap before doing the swap blit.  It's
the same method used by Xv to prevent tearing when rendering to the
front buffer.

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/73

------------------------------------------------------------------------
On 2010-07-18T03:35:09+00:00 Lists-andyfurniss wrote:

(In reply to comment #10)

> With this patch interestingly glxgears goes from ~1400 fps to ~2100 fps and
> Quake 2 can run uncapped.

Thanks for the patch. The gears difference is expected as the wait for
vline vsync still stalls GPU for the lines that the gears window covers.
Changing res would also give different fps as more/less of the screen
was outside the window.

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/74

------------------------------------------------------------------------
On 2010-07-18T03:50:27+00:00 Lists-andyfurniss wrote:

(In reply to comment #11)
> (In reply to comment #10)
> > 
> > What is the real solution and why is this patch needed in DDX?
> 
> The real solution to what?  The various GLX vsync/vblank extensions basically
> just expose frame counters and vertical retrace events to applications so they
> can use them for synchronization.

I guess what people want is a way to turn it off without patching, games
don't seem to be able to.

Personally I am not that bothered about tearing in FPS type games and my
old PC is often not able to render at refresh rate anyway - which means
without triple buffering vsync hurts my already low framerate.

> It's the same method used by Xv to prevent tearing when rendering
> to the front buffer.

Can GL have a switch like XV has - or should games in theory be able to
turn off, but are prevented by a bug?

Digression - I notice that XV with vsync on can't live with frame rate =
refresh rate, which I sometimes use for "proper" deinterlaced TV. GL
vsync is fine and GL wait vline is much better that XV. Is this a driver
issue or is it just that mplayers gl driver makes mplayer behave
differently to it's xv driver?

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/75

------------------------------------------------------------------------
On 2010-07-18T05:09:18+00:00 Toni Spets wrote:

(In reply to comment #13)
> (In reply to comment #11)
> > (In reply to comment #10)
> > > 
> > > What is the real solution and why is this patch needed in DDX?
> > 
> > The real solution to what?  The various GLX vsync/vblank extensions basically
> > just expose frame counters and vertical retrace events to applications so they
> > can use them for synchronization.
> 
> I guess what people want is a way to turn it off without patching, games don't
> seem to be able to.
> 
> Personally I am not that bothered about tearing in FPS type games and my old PC
> is often not able to render at refresh rate anyway - which means without triple
> buffering vsync hurts my already low framerate.
> 

Yes, this is exactly what I'm talking about.

Quake-style games have options like gl_swapinterval and
gl_ext_swapinterval but they do not seem to do anything. Honestly I
don't even know what they should do, but on other platforms they used to
disable vsync on some cards.

> > The code in the ddx you are asking about has nothing to
> > do with the GLX vsync/vblank extensions; it is there to prevent tearing on 
> > GL buffer swaps.

And it hurts performance not being able to turn it off without a patch.
I like tearing! ;-)

Btw. are we still on-topic on this bug when the actual fix for
vblank_mode was already committed?

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/76

------------------------------------------------------------------------
On 2010-07-18T06:14:06+00:00 Sven Arvidsson wrote:

(In reply to comment #14)
> 
> Btw. are we still on-topic on this bug when the actual fix for vblank_mode was
> already committed?

There's still three issues here:

1, The Gallium driver, not sure if the change I did is in the correct place?
2, drirc being ignored, perhaps this isn't specific to radeon?
3, Toggling vsync on/off from an application. Again, perhaps a separate issue?

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/77

------------------------------------------------------------------------
On 2010-07-18T06:22:26+00:00 Sven Arvidsson wrote:

(In reply to comment #15)
> There's still three issues here:
> 
> 1, The Gallium driver, not sure if the change I did is in the correct place?

Nevermind about this one, I should have remembered to do a git pull
before commenting here :)

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/78

------------------------------------------------------------------------
On 2010-07-19T10:29:31+00:00 agd5f wrote:

(In reply to comment #13)
> Can GL have a switch like XV has - or should games in theory be able to turn
> off, but are prevented by a bug?

I'm not sure how you'd expose it.  You could make it a driver option,
but then you'd have to restart X to change it.  There's no GLX extension
to cover tearing as far as I know.

> 
> Digression - I notice that XV with vsync on can't live with frame rate =
> refresh rate, which I sometimes use for "proper" deinterlaced TV. GL vsync is
> fine and GL wait vline is much better that XV. Is this a driver issue or is it
> just that mplayers gl driver makes mplayer behave differently to it's xv
> driver?

Xv in general does not provide any mechanism for application
synchronization.  I.e., here's no vblank events provided by Xv for app
synchronization.  That's what the GLX vsync extensions do.

The driver uses the vline wait for avoid tearing for both Xv and GL
buffer swaps, they have nothing to do with the GLX vsync extensions.
Those extensions only provide events that the application can use for
synchronization.  If you remove the vline wait code, you can still
synchronize your application to the refresh rate, but you might still
get tearing depending when the GL buffer swap happens.

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/79

------------------------------------------------------------------------
On 2010-07-27T23:00:11+00:00 Robert Hooker wrote:

(In reply to comment #7)
> (In reply to comment #4)
> > Should be fixed in:
> > 0a7803cbaca13033d9ed31ef33f59efa913fbfce
> 
> For me using rv670 it doesn't work from .drirc eg.
> 
> <driconf>
>     <device screen="0" driver="r600">
>         <application name="all">
>             <option name="force_s3tc_enable" value="false" />
>             <option name="disable_s3tc" value="true" />
>             <option name="vblank_mode" value="0"/>
>         </application>
>     </device>
> </driconf>
> 
> It does work as an env so vblank_mode=0 ./gears works - but I still get wait
> for vline sync which means that fullscreen games or gears maximised gets capped
> to refresh.

To use vblank_mode for dri2 in .drirc you need a seperate dri2 driver
with vblank_mode specified, driconf doesn't handle it right.

Using your example it'd be:

<driconf>
    <device screen="0" driver="dri2">
        <application name="Default">
            <option name="vblank_mode" value="0" />
        </application>
    </device>
   <device screen="0" driver="r600">
       <application name="all">
           <option name="force_s3tc_enable" value="false" />
           <option name="disable_s3tc" value="true" />
       </application>
   </device>
</driconf>

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/80

------------------------------------------------------------------------
On 2010-07-28T04:41:00+00:00 Lists-andyfurniss wrote:

(In reply to comment #18)

> To use vblank_mode for dri2 in .drirc you need a seperate dri2 driver with
> vblank_mode specified, driconf doesn't handle it right.
> 
> Using your example it'd be:
> 
> <driconf>
>     <device screen="0" driver="dri2">
>         <application name="Default">
>             <option name="vblank_mode" value="0" />
>         </application>
>     </device>
>    <device screen="0" driver="r600">
>        <application name="all">
>            <option name="force_s3tc_enable" value="false" />
>            <option name="disable_s3tc" value="true" />
>        </application>
>    </device>
> </driconf>

Thank you, that does the trick.

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/81

------------------------------------------------------------------------
On 2010-07-28T06:44:34+00:00 Sven Arvidsson wrote:

(In reply to comment #18)
> To use vblank_mode for dri2 in .drirc you need a seperate dri2 driver with
> vblank_mode specified, driconf doesn't handle it right.
> 

Great! Is there a bug open for driconf so this can be configured
correctly?

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/82

------------------------------------------------------------------------
On 2010-08-15T09:12:43+00:00 Hans Nieser wrote:

(In reply to comment #20)
> (In reply to comment #18)
> > To use vblank_mode for dri2 in .drirc you need a seperate dri2 driver with
> > vblank_mode specified, driconf doesn't handle it right.
> > 
> 
> Great! Is there a bug open for driconf so this can be configured correctly?

I believe I've run into the same problem with my RV770 (running
mesa/libdrm/xf86-video-ati, tried both classic and gallium) from git
master, where initially in every OpenGL app my framerate seemed to be
capped to my screen's refresh (by default - even without a .drirc).

After making this change in my .drirc, the framerate is not capped
anymore but it will still be swapping buffers during a retrace, and so I
still get multiples of 60Hz (my screens refresh rate). This means in
glxgears I get a ridicilous framerate like 2400, but in actual games
like ioquake3, I get a framerate that jumps wildly from 30 to 60 to
120Hz, which I find really awkward :/

Is there any way currently to just make it swap buffers without regard
for my screens vertical retrace? I realise that means I get a lot of
tearing but I'd rather have that than a frame rate jumping around like
that.

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/84

------------------------------------------------------------------------
On 2010-08-16T02:45:45+00:00 Lists-andyfurniss wrote:

(In reply to comment #21)

> Is there any way currently to just make it swap buffers without regard for my
> screens vertical retrace? I realise that means I get a lot of tearing but I'd
> rather have that than a frame rate jumping around like that.

For your chip you have to patch xf86-video-ati + disable as above. I'll
attach the patch which someone posted in another bug when I find it.

I think this is going to come up again and again, so I hope in the
absence of any way to change it on the fly, that it does get made into
an xorg.conf option as suggested in comment 17.

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/85

------------------------------------------------------------------------
On 2010-08-16T02:50:07+00:00 Lists-andyfurniss wrote:

Created an attachment (id=37895)
turn off wait for vline for r600+ ddx patch

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/86

------------------------------------------------------------------------
On 2010-08-18T13:22:16+00:00 Sven Arvidsson wrote:

I compared how Intel (i965) compares when it comes to DRI2 and vsync,
and as far as I can tell they have the same problems (needs a special
driver="dri2" stansa in drirc, toggling vsync inside a game doesn't
work).

This bug can proabably be closed as resolved for radeon, and bugs for
the shortcomings mentioned above filed against DRI2.

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/87

------------------------------------------------------------------------
On 2010-08-22T21:37:56+00:00 agd5f wrote:

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

Reply at: https://bugs.launchpad.net/xserver-xorg-driver-
ati/+bug/544496/comments/89


** Changed in: debian
       Status: Unknown => Confirmed

** Changed in: xserver-xorg-driver-ati
       Status: Unknown => Confirmed

** Changed in: debian
   Importance: Unknown => Medium

** Changed in: xserver-xorg-driver-ati
   Importance: Unknown => Medium

-- 
[RS100] desktop became slow after upgrading to Lucid
https://bugs.launchpad.net/bugs/544496
You received this bug notification because you are a member of Registry
Administrators, which is the registrant for Debian.