SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-11-12 18:42:28

BruceJohnJennerLawso
#! Member
Registered: 2014-02-23
Posts: 50

Graphics card seems to be forcing vsync on in #! [solved]

Okay,

So I am creating a game in SFML that requires reasonably high frame rate, but the version compiled on #! seems to have its frame rate locked in at 60 FPS, which upon further digging appears to be caused by vsync being forced on by the graphics card, and it cant be turned off by SFML calls. The windows version of this program on the same machine does not do this, which apparently makes the issue related to graphics settings in my #! install?

How exactly can I configure my graphics card settings in #! to set this vsync setting off?

Last edited by BruceJohnJennerLawso (2014-11-13 17:09:07)


The computer is mightier than the pen, the sword, and usually the programmer.

My Projects on Github

Offline

Help fund CrunchBang, donate to the project!

#2 2014-11-12 18:50:32

Head_on_a_Stick
#! Cat
From: A world of pure imagination
Registered: 2014-01-21
Posts: 2,782

Re: Graphics card seems to be forcing vsync on in #! [solved]

What card & drivers are you using?

lspci -knn|grep -iA3 vga

In #! I think the vsync is set by compton -- have you tried killing it?

Offline

#3 2014-11-12 19:43:50

twoion
Emerald Caffeine
From: 星界
Registered: 2012-05-11
Posts: 1,106

Re: Graphics card seems to be forcing vsync on in #! [solved]

If you use to FOSS radeon driver, it will by default enable vsync. See here on how to disable vsync.


あの日の魂は何処へ行ったのだろう

Offline

#4 2014-11-12 20:12:37

BruceJohnJennerLawso
#! Member
Registered: 2014-02-23
Posts: 50

Re: Graphics card seems to be forcing vsync on in #! [solved]

Head_on_a_Stick wrote:

What card & drivers are you using?

lspci -knn|grep -iA3 vga

In #! I think the vsync is set by compton -- have you tried killing it?

output for that was

bruce@bruce:~$ lspci -knn|grep -iA3 vga
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09)
	Subsystem: Lenovo Device [17aa:21ed]
	Kernel driver in use: i915
00:16.0 Communication controller [0780]: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 [8086:1c3a] (rev 04)

Ill check for compton. What exactly is it? (safe to kill?)

Last edited by BruceJohnJennerLawso (2014-11-12 20:13:55)


The computer is mightier than the pen, the sword, and usually the programmer.

My Projects on Github

Offline

#5 2014-11-12 20:15:58

Head_on_a_Stick
#! Cat
From: A world of pure imagination
Registered: 2014-01-21
Posts: 2,782

Re: Graphics card seems to be forcing vsync on in #! [solved]

BruceJohnJennerLawso wrote:

Ill check for compton. What exactly is it? (safe to kill?)

It's a compositor -- used to allow genuine transparency & suchlike.

I think it's called "cb-compositor" in the openbox autostart script if you want to remove it.

I use that driver & vsync is a nightmare in wheezy hmm

EDIT: if you want to keep using transpareny, check the flags used in the cb-compositor script -- I know from htop that one of them is a very basic vsync option.

Last edited by Head_on_a_Stick (2014-11-12 20:17:51)

Offline

#6 2014-11-13 10:32:13

ohnonot
...again
Registered: 2012-05-22
Posts: 1,748
Website

Re: Graphics card seems to be forcing vsync on in #! [solved]

disabling compton (cb-compositor) can take some load off your graphic card, but i don't it's causing your problem.

simply remove it from ~/.config/openbox/autostart.

Offline

#7 2014-11-13 15:43:50

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,282

Re: Graphics card seems to be forcing vsync on in #! [solved]

Ohnonot is correct; I'm pretty sure it is xserver-xorg-video-intel (specifically the i915 driver) that pins your video performance to the monitor refresh rate.  Don't know if there is a proprietary Intel driver or if there's a workaround to get a faster video frame rate.  (For what little it's worth, most users experience tearing if video isn't locked to the monitor's refresh rate.)

