Gameplay stuttering while showing 60fps HELP!
#11
As I said - it has nothing to do with insufficent CPU/GPU power while vsync is turned off, this stutter is due to some problem with aero/vsync and double buffering, nothing besides turning on vsync via d3doverrider or in pcsx2 seems to solve it, BUT turning vsync on really drops my performance and thats major problem.

I have adaptive v sync option in nvidia control panel but it doesn't affect pcsx2 at all.

EDIT: Just read this post taken from similiar thread from pcsx2 forum, regarding stuttering in win7 aero and gsdx.

Ver Greeneyes WroteOhmykay, well what happens is actually pretty simple, but I'll give it some context.

During each screen refresh (VDraw), a monitor draws the data that's stored in a buffer. If this buffer is updated mid-VDraw, you can get tearing if the new data is significantly different because a part of the screen was refreshed using the old data and another part gets the new data. To avoid this, the buffer should only be updated when the monitor isn't drawing, i.e. in VBlank (during this time, old CRT monitors were moving the electron gun back up to the top, but LCDs maintain the same behavior).

But how do you detect a VBlank? Well, monitors send a VBlank interrupt when they stop drawing, but unfortunately no operating system I know of allows this to trickle down to user mode (where programs run) code - so instead of having it trigger your presenting code at precisely the right time, you have to poll for it. You can either do this in a tight loop, which the OS won't like because it has other stuff to do, or poll it every millisecond or so and hope for the best (VBlank only lasts 0.5ms) - or come up with some elaborate hybrid. Even Direct3D, as far as I know, internally does the latter, and that can make it miss VBlanks and Present slightly late. Maybe OpenGl, being tied into your display driver, can actually do a better job and use the interrupt instead (at least internally). But this has lead to a situation where many people don't trust Direct3D to catch VBlanks for them, and use an elaborate polling system instead.

Enter the compositor. The compositor sits on top of all these interfaces, has access to the VBlank interrupts and so can take all the Present requests of the various programs running on the system and send them at that right time, that is, during VBlank - and thus avoid the tearing. This works great, but it doesn't play too well with code that tries to detect VBlank on its own, for one simple reason: by the time this code detects a VBlank has started, the compositor may have already rounded up all the Present requests and done its thing because it has access to the interrupt.

