LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   running synchronized in vertical refresh - how to mange this? (http://www.linuxquestions.org/questions/slackware-14/running-synchronized-in-vertical-refresh-how-to-mange-this-4175469132/)

igadoter 07-10-2013 06:30 AM

running synchronized in vertical refresh - how to mange this?
 
I got such info from when I run glxgears. How to manage the vertical synchronization? I want to disable this cause I suspect when is enabled it slows down all graphics.

WhiteWolf1776 07-10-2013 07:30 AM

I'm going to guess you are using bumblebee... or something like this...

I correct that by running like this:
vblank_mode=0 primusrun glxgears;

If you aren't using primusrun, bumblebee, etc.. just leave that bit out.

Put up some more details if this doesn't help tho.

igadoter 07-11-2013 06:01 AM

I have great troubles with graphic. Say interaction with gnuplot is very slow, Diablo2 game is very slow (under wine) and probably there are other issues not yet recognized. It is terrrible cause these two applications are much slower than when running they on Slackware 12.2. I have Ati Radeon 9600 card.

WhiteWolf1776 07-11-2013 06:28 AM

have you installed the ati proprietary driver for your card? The open source one included with Slackware is getting better, but still no where near the performance you can get with the 'real' drivers.

This link may help:
http://docs.slackware.com/howtos:har...aphics_drivers

igadoter 07-12-2013 05:58 AM

Setting vblank_mode=0 speeds up the graphic but still it behaves very strange. Gears in glxgears window are rotating very slowly but still the program refers that there is 700 FPS (approx.) This happens when glxgears is a top window. When is sunked to bottom gears rotating very fast. I tried to install proprietary driver but I failed. My suspicion is that this combination - old graphic card and new Linux kernel won't work for proprietary driver.

Paulo2 07-12-2013 11:35 AM

I have an ATI Radeon 9600 too, and tried install proprietary drives many times,
from both ATI (old ones) and AMD.
Always failed. The configuration command did say that there wasn't ATI card installed :banghead:

In one of my searchs, I found some information saying that the old cards (maybe those
they consider "legacy") are not supported anymore by proprietary drivers :banghead:
So our cards are not "ATI/AMD" anymore :banghead:

We have to stick with the native driver. Which is good for me, I play dx8 games
like Quake3 very well and Google Earth works fine.


About the original subject, Vsync just drop the fps to the monitor frequency, if your system can play
Quake 3 at 100 fps, using Vsync will drop to 60 fps (seems to be a standard on lcd),
without loss of performance and without that sweeping horizontal line.
But I don't know how to enable or disable this, for example watching videos on VLC have that
sweeping horizontal line, this is Vsync disable in GUI for shure. I tried to enable it but without success.


Output of glxgears in my system, note that fps is always around 60Hz
Code:

Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
292 frames in 5.0 seconds = 58.313 FPS
297 frames in 5.0 seconds = 59.282 FPS
297 frames in 5.0 seconds = 59.283 FPS
297 frames in 5.0 seconds = 59.282 FPS


igadoter 07-15-2013 07:02 AM

Well setting vblank_mode=0 diables Vsync. Command like this
Code:


$ vblank_mode=0 glxgears

follows that Vsync is disabled and glxgears reports something like this
Code:

3500 frames in 5.0 seconds = 700 FPS
vblank_mode as I understand is an environement variable you can set vblank_mode=0 before running X server.

Paulo2 07-15-2013 04:57 PM

I did some search and learned that "tearing" is the right name for what I was calling "sweeping horizontal line". :D
Enabling Vsync causes tearing disappear, so Vsync is a good thing and I always leave it enabled in winXP.

According to this post http://www.linuxquestions.org/questi...em-4175434850/
and some others, it is a problem with Xfce.

I also found this page about free desktop configuration http://dri.freedesktop.org/wiki/Conf...nfrastructure/
The command "xdriinfo options <driver>" shows some good information, where <driver> you get from "xdriinfo" command
Code:

<option name="vblank_mode" type="enum" default="1" valid="0:3">
<description lang="en" text="Synchronization with vertical refresh (swap intervals)">
<enum value="0" text="Never synchronize with vertical refresh, ignore application's choice"/>
<enum value="1" text="Initial swap interval 0, obey application's choice"/>
<enum value="2" text="Initial swap interval 1, obey application's choice"/>
<enum value="3" text="Always synchronize with vertical refresh, application chooses the minimum swap interval"/>

I did create the file ~/.drirc as explained but it didn't solve the problem.


About glxgears, there is an option to run in a bigger window or even fullscreen,
you can get more realistic fps numbers with that option.
With 1152x864 in a window I get 140 fps, and at fullscreen 80 fps
Code:

paulo@paulo:~$ vblank_mode=0 glxgears -geometry 1152x864 -fullscreen
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
408 frames in 5.0 seconds = 81.344 FPS
387 frames in 5.0 seconds = 77.157 FPS
370 frames in 5.0 seconds = 73.763 FPS
384 frames in 5.0 seconds = 76.578 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
      after 1720 requests (1720 known processed) with 0 events remaining.
paulo@paulo:~$ vblank_mode=0 glxgears -geometry 1152x864
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
716 frames in 5.0 seconds = 142.949 FPS
721 frames in 5.0 seconds = 144.165 FPS
705 frames in 5.0 seconds = 140.991 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
      after 2371 requests (2371 known processed) with 0 events remaining.
paulo@paulo:~$

without "vblank_mode=0" I always get 60 fps, which is the monitor refresh frequency.
But "glxgears" is not a good 3D benchmark program, too much simple.


Do you have another 3d program installed, like Google Earth or any native 3d game?
If you have performance problems with other 3d programs, maybe you are running X with
wrong driver, for example if you did "xorgsetup".

igadoter 07-17-2013 06:45 AM

Quote:

Originally Posted by Paulo2 (Post 4990815)
Do you have another 3d program installed, like Google Earth or any native 3d game?
If you have performance problems with other 3d programs, maybe you are running X with
wrong driver, for example if you did "xorgsetup".

The only games I have are Diablo 2, Planescape: Torment and Widelands. The Torment is almost as fast as on Windows, Diablo 2 is extremely slow, Widelands are playable. Don't know what do you mean by doing "xorgsetup"? I created xorg.conf file but I noticed that it doesn't matter do I have xorg.conf or not.

WhiteWolf1776 07-17-2013 06:49 AM

I would give this a shot:

vblank_mode=0 diablo2

depending on how the code was written, etc... sometimes that sync just hoses things up. Just like running glxgears, you can run any specific app like that to turn off the frame / refresh sync.

igadoter 07-18-2013 06:28 AM

Quote:

Originally Posted by WhiteWolf1776 (Post 4991866)
I would give this a shot:

vblank_mode=0 diablo2

I did
Code:

vblank_mode=0 wine Diablo\ II.exe
it is a bit faster but there is still present strange behavior. Time to time game is frozing - I mean is going dramatically slow down - this mostly depends on the number of the creatures in game (monsters).

WhiteWolf1776 07-18-2013 06:37 AM

Hmmmm... starting to think this may be a wine kinda thing.

1. I see Diablo II went platinum, so is it running in a clean wine prefix? (i.e. not where you installed something else that may have tweaked the wine prefix?)

2. what version of wine / where did you get it.

3. if you run this in a console... does it generate any errors or warnings in the window.

4. are you running it full screen or windowed (from inside the game settings)

Hoping I can help, but either way, this info may get someone on here that runs wine a little more than I do.

Paulo2 07-18-2013 10:20 PM

Do you play Planescape: Torment with Wine too? And according to Google, Widelands has a Linux version.
I'm starting to think like WhiteWolf, if Planescape: Torment runs ok and Diablo doesn't,
the problem can be in Wine configuration for Diablo.

Some more ideas:
If you play at high resolution, let's say more than 1024x768, try with low resolution.
Maybe your hardware doesn't handle high resolutions. I play Quake3 (released +-13 years ago!!!) just at 1152x864,
with no shadows and no anti-aliasing. This is my hardware limit :banghead:

Try to boot Slackware without loading xorg.conf, I had to rename it to have a decent video performance.
Running xorgsetup and loading xorg.conf is a disaster for me.

ps- Well, you already did that :)
Code:

I created xorg.conf file but I noticed that it doesn't matter do I have xorg.conf or not.


ps2- excuse my bad english

igadoter 07-19-2013 06:35 AM

Quote:

Originally Posted by Paulo2 (Post 4992947)
ps2- excuse my bad english

Welcome in the club. :D

Paulo2 07-20-2013 10:23 PM

Quote:

Originally Posted by igadoter (Post 4993139)
Welcome in the club. :D

Thanks :D :redface: errors appear mainly in long posts...


All times are GMT -5. The time now is 07:52 AM.