nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   XRRConfigCurrentRate() problem in 304.XX series (http://www.nvnews.net/vbulletin/showthread.php?t=187640)

earache 08-03-12 08:35 PM

XRRConfigCurrentRate() problem in 304.XX series
 
I find that in the 304 series drivers querying the refresh via XRRGetScreenInfo - XRRConfigCurrentRate always returns 50hz. Example code (working in 302 and earlier) attached.
the xrandr command line returns the correct result.

Code:

#include <stdio.h>
#include <X11/extensions/Xrandr.h>

int
main(void)
{
  int RefreshRate;
  XRRScreenConfiguration *CurrInfo;
  Display* m_Dpy;


  m_Dpy = XOpenDisplay(NULL);
  CurrInfo = XRRGetScreenInfo(m_Dpy, DefaultRootWindow(m_Dpy));
  RefreshRate = XRRConfigCurrentRate(CurrInfo);
  XRRFreeScreenConfigInfo(CurrInfo);

  fprintf(stdout, "RefreshRate: %d\n", RefreshRate);
}

xrandr command-line seems to work, yet above always returns 50Hz:
Quote:

media:~ $ DISPLAY=:0
media:~ $ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 8192 x 8192
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
800x600 60.3 +
1920x1080 60.0 50.0* 24.0 24.0
media:~ $ xrandr --output HDMI-0 --mode 0x1c9
media:~ $ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 8192 x 8192
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
800x600 60.3 +
1920x1080 60.0 50.0 24.0 24.0*
media:~ $ ./getrefresh
RefreshRate: 50
media:~ $ xrandr --output HDMI-0 --mode 0x1c6
media:~ $ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 8192 x 8192
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
800x600 60.3 +
1920x1080 60.0* 50.0 24.0 24.0
media:~ $ ./getrefresh
RefreshRate: 50

brebs 08-04-12 01:15 AM

Re: XRRConfigCurrentRate() problem in 304.XX series
 
Quote:

Originally Posted by earache (Post 2570756)
always returns 50hz

Probably DynamicTwinView.

earache 08-04-12 01:29 AM

Re: XRRConfigCurrentRate() problem in 304.XX series
 
Quote:

Originally Posted by brebs (Post 2570771)
Probably DynamicTwinView.

Response appreciated, but no. DynamicTwinView is disabled.
Same code on <= 302 series returns corect rate.


All times are GMT -5. The time now is 06:07 PM.

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