And this is where the stuttering happens: the program tries to display a frame roughly every VBlank, and without a compositor this works fine. Maybe it skips a frame every now and then, or maybe it drops one, but this will happen infrequently if the frame rate is close to the refresh rate. But now you've got the compositor taking care of VSync, and every now and then you detect the VBlank too late (even with your tight polling, if the OS interrupts your thread) and you miss the composition event, so the screen doesn't get updated. Then the next frame, you already have a frame queued up for presenting and you add another one, so that the previous frame gets skipped altogether. Now instead of presenting a single frame 99% of the time, maybe you only present a frame 67% of the time, based on how well your polling does (the more inconsistent your polling, the more likely you are to miss composition - in the worst case, you'll only present half your frames!).

This is the stutter you see, because the difference between 60fps and 30fps is pretty obvious when they randomly alternate. The solution is to let the compositor handle presenting, and wait for it to return - in the case of Windows' DWM, this means calling FlushDWM() which blocks until composition has happened. The difference in your code is actually pretty small: instead of polling for VBlank and presenting when it happens, you Present right away and then call FlushDWM(), letting the compositor take care of it. Note that Direct3D may be internally tied into the compositor in Windows and can probably do a better job when the compositor is enabled than when it isn't - but the aforementioned solution works just as well.

TL;DR: there's a race condition between the polling code and composition, so some frames end up missing the composition band wagon and getting skipped, causing other frames to be displayed for twice as long.

Anyway, I hope that helped you to understand the problem.

Sponsored links

#12
I'm an avid pc gamer. I understand the intricacies as to why screen tearing happens ect. Thanks for the wall of text that only contains common knowledge. Besides that, you refuse to accept that 1. Not all games emulate well. Just bc a game is "playable" doesn't mean it works perfectly. 2. You basically have a budget pc so don't act like it can handle everything that's thrown at it. My pc runs every game I play 60FPS 100% of the time but I spent like 4 times as much. Overclock, upgrade or face facts take your pick.
#13
Like many people said before - pc gaming and emulation is different matter. If you still think that this stuttering problem occuring for me and many other users then tell me why it works SMOOTH witn enabled vsync, and not smooth witout it, while it is using lesser power?
Pcsx2 shouldn't need vsync to be enabled all the time just to make 60fps gameplay not choppy, like I said I actually CAN get full speed all time with vsync off (but then even while 60fps animation gets slightly choppy every few moments) OR enable this option but then I experience some real fps drops due to the more processing power used (pcsx2 hows 45-50fps, sound gets choppy, animation also - like standard fps drops in emulation).

Would like to ask devs about implementing this flushDWM and sholud I post this as bug report?
#14
This is quite interesting.... I guess there are not many users who have such problems.. So that I would say that this is a specific problem on your side (either pcsx2 configuration, all other software configuration (as OS), driver configuration or hardware).

1. I think you tried different versions. Are you sure that you had completely fresh installations of these versions? With a fresh install you get normally the configuration wizard in the beginning. If you have a completely fresh pcsx2 installation and you run the game - do you still observe the error?

Guessing that you can answer this with yes.

2. Have you played with/tweaked your operating system? Could it be that you changed some settings some time ago that can cause this? (For example you read somewhere that you can play dragon age easily if you just change a small regestry entry)

What happens if you disable all gpu driver utilities (nvidia control panel or somthing like this)? You can kill them using the taskmanager.

3. How about gpu drivers? Are they up2date? What happens if you use a different (maybe something much older) version? We know that there is some unrelated regression in newer nvidia drivers.

4. Let's hope that this is not hardware as the last poster in your link suggested:

(12-16-2014, 11:45 PM)belmont1990 Wrote: http://forums.pcsx2.net/Thread-60-fps-bu...-30?page=2

but if it is... do you have another pc that can run the games at full speed somewhere around?
#15
1. Yes, I have tried two other versions from automatedbuilds, fresh install with wizard at first start - same issue.
2. No, not at all, only tried different settings in nvidia control panel to eliminate my pcsx2 problem but it would change nothing.
3 I'm using newest gpu drivers from nvidia, didn't tried older ones but as some other people said on forum, they had this on older drivers as well, and even on radeon gpus.
4. Pc is nearly new, just over a month, freshly installed OS and everything, it works great in pc gaming, only have problems with pcsx2 so far.

I think that problem is related to combination of vsync built in aero and some pcsx2/gsdx code OR maybe I should have some never framework installed in my OS?
I wonder what devs would suggest in this issue.
#16
Forget vsync. There is absolutely no reason to use it in pcsx2. Have you tried running game in software mode? Does it do the same thing? If yes then you can eliminate gpu as the culprit. You've already said it's not the harddrive. Could it be the ram? Probably not. So you see how we're narrowing it down. .... try turning speed stepping off in the bios. Do you have a reason why you don't want to overclock?
#17
I was trying software mode for few minutes in some game but performance was awful, i even didn't looking is it stutter or not because of low fps all the time and also no upscaling which makes games unplayable for me (pc hooked up to 26' samsung tv, small room).

Would try this evening and see if stuttering occurs.

Another thing that may be crucial - one thing that I changed in bios from when I got this pc were ram mhz from 1333 to 1600 (pentium g3420 supports 1600 and my ram is 1x4gb ddr3 1600mhz) and that's it, no more tweaking at all. Could this be the culprit? Honestly I really don't think so.

What is this speed stepping option and where can I find it?
I don't want to overclock because of stock cooler, small mini ITX case (coolermaster elite 110) and mITX mobo (ASROCK H81M-ITX) also don't really into stuff like OC'ing and don't see reason at all because of 60fps in all tested games all the time without vsync enabled, only this annoying stuttering but this seems to be related to something in system/drivers/programs, not performance at all.
#18
(12-17-2014, 04:24 PM)belmont1990 Wrote: What is this speed stepping option and where can I find it?
In your bios
We're supposed to be working as a team, if we aren't helping and suggesting things to each other, we aren't working as a team.
- Refraction
#19
I just read about disabling this can result in lower overall performance of cpu and lead to some serious troubles.
Maybe updating a bios would help here? When I installed Win7 about month ago I also installed all drivers from manufacturer site but not updated BIOS at all.
BTW, I also installed some weird Intel usb 3.0 program because it was in drivers section xP maybe this is doing some issues?
#20
Well for starters update bios.... in software mode options enable extra threads.




Users browsing this thread: 1 Guest(s)