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

Newegg Daily Deals

Reply
 
Thread Tools
Old 08-18-06, 02:58 PM   #1
hvengel
Registered User
 
Join Date: May 2006
Posts: 57
Default LUT loading with TwinView bug in nvidia driver X API support

The latest version of ArgyllCMS (version 0.60) has a LUT loader (dispwin) that will work on Windows, Mac OS/X and on standard X windows installations with multi-monitor setups. But it appears that TwinView does not properly implement the needed X windows APIs for this to work. Here is what the author of ArgyllCMS has to say about this:

"TwinView and MergeFB both have the facility to emulate Xinerama to provide the hints needed
for applications to position windows intelligently, but both fail to implement the XFree86-VidModeExtension in a way that allows access to the Video LUTs of the underlying screens.

I will modify dispwin to avoid the X error that occurs when just scanning for the different screens, but I will simply be recommending that anyone who wants to have color calibrated displays on Linux/X11 not use TwinView or MergeFB."

Does anyone know if nvidia is going to fix this bug anytime soon? Or do I need to stop using TwinView and revert to native Xinerama? I consisder this to be a very serious bug. I hope that someone responds to this.
hvengel is offline   Reply With Quote
Old 08-18-06, 03:01 PM   #2
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: LUT loading with TwinView bug in nvidia driver X API support

This is the first that I've heard about this problem, and I've never used ArgyllCMS before.

Please provide details on how to reproduce the problem, along with an nvidia-bug-report.log.

Thanks,
Lonni
netllama is offline   Reply With Quote
Old 11-06-06, 04:31 PM   #3
hvengel
Registered User
 
Join Date: May 2006
Posts: 57
Default Re: LUT loading with TwinView bug in nvidia driver X API support

This is easy to reproduce.

1. Install ArgyllCMS 0.60 or later. There is an autotooled version on the ArgyllCMS web site located here http://www.argyllcms.com/downloadsrc.html . If you are a Gentoo user there is also an ebuild.

2. After installing ArgyllCMS on a TwinView machine run:

# dispwin -r

This program is the LUT loader that is part of ArgyllCMS and the -r parm will normally cause dispwin to generate a report of the displays on the system. In TwinView it will fail with the following messages:

X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 135 (XFree86-VidModeExtension)
Minor opcode of failed request: 4 (XF86VidModeGetMonitor)
Value in failed request: 0x135
Serial number of failed request: 12
Current serial number in output stream: 12

When I asked the author of ArgyllCMS about this his reply was:

"In any case, it seems that yes, TwinView and MergeFB both have the facility to emulate Xinerama to provide the hints needed for applications to position windows intelligently, but both fail to implement the XFree86-VidModeExtension in a way that allows access to the Video LUTs of the underlying screens.

I will modify dispwin to avoid the X error that occurs when just scanning for the different screens, but I will simply be
recommending that anyone who wants to have color calibrated displays on Linux/X11 not use TwinView or MergeFB."

I have attached a nvidia-bug-report.log file.
Attached Files
File Type: log nvidia-bug-report.log (117.7 KB, 207 views)
hvengel is offline   Reply With Quote
Old 11-06-06, 05:23 PM   #4
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: LUT loading with TwinView bug in nvidia driver X API support

hvengel,
The X VidMode extension doesn't know about the separate screens in TwinView/MergedFB configurations, and therefore can't configure them individually. Note that the driver emulates only the Xinerama extension; the VidMode extension still comes from the server. There was some discussion recently on the xorg mailing list about color calibration with xrandr 1.2, but I don't recall what the conclusion was. You might check the mailing list archives: http://lists.freedesktop.org/mailman/listinfo/xorg
AaronP is offline   Reply With Quote
Old 11-07-06, 04:31 PM   #5
hvengel
Registered User
 
Join Date: May 2006
Posts: 57
Default Re: LUT loading with TwinView bug in nvidia driver X API support

I just looked through the xorg thread about xrandr 1.2. It looks like the plan is to move xinerama and some XFree86-VidModeExtension functionality to xrandr. The author of ArgyllCMS was part of that thread and I have included some quotes from the xorg thread by him below. He is in fact the only reason that monitor calibration/profiling issues were even part of that xorg thread. There are three areas that need to be handled to correctly calibrate/profile monitors in color critical systems that were talked about in the thread.

1. The ability to correctly set the gamma curves (LUTs) for each device. It appears that at least based on that thread that xrandr 1.2 would not be getting the ability to make these settings.

" > Most of the utility of this extension is subsumed by RandR version 1.2,
> except for the gamma adjustments. If this features continue to be useful,
> either some relationship between the screen indices used in the
> XFree86-VidModeExtension and the screen/monitor pairs used int RandR or an
> incorporation of this functionality into RandR might be needed.

The latter is in fact essential if color calibration, and consequently high quality color profiling, is to be supported. To not support this disqualifies RandR/X11 systems from consideration for color quality critical work.

Might a way of incorporating the output LUT adjustment into RandR be a set of LUT read/write functions that identify the target by the CRTC ID ? [The CRTC being where I assume the underlying RAMDAC hardware is].

Graeme Gill."

