Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 03-15-07, 02:08 PM   #1
jesmith
Registered User
 
Join Date: Mar 2007
Posts: 64
Default VSync Question

We're porting our app to Linux and trying to get it to run well with a couple HD monitors. One monitor is 1366x768p@60Hz and the other is 1920x1080p@49Hz. I've followed various NVIDIA advice to create modelines for these monitors which exactly match the timings being used in Windows.

The xorg.conf and nvidia-bug-report.log are attached.

My application is using JOGL (Java/OpenGL). We ordinarily call gl.setSwapInterval(1) to limit our frame rate to monitor refresh, to avoid tearing. When I show a trivial scene in Windows, I get 60FPS. If I call gl.setSwapInterval(0) to allow gl to run as fast as it can I get 300-340 FPS.

Now running that same app in Linux on the same hardware, I'm getting 55FPS, regardless of whether I ask GL to wait for vsync or not. It consistently tears since 55!=60 (on the first monitor), and 55!=49 (on the second monitor).

I've tried export __GL_SYNC_TO_VBLANK=1 and =0, and it has no effect.

It seems that *something* is trying to sync to vblank, and that something is convinced that we're running at about 55Hz.

Any ideas?

-Joshua
Attached Files
File Type: zip nvidia-bug-report.zip (19.9 KB, 136 views)
File Type: zip xorg.zip (4.8 KB, 131 views)
jesmith is offline   Reply With Quote
Old 03-15-07, 02:34 PM   #2
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: VSync Question

You can only sync to one display device at a time. If you're using two, and they do not have the same mode, I'd expect there to be tearing on whichever isn't being sync'ed to.

However, according to your bug report, you're only using a single display device. Are you stating that if you export __GL_SYNC_TO_VBLANK=1 and run glxgears you're seeing a FTPS number significantly larger than 60?

Also, 1.0-9629 is no longer supported, please retest with 1.0-9755.
netllama is offline   Reply With Quote
Old 03-15-07, 03:24 PM   #3
jesmith
Registered User
 
Join Date: Mar 2007
Posts: 64
Default Re: VSync Question

Sorry if I wasn't clear. I'm only using one display device at a time. I'm just seeing the same problem with each monitor when I test them separately.

I just ran glxgears and it reports crazy high FPS numbers regardless of the setting of that environment variable. Note that this is inconsistent with my JOGL application, which is running at a steady 55FPS, regardless of the setting.

I'll look into updating my drivers, and try these tests again...

-Joshua
jesmith is offline   Reply With Quote
Old 03-15-07, 03:29 PM   #4
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: VSync Question

If updating the driver does not help, I'd like to see the output from 'env'.

Thanks,
Lonni
netllama is offline   Reply With Quote
Old 03-22-07, 01:49 PM   #5
jesmith
Registered User
 
Join Date: Mar 2007
Posts: 64
Default Re: VSync Question

OK, I'm finally running the latest drivers and the behavior I'm seeing is still weird. To keep things simple let's first figure out why glxgears is running at 18,000FPS despite the fact that I have __GL_SYNC_TO_VBLANK=1.

I've attached the new debug log, along with the output of env. Note that I'm doing export __GL_SYNC_TO_VBLANK=1 early in the boot process, before the NVIDIA drivers are even loaded.

So, using the latest drivers, what is the magic formula so that glxgears will report 60FPS on my 60Hz monitor?
Attached Files
File Type: zip jesmith.zip (24.6 KB, 139 views)
jesmith is offline   Reply With Quote
Old 03-22-07, 02:33 PM   #6
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: VSync Question

What happens if you run the following command (all in one line):
__GL_SYNC_TO_VBLANK=1 glxgears
netllama is offline   Reply With Quote
Old 03-22-07, 02:44 PM   #7
jesmith
Registered User
 
Join Date: Mar 2007
Posts: 64
Default Re: VSync Question

Script started on Thu Mar 22 14:26:54 2007
sh-3.1# __GL_SYNC_TO_VBLANK=1 glxgears
92349 frames in 5.0 seconds = 18465.003 FPS

sh-3.1# exit

Script done on Thu Mar 22 14:27:19 2007
jesmith is offline   Reply With Quote
Old 03-22-07, 02:59 PM   #8
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: VSync Question

On your system, is glxgears a binary or a shell script?
netllama is offline   Reply With Quote

Old 03-22-07, 03:09 PM   #9
jesmith
Registered User
 
Join Date: Mar 2007
Posts: 64
Default Re: VSync Question

Binary. file glxgears says:

ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped
jesmith is offline   Reply With Quote
Old 03-22-07, 03:11 PM   #10
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: VSync Question

You're running this locally, not over ssh or over an exported X display?

Beyond that, I'm not sure what else to suggest, as no one else is reporting this problem, and I cannot reproduce it here either.
netllama is offline   Reply With Quote
Old 03-22-07, 03:20 PM   #11
jesmith
Registered User
 
Join Date: Mar 2007
Posts: 64
Default Re: VSync Question

Yup, locally.

Since the whole point of this exercise is to create a bootable USB linux distro (I'm using SLAX as the starting point, which is Slackware 11 with an updated kernel and linux live scripts), I can snail mail you a USB key you can boot to see the issue.

-Joshua
jesmith is offline   Reply With Quote
Old 03-22-07, 03:22 PM   #12
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: VSync Question

Sure, I'll send you a PM with my shipping address.

thanks,
Lonni
netllama is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dragon Age Origins question Cylphid Gaming Central 3 05-30-12 07:15 PM
VSYNC issue? counterveil NVIDIA Linux 3 10-16-02 08:19 AM
1st post - XP Restore question Needa916 Microsoft Windows XP And Vista 2 09-12-02 05:24 PM
Newby question about nforce.... superconti NVIDIA Linux 2 09-07-02 11:46 PM
Dual boot question.. Tactics General Hardware 15 09-07-02 10:39 AM

All times are GMT -5. The time now is 08:28 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.