Steam for Linux

Steam for Linux

Steam for Linux > Discussões gerais > Detalhes do tópico
blackout24 24/nov/2012 às 13:18
Issue Report: SS3 V Sync impacting performance below 60 FPS

I started this in the "General Discussion" so everyone can comment even if they simply bought SS3 but are not in the limited beta.

When V Sync is enable in any form (global or by application) my average framerate tends to drop to 30 FPS when I'm not clearly getting more than 60 FPS. These 30 FPS feel like 30 frames and are not only counted wrong. Screen tearing is also present when frames are reduced to a stable 30 FPS. How ever I can also get stable framerate between 30 and 60 FPS in certain scenes, which would mean that the game doesn't try to display either 30 or 60 to minimize screen tearing as one could assume.

Test Enviroment:

Linux: 3.6.7-ARCH (x86_64)
CPU: i7 2600K 4.2 Ghz
Driver: 310.19 1.13.0
lib32-pciutils installed
WM/Compositor: Gnome 3 / Mutter

SS3: Public Beta
1920x1200 Fullscreen
Performance: Ultra/Ultra/Ultra

How to reproduce:
Toggle V Sync either in nvidia-settings or the application settings and play the same scene twice. Activating both options doesn't change the behavior.

Without V Sync - Reference Video

With V Sync

Note: Since these videos are shot at 15 fps it might seem a bit laggy, when I move the camera fast. Doesn't represent the in-game feeling. Screen Tearing might also seem worse than it really was.

Notice the frame rate counter when I look towards the first road block and compare it to the scene without V Sync where I was getting 50-53 FPS now it is 30 FPS. Same with the last road block scene where I managed to get over 40 FPS in my first video.

If I look at the sky the behavior is as expected. V Sync limits it to 60 FPS where it would normally go to 90 FPS without it.

In the first scene where I look at the metal door my frames are 45 and they are very stable. It can stay there for as long as I want.

Additional Comments:
I tested KDE 4.10, Gnome 3.6.2, Cinnamon 3D and 2D, Openbox Session without Compositing, XFCE 4.10 with compositing enable and disabled for xfwm4 window manager. In KDE you have to go to KWin settings and also disable V Sync there to get higher frame rate. Every desktop enviroment showed the same behavior.

On Windows 7 64-Bit and Direct 3D it simply caps everything above 60 FPS but doesn't go to 30 when average framerate is lower (had to crank Ultra Settings up a little bit so it would average about 48 otherwise it would be 60 all the time). V Sync also works below 60 FPS.

I think the screen tearing below 60 FPS isn't really an SS3 issue but X.Org server is to blame. Let's hope Wayland with Weston does a better job at this which is one of its goal. "Every frame is rendered perfect."

Última edição por blackout24; 24/nov/2012 às 13:27
< >
Exibindo comentários 114 de 14
Michael 24/nov/2012 às 13:38 
Escrito originalmente por
When V Sync is enable in any form (global or by application) my average framerate tends to drop to 30 FPS when I'm not clearly getting more than 60 FPS. These 30 FPS feel like 30 frames and are not only counted wrong.

This is expected behaviour. If the game "misses" a sync signal because it's too slow, it will have to wait for the next one. Hence you get one frame per 2 vsync signals and the game runs at 30hz instead of 60hz.

When Rage appeared they had both Nvidia and AMD add a feature to their drivers that effectively says "vsync if you get above 60fps, but not if you can't"

I'm not sure what the card vendors called it, but it was something like 'smart vsync' - you'd have to ask Nvidia or ATI to add that feature to their linux drivers (if they haven't already) and then either get the game author to use it or force it on in the driver settings.

The other alternative is to use triple buffering (which is a feature Valve have used in L4D2 and Portal 2). That should allow you to get similar behaviour. It has the downside of adding an additional frame of latency that may feel as mouse or controller lag when you're playing the game.

The last alternative is to simply play a game on a computer that is powerful enough (or with settings turned down) so that you always get 60 fps :) Easier said than done I suppose and not everyone either wants to turn settings down or has the money to buy new hardware.

But, bear in mind, it's early days yet for this beta. I'd expect performance in these games to improve significantly so you may find before long it's not even an issue.
Última edição por Michael; 24/nov/2012 às 13:44
blackout24 24/nov/2012 às 14:15 
Then why can I get stable 45 FPS if the graphics load is just right, too? And why does it tear at 30 Hz, really just X.orgs fault?

What you mean is adaptive v sync I guess which was introduced with the new 600 series and 300 drivers.
Última edição por blackout24; 24/nov/2012 às 14:40
Bartol 24/nov/2012 às 14:37 
Because that's how Vsync works. If it can't keep a steady 60 FPS, it'll drop it to 30 FPS.

As for the tearing, It's probably all caused by Vsync. I'd try it with Vsync off and see how well it runs.
Michael 24/nov/2012 às 14:39 
Escrito originalmente por
Then why can I get stable 45 FPS (or anything between 30-60 if the graphics load is just right), too? And why doesn't that happen on Windows where I get avg. 48 FPS with V Sync and without tearing? This how I know v sync since I use it not just with my new card and some new drivers.

What you mean is adaptive v sync I guess which was introduced with the new 600 series.