2. The ability to use DCC/CI to automate monitor calibration functionality by allowing the calibration/profiling software to set various monitor settings (black point, contrast, white point, RGB gun gain ....) without user intervention beyond running the calibration software. This is currently poorly supported by all OSs. But Vista will have an API for this when it ships. All current FOSS monitor calibration/profiling software has the user do this setting by taking measurements with a color meter/spectrophotometer and telling the user to increase/decrease the contrast/brightness/Red gain...

3. Being able to specify a ICC profile for each display device and having support for reporting this information to any software using those devices that can use that information. If available this would be used by programs like GIMP, Krita and Scribus among others. And could be set by profiling software such as ArgyllCMS or LProf.

"Keith Packard wrote:
> Hmm. With all of the informative data about outputs that people want,
> how about I just add the ability to set properties on the output. Then
> we can build conventions about what that data looks like as we need it,
> without needing to rev the protocol, server or client libraries.

That would probably work nicely with adapting the current
convention for identifying the appropriate ICC profile for the display as well - simply set it as a property of each Output, rather (or as well as for backwards compatibility) the Screen.

<http://www.burtonini.com/computing/x-icc-profiles-spec-0.1.html>

Graeme Gill."

My question in this thread is about #1 and my reading of the xorg thread is that this is outside of the scope of xrandr 1.2. But may be in scope for later versions. In addition, it appears to me that like XFree86-VidModeExtension with xrandr 1.x (whatever x turns out to be when this is supported) the drivers would need to at the very least provide hooks for this to work correctly. After all wouldn't the driver need to be able to both report the current LUT settings to the x server as well as have a hook to write any new values to the LUT(s) that would be called by the x server or by monitor calibration software?

I guess I might need to ask a different question. How do I set the LUTs for each individual display when I have a TwinView machine since XFree86-VidModeExtension does not work? If I know how to do this I can modify dispwin to make it work but I would prefer to use a standard API such as XFree86-VidModeExtension or xrandr instead of using some low level driver specific calls since doing this makes for very messy and difficult to maintain code.
hvengel is offline   Reply With Quote
Old 11-07-06, 04:44 PM   #6
hvengel
Registered User
 
Join Date: May 2006
Posts: 57
Default Re: LUT loading with TwinView bug in nvidia driver X API support

Also from the xorg email list:

http://lists.freedesktop.org/archive...st/017514.html

Which is a posting from another user about the same problem but with the ATI drivers.
hvengel is offline   Reply With Quote
Old 11-07-06, 04:44 PM   #7
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: LUT loading with TwinView bug in nvidia driver X API support

RFE #265803 has been filed to add per-display-device color correction to the NV-CONTROL protocol, but the details of how that will interact with VidMode have yet to be worked out.
AaronP is offline   Reply With Quote
Old 11-07-06, 05:06 PM   #8
hvengel
Registered User
 
Join Date: May 2006
Posts: 57
Default Re: LUT loading with TwinView bug in nvidia driver X API support

After looking at the xorg email archives it looks like after the xrandr thread where monitor calibration was talked about ended that the xrandr author decided to add code for setting monitor gamma. Still the soonest this will be available is xorg 7.2. Will twinView support this when it becomes available?
hvengel is offline   Reply With Quote

Old 02-19-07, 02:22 PM   #9
hvengel
Registered User
 
Join Date: May 2006
Posts: 57
Default Re: LUT loading with TwinView bug in nvidia driver X API support

By the way how do I view the tracker item for this enhancement. And do you have any idea when it will be released?
hvengel is offline   Reply With Quote
Old 02-28-07, 02:54 PM   #10
hvengel
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:

Code:
#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));
    else
    {
        G = XRRGetCrtcGamma (thedisplay, crtc);
    }
}
When I execute this I get:

Code:
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
Old 02-28-07, 08:40 PM   #11
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: LUT loading with TwinView bug in nvidia driver X API support

I'm afraid I have no progress to report on the RFE. As for randr 1.2, the NVIDIA driver won't support the XRR*CrtcGamma requests until support has been added for the new driver interface, which has not yet been finalized.
AaronP is offline   Reply With Quote
Old 03-01-07, 02:10 PM   #12
hvengel
Registered User
 
Join Date: May 2006
Posts: 57
Default Re: LUT loading with TwinView bug in nvidia driver X API support

Will full support for RandR 1.2 be in the next release?

Those of us involved in developing tools for doing color management on Linux/Unix systems need to have the vendors who supply video drivers step up and get this working (either the gamma stuff in RandR or X VidMode extension gamma setting for all physical displays). Some of the open source drivers have had RandR gamma functionality for several months. Also there have been several threads about this issue on this forum since early last year.

Perhaps you can't comment on upcoming functionality changes to the driver on a public forum like this. Since I am actively working in this area would it be possible to get test versions of the driver when this functionality is added?
hvengel 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
nvidia + 2.4.19 gentoo = messed up ulukay NVIDIA Linux 18 11-01-02 11:58 PM
X Failed to load NVdriver c00lr4c3r NVIDIA Linux 13 10-22-02 01:44 PM
Error messages... HELP!!!! Imperito NVIDIA Linux 3 09-24-02 10:46 PM
GForce drivers installed...but dont work tomfullery NVIDIA Linux 6 09-22-02 08:23 AM
Need help to get the X to work on my Acer TravelMate 630 knchee NVIDIA Linux 16 09-19-02 10:16 PM

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


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