Offline

#8 2014-11-13 15:54:49

BruceJohnJennerLawso
#! Member
Registered: 2014-02-23
Posts: 50

Re: Graphics card seems to be forcing vsync on in #! [solved]

ohnonot wrote:

disabling compton (cb-compositor) can take some load off your graphic card, but i don't it's causing your problem.

simply remove it from ~/.config/openbox/autostart.

Killing compton did not solve the problem, running

cb-compositor --edit

gave me this contents of compton.conf

compton.conf wrote:

# Shadow
shadow = true;
no-dnd-shadow = true;
no-dock-shadow = true;
#clear-shadow = true;
#shadow-radius = 7;
#shadow-offset-x = -7;
#shadow-offset-y = -7;
shadow-opacity = 0.4;
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
shadow-exclude = [ "n:e:xfce4-notifyd" ];
#shadow-ignore-shaped = false;

# Opacity
menu-opacity = 0.9;
#inactive-opacity = 0.8;
#frame-opacity = 0.7;
inactive-opacity-override = false;
alpha-step = 0.06;

# Fading
fading = false;
# fade-delta = 30;
fade-in-step = 0.03;
fade-out-step = 0.03;
# no-fading-openclose = true;

# Other
mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
#refresh-rate = 0;
#vsync = "none";
dbe = false;
paint-on-overlay = false;
sw-opti = false;

# Window type settings
wintypes:
{
  tooltip = { fade = true; shadow = false; opacity = 0.85; };
};


The computer is mightier than the pen, the sword, and usually the programmer.

My Projects on Github

Offline

#9 2014-11-13 15:59:16

BruceJohnJennerLawso
#! Member
Registered: 2014-02-23
Posts: 50

Re: Graphics card seems to be forcing vsync on in #! [solved]

pvsage wrote:

Ohnonot is correct; I'm pretty sure it is xserver-xorg-video-intel (specifically the i915 driver) that pins your video performance to the monitor refresh rate.  Don't know if there is a proprietary Intel driver or if there's a workaround to get a faster video frame rate.  (For what little it's worth, most users experience tearing if video isn't locked to the monitor's refresh rate.)

Yaaa hmmm.

Problem is, Im developing this engine to be cross platform, and driver installation on Linux sounds like a lot of work to ask end users to do for just one application. Im suspecting that this might be better solved by multithreading the SFML window and the internal physics into separate threads so that the physics can run at a rate independent of the windows update.

Last edited by BruceJohnJennerLawso (2014-11-13 15:59:47)


The computer is mightier than the pen, the sword, and usually the programmer.

My Projects on Github

Offline

#10 2014-11-13 16:44:03

BruceJohnJennerLawso
#! Member
Registered: 2014-02-23
Posts: 50

Re: Graphics card seems to be forcing vsync on in #! [solved]

twoion wrote:

If you use to FOSS radeon driver, it will by default enable vsync. See here on how to disable vsync.

Ah, that worked, thankyou. No idea what the heck it does, but it does work.

Still hasnt fixed the problem with the engine sadly, but thats not a problem on this end, thanks for the help


The computer is mightier than the pen, the sword, and usually the programmer.

My Projects on Github

Offline

#11 2014-11-13 17:48:29

Head_on_a_Stick
#! Cat
From: A world of pure imagination
Registered: 2014-01-21
Posts: 2,782

Re: Graphics card seems to be forcing vsync on in #! [solved]

If you need to fiddle with your Intel card options, run:

driconf

2014_11_13_174718_1920x1080_scrot.jpg
The first tab ("Performance") has an option to disable vsync wink

Offline

#12 2014-11-14 23:18:05

ohnonot
...again
Registered: 2012-05-22
Posts: 1,748
Website

Re: Graphics card seems to be forcing vsync on in #! [solved]

BruceJohnJennerLawso wrote:

driver installation on Linux sounds like a lot of work to ask end users to do for just one application.

i think most linux users are used to it.
even those that use such unspeakables as zorin and ubuntu and mint.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo