Page 1 of 1

Love2d lags with any game on ubuntu [solved, thanks T-Bone!]

Posted: Sun Apr 07, 2013 11:44 pm
by mcjohnalds45
PROBLEM SOLVED, THANKS T-Bone

All love2d games make my whole system lag to the point where everything is unplayable. Total CPU usage jumps from 5-10% to 50-60% when love2d starts, even just with the piggy. I can run what should be much more cpu intensive games just fine.

System info, kind of outdated but not so much that love2d should lag:
4GB of memory
Intel Core2 CPU 6600 @ 2.40GHz × 2
ATI Radeon HD 4850
32bit Ubuntu 12.04
Lua 5.1

Re: Love2d lags with any game on ubuntu

Posted: Mon Apr 08, 2013 7:36 am
by T-Bone
On my Ubuntu setup, the exact thing happens but only if LÖVE is using vsync. Try disabling vsync for a game and see if that helps.

Re: Love2d lags with any game on ubuntu

Posted: Mon Apr 08, 2013 10:09 am
by mcjohnalds45
Yippy!!! Thanks, it's running super smooth now.

Re: Love2d lags with any game on ubuntu [solved, thanks T-Bo

Posted: Mon Apr 08, 2013 12:25 pm
by Hexenhammer
That's not a real solution though. vsync is the sane option and you won't be able to change it if you try to play closed-source LÖVE games (which should all have vsync set to true). In fact LÖVE seems to be mostly developed on Linux and thus one can assume LÖVE's vsync code is correct and similar code will be used by other games. I.e. the problem is your configuration and you should fix it to avoid more problems in future.

Could be anything, buggy graphic card driver, X server issue, some issue with whatever Ubuntu is currently piling on top of X... Don't really know because I use Windows

Re: Love2d lags with any game on ubuntu [solved, thanks T-Bo

Posted: Mon Apr 08, 2013 2:25 pm
by Robin
Hexenhammer wrote:you won't be able to change it if you try to play closed-source LÖVE games
Sure you can! In exactly the same way, too. Licensing doesn't have anything to do with vsync.

... oh, you meant "hidden source"? Well, then you'll have to jump through a few more hoops, but it's still possible.

Re: Love2d lags with any game on ubuntu [solved, thanks T-Bo

Posted: Mon Apr 08, 2013 3:19 pm
by bartbes
It sound like your graphics driver is completely messed up and doing a busy loop for vsync. Also known as the worst idea for a graphics driver ever. Maybe see if you can get a newer version of it?

Re: Love2d lags with any game on ubuntu [solved, thanks T-Bo

Posted: Tue Apr 09, 2013 7:51 pm
by T-Bone
I've had that issue on several Ubuntu installs. It's likely a driver issue, yes, but even some recent drivers have it.

I think maybe pygame suffers from the same thing, if I remember correctly. It was long since I last tried it.

I guess it would be sensible for a serious game to allow the player to choose if they want vsync or not, among other video options. That option is common in commercial games too.