Retroarch - crt switchres - Linux - Stuttering

Hi everybody :slight_smile:

I am facing stuttering issues when using crt switchres on Linux (kunbuntu to be precise) for my 15khz sony trinitron screen.

I have read the various topics around the forum dealing with switchres but most appear to deal with Windows.

Unless I am completely wrong my understanding is that crt switchres on linux can create the relevant resolution and refresh rate on the fly.

I also read that there is no need for any kind of Vsync.

Now, for some reason no matter what I do I cant get a smooth scrolling unless i use vsync.

If I select no vsync and if I do not throttle maximum speed to 1x max all games i try are running faster than the game normal speed (for instance street fighter zero 3 runs at 59.6 fps but my system will go to 80 fps for instance)

If i select 1x, speed is fine however scrollings and other screen movements will stutter.

The only way to get smooth scroling then is video vsync.

If I select this option sound will break up.

For some reason if i select sound sync alongside video sync sound becomes good however video will stutter once again.

Setting up the video refresh rate in the video setting after 2048 samples does not solve the issue.

As such could anyone with knowledge please guide/help me as I am not sure what the issue could be.

Thank you in advance :slight_smile:

The 2 things I would suggest to try are: audio sync without vsync, or ‘sync to exact content framerate’ or whatever it’s called ON.

Hello HunterK.

Thank you for your feedback. I am traveling this week but I will report when back. Having said that I remember trying both options at some point with no success. One question you may provide insight into is: Why would sync on sound take over video sync when both are activated ? What i understood from the various topics is that when both options are activated sound sync would act as a kind of extra step in the sync process in which vsync deals with picture but then sound sync will match the sound rate to the vsync timing. (Again I may be completely wrong there) However in my experience with this, it appears that when both options are turned on sound sync will take the lead and impose its timing over the vsync timing causing scrollings to stutter etc.

With regards to the synchonise to exact content framerate does it work for crt screens ?

Not sure. that’s why I suggested you try it :stuck_out_tongue:

For audio sync, sometimes it fights with vsync, sometimes not. I suspect it may have to do with the core’s timing vs the users’ monitor. That is, if a core runs slightly slower than the monitor’s refresh rate (which may be slightly off from what it reports to the OS), having audio sync on can cause it to stutter while having it off will let the game speed up to lock into the monitor’s refresh rate.

Ok :slight_smile:

I will try and revert when I am back.

Taking this a bit further, and maybe asking too much, would it be possible to code into retroarch the fact that sound sync cannot overtake the vsync ?

I am also wondering,

Crt switchres (on linux at least) creates the relevant resolution and framerate whenever a new game is loaded. Technicaly the crt screen should reproduce this resolution, frame rate etc as it is fed to it. What could then cause the mismatch as we are not in the scenario where we are trying to sync the game/core speed with lets say a static lcd screen matrix (1920×[email protected] for instance) ? In that case sound sync would be used to match the sound rate with the vsync. It feels as if while crtswitchres is switching properly something is still happening in between to cause the mismatch.

Sometimes it’s desirable. That is, with audio sync ON and vsync OFF, you get true-to-original game speed but with tearing. With vsync ON and audio sync OFF, you get incorrect game speed but with perfect video/scrolling. With both on, you get true timing (or close to it, depending on what the core outputs) without tearing at the cost of occasional stuttering.

So I tried all options but still not good.

If i try sync on sound the frame rate is off and i stutter (for instance snes 9x running a snes game will not run at 60.1 fps but will stray closer to 61.something and fbalpha will have some kind of opposite effect for instance fbalpha running neo geo wont be 59.1 but rather 55.something)

If i try exact frame rate i am completely off with massive stutter.

If i then add vsync and sound sync i am smooth for some time then it starts stutering.

Rtype title screen is a good example of this issue as the logo is supposed to smoothly move from right to left and not matter what i try i will either stutter from the start or it will be smooth then start to stutter after some tine.

For some reason i believe that the resolution switch is not properly done.

As if the system was switching to a different frame rate thus creating this mismatch between the timing used by the system vs the actual game.

Would anyone know if something should be checked from a linux perspective to check if nothing is getting in the way ?

This is linked to the Linux kernel if you want stutter free emulation on Linux with CRT SwitchRes you will need to downgrade to kernel 4.12.

These is a script that automates this on my MME4CRT OS. When I get the chance I will grab the files needed and the script out of the ISO.

-Ben

oh man, that’s a drag! Do you know what change broke it?

Hi Ben.

Thank you for the feedback. Your videos on youtube motivated me to try the linux/switchres combination. Thank you for your work.

I saw your aticles about MME4CRT. I am on my phone now and i will need to check later but is there a ready to use iso that can be downloaded so that I could try it ?

Alternatively is there an easy way to downgrade to the relevant kernel ?

Thanks again to both of you to take the time to help.

I am sure I am not the only one facing this situation.

1 Like

I actually got the version wrong it needs to be 4.1.28 of below. It is to do with how the kernel handles vsync. It effects mostly interlaced resolution(running half speed) but you do still get stutter with progressive as well.

1 Like

Yes, You can try my ISO.

https://1drv.ms/u/s!ApulxOT4oHmwgsU39aVXR2VX8NX86w?e=QvghIs

you’ll need a normal monitor for the setup, Then after you have run the MME4CRT scripts you can change over to your 15khz TV.

1 Like

Thanks.

I will try and report :slight_smile:

Hi Ben,

Another question i you don’t mind. I use kubuntu and it appears there is an option to disable vsync under compositing. Would that help to prevent the stuttering issue or does switchres actualy need vsync to perform properly ?

It’s worth a try! Not sure if it will help.

You’ll need some form of sync method turned on though otherwise your content will run unthrottled.

So i ran some quick test and removing vsync and desktop compositing at linux level solved the issues (at least so far) So when i now select vsync, audio sync and run at exact frame rate nothing breaks. The rtype logo for instance is silky smooth. Thank you all for your support :slight_smile: I will try mme4crt to see how good this is as well.

3 Likes

Hmm. Its a shame this option is not in all Linux dristros. @hunterk have you seen this option else were?

Might need to find you what this option changes!