Support us on Patreon to keep GamingOnLinux alive. This ensures we have no timed articles and no paywalls. Just good, fresh content! Alternatively, you can donate through PayPal, Flattr, Liberapay or Buy us a Coffee. You can also buy games using our partner links for GOG and Humble Store.
FPS limiter
Page: «2/2
  Go to:
stan 12 Oct, 2016

Quoting: cue58I just finally found a tool to do this:
https://github.com/torkel104/libstrangle

While searching I also came across this thread so I just thought I'd let you know. Worked perfectly for me, except for the fact that I had to manually add -ldl to the end of the gcc commands when building the libraries.
Tested it with a few steam games using the "strangle FPS=60 %command%" in launch options
Thanks a lot! I’ll try it. I’ve found that the best setup to get smooth motion in games is to have the game limited to 60 FPS but with no vsync, and have Compton take care of the vsync to remove the tearing.

stan 27 Oct, 2016

libstrangle works perfectly with Mad Max and the nvidia driver on Gentoo :).

RTheren 6 Nov, 2016

Thanks stan.

Hopefully I will be able to play Captain Claw at normal speed :)

EDIT: Doesn't work on WINE :(

Hamish 30 Mar, 2017

So playing with libstrangle I am finding it to cause everything to segmentation fault except for glxgears and strangely enough DOSBox when it is set to display through OpenGL.

Most games get capped at my refresh rate with r600g anyway, but there are a few games in WINE that use Direct3D that do not seem to respect this, making it a pain that I can not seem to get this to work.

lpr1 2 Apr, 2017

Hamish,

I've recompiled wine and gallium nine patches 10+ times in last couple of days..., have similar problem, WINE with gallium nine does not respect display settings. I've tried some trick to limit FPS that may work for you. Use gallium nine of possible, if game have an option, enable vertical sync "in game" option and enable it, your FPS should be capped at 60FPS (even tho, V-SYNC is unlikely to work).

This is not a solution for me, since my refresh rate isn't 60Hz, so capping at 60FPS is useless..., I've tried changing X11DRV parameters in wine sources (dlls/winex11.drv/settings.c and dlls/winex11.drv/desktop.c) and in gallium nine patch itself, it simply do not want to move from 60FPS to given value, but still if youa re at 60Hz that should not be a problem to you. I've tried changing every (= 60) paramether in wine source, combinations of them etc. (under D3D, DirectX etc.) with no sucess. I'm quite lost at what should i try next to get wine at desired refresh rate via gallium nine...

SamUel-on-linux 2 Apr, 2017

libstrangle needs librt.so to work(some games don't load librt), you need to open makefile and add -lrt to LDFLAGS. It should look like this:
LDFLAGS=-Wl,-z,relro,-z,now -ldl -lrt
For me libstrangle works with wine games too after i did the above.

Hamish 2 Apr, 2017

Thanks for the suggestions guys, but the game I am trying to get to work does not have its own internal vsync setting and unfortunately adding librt to LDFLAGS has not solved my problems. I should also mention that in the case of WINE games those that use OpenGL do get capped correctly for me by r600g.

Playing with it some more though I have discovered that Trine 2, Shadowrun, and Ziggurat do work for me with libstrangle while things like ioquake3 and dhewm3 do not. If I could count my WINE games among that number I would be reasonably happy, but they always claim they can not set the video mode.

Hamish 2 Apr, 2017

SiN Gold through WINE and Daikatana native give segmentation faults. Hard West works. Unity3D seems to work with libstrangle while id Tech games do not. Shadow Warrior (2013) native and Painkiller Black Edition through WINE also give segmentation faults.

lpr1 3 Apr, 2017

Quoting: SamUel-on-linuxlibstrangle needs librt.so to work(some games don't load librt), you need to open makefile and add -lrt to LDFLAGS. It should look like this:
LDFLAGS=-Wl,-z,relro,-z,now -ldl -lrt
For me libstrangle works with wine games too after i did the above.

Unfortunatelly, for me, two wine games I play sometimes do not work even with this, thanks for the suggestion tho, might be bcs of OSS drivers (but i doubt). I have lib32-glibc installed ofc. Tried also without gallium nine, it crashes the game.



Quoting: HamishSiN Gold through WINE and Daikatana native give segmentation faults. Hard West works. Unity3D seems to work with libstrangle while id Tech games do not. Shadow Warrior (2013) native and Painkiller Black Edition through WINE also give segmentation faults.

I'm not sure, but i think Trine 2 (Linux version) can be limited from in game (at least to 30FPS), yeah, same problem, segmentation faults here on r600.
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00000000).
Backtrace is connected with "libc.so.6".

Hamish 3 Apr, 2017

Quoting: lpr1I'm not sure, but i think Trine 2 (Linux version) can be limited from in game (at least to 30FPS), yeah, same problem, segmentation faults here on r600.
Yeah, it can be, I was just testing libstrangle with anything I had installed. OpenGL games do not actually give me problems, only some Direct3D games through WINE.

While you're here, please consider supporting GamingOnLinux on:

Patreon, Liberapay or PayPal Donation.

We have no adverts, no paywalls, no timed exclusive articles. Just good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!

You need to Register and Login to comment, submit articles and more.


Or login with...