February 9, 2018 at 2:53 am #13570
I have Monkey2 running on Ubuntu 17.10
The only issue I’m seeing is that all of the bananas run so fast that it’s not even usable. The spacechimp banana reports a near 4000 FPS. Pretty much every single example runs crazy fast like this.
Is there a way to force vsync?
This is on a Lenovo thinkpad P70 laptopFebruary 9, 2018 at 11:43 am #13573
Look at Window::SwapInterval property.
Try to set it to 1.February 9, 2018 at 4:59 pm #13575
thanks for the reply
The spacechimps example already has SwapInterval set to 1, and everything still runs ungoverned. Maybe I’ll do a bug reportFebruary 9, 2018 at 6:13 pm #13578
What HZ does your screen update at?February 9, 2018 at 6:37 pm #13581
xrandr reports everything should be around 60hz, so I’m not sure why this is happeningMonkey12345678910111213141516171819202122232425262728293031323334353637viavacavi@viavacavi-ThinkPad-P70:~$ xrandrScreen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384DP-0 disconnected (normal left inverted right x axis y axis)DP-1 disconnected (normal left inverted right x axis y axis)DP-2 disconnected (normal left inverted right x axis y axis)DP-3 disconnected (normal left inverted right x axis y axis)DP-4 disconnected (normal left inverted right x axis y axis)DP-5 disconnected (normal left inverted right x axis y axis)eDP-1-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm1920x1080 60.00*+ 59.931680x1050 59.95 59.881600x1024 60.171400x1050 59.981280x1024 60.021440x900 59.891280x960 60.001360x768 59.80 59.961152x864 60.001024x768 60.04 60.00960x720 60.00928x696 60.05896x672 60.01960x600 60.00960x540 59.99800x600 60.00 60.32 56.25840x525 60.01 59.88800x512 60.17700x525 59.98640x512 60.02720x450 59.89640x480 60.00 59.94680x384 59.80 59.96576x432 60.06512x384 60.00400x300 60.32 56.34320x240 60.05February 12, 2018 at 12:57 pm #13617
As far as I can work out, the problem is that vsync support is purely down to the graphics driver, and not all drivers support it. On my cheap and cheerful linux+ATI setup, SwapInterval=1 works fine – which I find mildly surprising because I’m sure I didn’t used to work…
I think this may be because I was running the prorietary ATI ‘fglrx’ (?) driver in the past, but have recently switched to the official ‘open source’ one, which seems to work really well these days. You might want to try this if possible, but if SwapInterval=1 doesn’t work all you can really do is use a timer instead – see spacechimps for a timer demo.
Can anyone shed any more light on this? SwapInterval=1 ultimately results in a single call to glxSwapIntervalEXT, so I’m not sure what else I can do to make it work.February 12, 2018 at 2:59 pm #13618
I have a bunch of Ati cards and they all work with SwapInterval, so for me there’s no issue.
But isn’t there a way to get any error messages from things like glxSwapIntervalEXT?
Maybe something like GetLastError() in the Windows API.
Maybe that’s something Monkey2 needs btw, a global error/warning stack?
If an error or warning occurred somewhere it gets throw into a stack and the user can go through that if he wants.
…see spacechimps for a timer demo.
The spacechimps example already has SwapInterval set to 1, and everything still runs ungoverned
Even with a timer it runs too fast?
That’s even weirder…February 12, 2018 at 7:00 pm #13620
I’m on Nvidia with proprietary drivers, I could try the opensource one to see if there is a difference.
With a timer, everything does work properly, it’s the just vsync that doesn’t work.February 13, 2018 at 2:01 am #13622
Try setting env var __GL_SYNC_TO_VBLANK=1?February 14, 2018 at 11:42 pm #13642
I gave it a try Mark, no go. I tried setting it in the local shell and even through /etc/environment. I tried setting to both 0 and 1 with the same results. I’ll keep poking around and let you know if I find anything fruitful
You must be logged in to reply to this topic.