mupen64plus / mupen64plus-user-issues

Issue reports from users go here
http://www.mupen64plus.org/
17 stars 3 forks source link

[mupen64plus-video-all] sync to vblank (vertical refresh) must be disabled at startup #672

Closed illwieckz closed 8 years ago

illwieckz commented 8 years ago

Hi, I was experiencing problems with mupen64/mupen64plus since more than ten years until now:

It was strange to me since I remember playing with Project64 on Windows 13 years ago on an now very old Pentium 4 without all these issues. I'm running Linux since about 11 years that's why I'm using Mupen64/Mupen64plus. So, 11 years ago when I was experiencing frame drop or audio xruns, I was mistakenly thinking that Mupen64/Mupen64plus was not very optimized and I was mistakenly thinking that my computer was too slow.

Since 10 years I feel like if Mupen64plus is not yet able to run on modern computers. But there is something wrong in this feeling: I own now a very high-end and powerful CPU with a very high end and powerful GPU, probably hundred time better than that the very old Pentium 4 I owned in the past and I’m still experiencing frame drops and audio xruns, until now.

In fact, I experience the exact same issues (graphical glitches, frame drops, audio xruns etc.) on a AMD FX 9590 @4.7GHz from 2013 and on a Intel Pentium 3 @800MHz from 1999. No more, no less. Also, I experience frame drop and audio xrun while the mupen64plus process does not eat 20% of my CPU usage… That's wrong, that means the computer is powerful enough to render the game nicely, but something else prevents it.

And yes, I'm experiencing issues since more than ten years due to the stupid “sync to vblank” ! I'm playing with mupen64plus with frame drop and audio xrun since 10 years because of vblank sync ! When I do export vblank_mode=0 before running mupen64plus/m64py, I'm not experiencing any graphical glitches, not any frame drop and not any audio xruns anymore. I'm also able to use the very slow “Pure Interpreter” instead of the “Dynamic Recompiler” without any performance issue…

So, please disable sync to vblank at startup ! Modern distros enable sync to vblank by default so almost 99% of your GNU/Linux users are experiencing mysterious and annoying problems like frame drops and audio xruns since more than ten years because of that !

Also, it only comes to my mind now, that sync to vblank stuff is probably causing some problems because of that US (50Hz) / EU (60Hz) video games…

I've seen there is a built-in FPS capping mechanism in mupen64plus that works well if sync to vblank is disabled, this one must be kept, it must be used instead of system's sync to vblank. Since mupen64plus ships this built-in FPS capping mechanism and since it's used by default, please disable system's sync to vblank stuff at mupen64plus startup… People are getting mysterious frame drops and audio xruns without understanding why since more than ten years now… People just don't get a good gaming experience with mupen64plus since more than ten years because of that… Since mupen64plus is incompatible with system's sync to vblank, please disable it by default at startup…

People don't understand what is happening and think wrongly that your software is bad, and that's wrong…

richard42 commented 8 years ago

This is more of a system problem, which will affect all OpenGL applications. Especially on Linux, there are many different system configuration variables (video card, drivers, window manager, etc) which determine how vertical synchronization is handled, and there is no simple way for our application to always do the right thing. Some people may run their monitors at high frame rates like 120hz and want vsync enabled in order to avoid tearing. Most or all of our graphics plugins also have their own options to enable vertical sync, but again this can be overridden by other pieces of software like the window compositor or nvidia-settings. So I'm afraid there is no simple answer to this problem which does not also introduce different problems in other situations.