View Single Post
Old 02-28-07, 02:54 PM   #10
Registered User
Join Date: May 2006
Posts: 57
Default Re: LUT loading with TwinView bug in nvidia driver X API support

Now a question about LUT loading with randr 1.2. I have installed randr 1.2 along with xorg 7.2 and the latest nvidia drivers (1.0.9746). I wrote a small test program to see if the gamma stuff in randr 1.2 was working and to experiment with it if it was. My test code looks like this:

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/extensions/xf86vmode.h>
#include <X11/extensions/dpms.h>
#include <X11/extensions/Xinerama.h>

#include "X11/extensions/randr.h"
#include "X11/extensions/randrproto.h"
#include "X11/extensions/Xrandr.h"

#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

int main(int argc, char *argv[])
    int gsize;
    Display *thedisplay;
    char buffer[128];
    XRRCrtcGamma *G;
    RRCrtc crtc = 1;

    strcpy(buffer, ":0.0");

    if ((thedisplay = XOpenDisplay(buffer)) == NULL)
                printf(("failed to open display '%s'\n",buffer));
        G = XRRGetCrtcGamma (thedisplay, crtc);
When I execute this I get:

X Error of failed request:  BadRequest (invalid request code or no such operation)
  Major opcode of failed request:  158 (RANDR)
  Minor opcode of failed request:  23 ()
  Serial number of failed request:  8
  Current serial number in output stream:  8
Is this because I am not calling XRRCrtcGetGamma correctly or is this because the current driver does not yet support this functionality?
hvengel is offline   Reply With Quote