Presumably because if a game is running with a variable frame rate, it might sometimes miss a vsync and sometimes not or it could be triple buffering or have some of its own logic.

Most likely the game is running at 30 fps for a small amount of time and then 60fps but the counter you have displayed is averaging across a longer time period.

But yes, I think what nvidia are calling adaptive vsync is their name for what JC wanted them to add for Rage.

I see your issue somewhat though, with some of these window managers using opengl and vsync and off screen buffers the situation may be more complicated - I think the beta release notes mention some setting to disable in Unity for example for this reason.
Última edição por Michael; 24/nov/2012 às 14:44
blackout24 24/nov/2012 às 14:49 
VSync seems to kick in at >40 and <50 which happens fast when I reduce the graphics quality. But in my second video at 1:05 it stays at 45 for 10 seconds which seems rather long.

Edit: I'm just at a spot where I have 44 FPS without v sync and zero fluctuation. I can leave it there for 20 seconds and open the menu where my framerate will be lower (about 33). When I leave the menu open for 20 seconds and go back to the game it goes back to 44 in about 2 seconds so the average seems to be short. When I switch V Sync on it goes down to 30 in that spot.

The windows driver really seems to handle this different.
Última edição por blackout24; 24/nov/2012 às 15:24
Letalis Sonus 24/nov/2012 às 16:17 
Escrito originalmente por
The windows driver really seems to handle this different.
Indeed - while this behaviour is really common on Linux (even in the other direction - 120 FPS anyone?) I have never experienced this on Windows. Probably someone thought gaming exnthusiasts may take this negatively.
AlenL 24/nov/2012 às 22:33 
I've reported this to our internal bug tracker just in case, but I'm not sure this is really a bug. I think you might be seeing something else. The FPS counter display is averaged over 1 second interval by default. If you are right at the border of 60fps, you can get alternating 30/60 and see average of 45 on display.

Try this:


which will disable the averaging. Also might want to try:


to see how fps changes over time (note that it shows the average FPS unless averaging is disabled as above)
blackout24 25/nov/2012 às 0:42 
Ok the FPSGraph without averaging made it clear. There are spots where it indeed flickers between the two so fast that the averages comes out as 40. If I look up and down at the ground the graph looks like a square wave so it changes from one to the other and stays there instantly like expected.

Now the wierd thing is that this morning my V Sync doesn't try to get either 30 or 60 but 25 or 50. o_O The setup is just the same as yesterday.

On Windows I can get an average of 42 with V Sync and without it being the average of 30 and 60 FPS because of rapid spikes up and down. So the linux driver seems to be missing something that the windows driver has.
Última edição por blackout24; 25/nov/2012 às 0:54
AlenL 25/nov/2012 às 0:45 
25/50 would mean your monitor is set to 50Hz (PAL). Looks strange for a modern LCD. It would be more like a CRT TV in Europe. :)
p1r8t3 25/nov/2012 às 0:51 
This post should be in the Limited beta section if its an Issue Report.
blackout24 25/nov/2012 às 0:59 
Escrito originalmente por AlenL:
25/50 would mean your monitor is set to 50Hz (PAL). Looks strange for a modern LCD. It would be more like a CRT TV in Europe. :)

Good point. My monitor has been behaving a bit strange since a couple of weeks. It turns blue after powered off after some minutes and the power button doesn't work so I will blame this on my monitor.

So I would say this is indeed not a bug, but rather just windows and linux drivers not having the same features. I thought they'd share more code but maybe Nvidia will implement this in the future.

Letalis Sonus 25/nov/2012 às 2:12 
Well, the Nvidia driver used to have some issue that resulted in always reporting 50Hz, no matter what was really being used. Possibly related?
blackout24 25/nov/2012 às 2:33 
Maybe but since my monitor has always had some problems it think it might be my monitors fault. I have to use a custom EDID which I patched manually by removing some extensions otherwise my display will be cropped.
And since a few weeks the power management of the monitor seems to be broken. I have to plug it in again otherwise I won't recieve a picture sometimes after my PC has been powered off for some hours.

I will ask Valve if they can pursuade Nvidia to bring adaptiv V Sync into the linux driver. Since you'll still have tearing below your native refresh rate at 30 FPS you'd be better off disableing it altogether if you're not having > 60 FPS 95% of the time which is very likely since the linux driver is still a bit slower. This should benefit every game.

EDIT: Just checked nvidia-settings it reports DFP-1 (monitor is connected via HDMI but with EDID fix it reports as DVI since I removed some extensions) to have a refresh rate of 59,6 Hz and I can set the resolution to 1920x1200 @ 60 Hz instead of having both on "Auto" still will cap it at 50 FPS. So this is either nvidia issue or my monitor but not SS3.
Última edição por blackout24; 25/nov/2012 às 2:42
blackout24 12/dez/2012 às 12:42 
Just for everyone who might end up reading this thread. This seems to be fixed soon. There is adaptive VSync but SS3 would need an option do enable it if I understand it correctly but Nvidia wants to implement an "application override" setting in the control panel.
Última edição por blackout24; 12/dez/2012 às 12:54
< >
Exibindo comentários 114 de 14
Por página: 15 30 50

Steam for Linux > Discussões gerais > Detalhes do tópico
Publicado em: 24/nov/2012 às 13:18
Mensagens: 14