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

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
mcjohnalds45
Prole
Posts: 18
Joined: Sat Jun 02, 2012 12:08 pm

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

Post 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
Last edited by mcjohnalds45 on Mon Apr 08, 2013 10:08 am, edited 1 time in total.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Love2d lags with any game on ubuntu

Post 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.
User avatar
mcjohnalds45
Prole
Posts: 18
Joined: Sat Jun 02, 2012 12:08 pm

Re: Love2d lags with any game on ubuntu

Post by mcjohnalds45 »

Yippy!!! Thanks, it's running super smooth now.
User avatar
Hexenhammer
Party member
Posts: 175
Joined: Sun Feb 17, 2013 8:19 am

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

Post 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
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post 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.
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post 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?
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

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

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests