[argyllcms] XRandR and nv/nvidia was: [Re: Re: ArgyllCMS Version 1.0.0 released]

  • From: Kai-Uwe Behrmann <ku.b@xxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Tue, 8 Jul 2008 13:33:17 +0200 (CEST)

I bring this to OpenICC list as XRandR and nvidia/nv drivers are not a 
ArgyllCMS specific toppic.

Am 08.07.08, 15:48 +1000 schrieb Graeme Gill:
> Alastair M. Robinson wrote:
> 
> > Just for the record, the same patch and environment variable is needed for
> > my machine - Ubuntu 8.04, x.org 1.4.0.90 and nVidia binary driver version
> > 169.12.
> 
> Well, it mystifies me why these drivers are claiming that they
> support the XRandR 1.2 extension, when they really don't !

nv/nvidia drivers dont supports XRandR and especially 1.2. 
I pinged already Aaron Plattner on the xorg list about nv and elsewhere 
about the nvidia driver.

In short the nvidia driver currently supports a different concept of 
accessing output devices, which predates XRandR. The difficulty is, 
this now non standard behaviour makes it harder for projects like 
ArgyllCMS, Oyranos and others.

The according bug report can be found here:
https://bugs.freedesktop.org/show_bug.cgi?id=16639

A small test application is attached. It shall show the gamma table size 
per output and crtc.


kind regards
Kai-Uwe Behrmann
-- 
developing for colour management 
www.behrmann.name + www.oyranos.org
/* cc -Wall -g XRandR.c -o XRandR -lX11 `pkg-config --libs xrandr` */
#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>
#include <stdio.h>

int
main(void)
{
  Display *display;
  int screen;
  Window root;
  
  int x, y, i, j;
  unsigned int width, height, border_width, depth;

  if( (display = XOpenDisplay(":0.0")) == 0 ) {
    fprintf( stderr, "Could not open X display\n" );
    return 1;
  }

  screen = DefaultScreen( display );

  XGetGeometry( display, RootWindow( display, screen ), &root,
                &x, &y, &width, &height, &border_width, &depth );

  fprintf( stdout, "root = %d x = %d y = %d width = %d height = %d "
                   "border_width = %d depth = %d\n", (int)root,
                x, y, width, height, border_width, depth );

  XRRScreenResources * res = XRRGetScreenResources(display, root);
  for(i = 0; i < res->noutput; ++i)
  {
    XRROutputInfo * output = XRRGetOutputInfo( display, res, res->outputs[i] );
    for ( j = 0; j < output->ncrtc; ++j)
    {
      XRRCrtcGamma * gamma = XRRGetCrtcGamma( display, output->crtcs[j] );

      fprintf( stdout, "output %d: crtc %d: gamma size: %d\n", i, j, 
gamma->size);

      XRRFreeGamma( gamma );
    }
    XRRFreeOutputInfo( output );
  }

  XRRFreeScreenResources(res); res = 0;

  return 0;
}

Other related posts:

  • » [argyllcms] XRandR and nv/nvidia was: [Re: Re: ArgyllCMS Version 1.0.0 released]