Bug 155011 - x11/nvidia-settings versions 195 and above fail to allow display configuration with legacy nvidia-driver versions
Summary: x11/nvidia-settings versions 195 and above fail to allow display configuratio...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alexander Nedotsukov
Depends on:
Reported: 2011-02-24 21:20 UTC by Tom Russo
Modified: 2012-08-21 16:00 UTC (History)
0 users

See Also:

file.diff (692 bytes, patch)
2011-02-24 21:20 UTC, Tom Russo
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Russo 2011-02-24 21:20:08 UTC
Beginning with nvidia-settings 195 and ever since, the "X Server Display Configuration" panel has produced an error "Failed to query NoScanout for screen 0" and refused to allow display configuration if a "legacy" version of the driver is installed (e.g. nvidia-driver-71, nvidia-driver-95 or nvidia-driver-173).  That is because the "NoScanout" property was added in nvidia-driver 195, and the settings program treats not finding it as an error, guaranteeing that the latest nvidia-settings will be broken when used on a machine with legacy drivers.

Unless the nvidia-settings port is tweaked to install versions of nvidia-settings matching the installed driver, nvidia-settings needs to be patched in order to prevent this breakage.

Fix: The attached patch comments out the code that treats a missing NoScanout property as an error, and returns instead a response to indicate NoScanout is disabled.

This patch is copied from Ubuntu's bug tracker, where it is part of the nvidia-settings package build process.


This patch allows nvidia-settings' X Server Display Configuration panel to work properly with legacy nvidia-driver ports.

The only difference between the attached patch and Ubuntu's is that I have used  "#if 0/#endif" preprocessor directives to disable the code rather than C comments.

Patch attached with submission follows:
How-To-Repeat: Install an older NVIDIA video card requiring a legacy NVIDIA driver and install the appropriate legacy driver.  Install the latest nvidia-settings port (which at this time is version 270.18).  Run nvidia-settings and click "X Server Display Configuration."  You will get a screen that shows "Unable to load X Server Display Configuration Page:  Failed to query NoScanout for screen 0."  There is at that point no way to manipulate display configuration through the GUI.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-02-25 08:02:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bland

Fix synopsis and assign.
Comment 2 Alexander Nedotsukov freebsd_committer 2012-08-21 15:49:48 UTC
State Changed
From-To: open->closed

Committed, thanks!
Comment 3 dfilter service freebsd_committer 2012-08-21 15:49:50 UTC
Author: bland
Date: Tue Aug 21 14:49:33 2012
New Revision: 302865
URL: http://svn.freebsd.org/changeset/ports/302865

  Allow display configuration with legacy nvidia-driver versions.
  PR:	155011


Modified: head/x11/nvidia-settings/Makefile
--- head/x11/nvidia-settings/Makefile	Tue Aug 21 14:35:14 2012	(r302864)
+++ head/x11/nvidia-settings/Makefile	Tue Aug 21 14:49:33 2012	(r302865)
@@ -7,6 +7,7 @@
 PORTNAME=	nvidia-settings
 MASTER_SITES=	ftp://download.nvidia.com/XFree86/nvidia-settings/ \

Modified: head/x11/nvidia-settings/files/patch-src__gtk+-2.x__ctkdisplayconfig-utils.c
--- head/x11/nvidia-settings/files/patch-src__gtk+-2.x__ctkdisplayconfig-utils.c	Tue Aug 21 14:35:14 2012	(r302864)
+++ head/x11/nvidia-settings/files/patch-src__gtk+-2.x__ctkdisplayconfig-utils.c	Tue Aug 21 14:49:33 2012	(r302865)
@@ -9,3 +9,20 @@
+--- src/gtk+-2.x/ctkdisplayconfig-utils.c.orig	2012-08-21 23:36:11.000000000 +0900
++++ src/gtk+-2.x/ctkdisplayconfig-utils.c	2012-08-21 23:36:46.000000000 +0900
+@@ -2534,11 +2534,14 @@
+     /* See if the screen is set to not scanout */
+     ret = NvCtrlGetAttribute(screen->handle, NV_CTRL_NO_SCANOUT, &val);
+     if (ret != NvCtrlSuccess) {
++#if 0
+         *err_str = g_strdup_printf("Failed to query NoScanout for "
+                                    "screen %d.",
+                                    screen_id);
+         nv_warning_msg(*err_str);
+         goto fail;
+     }
+     screen->no_scanout = (val == NV_CTRL_NO_SCANOUT_ENABLED);
svn-ports-all@freebsd.org mailing list
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"