Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Dec 2008 13:19:13 GMT
From:      Artem Naluzhnyy <tut@nhamon.com.ua>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/129546: [patch] x11/nvidia-driver: update to 810.11
Message-ID:  <200812101319.mBADJDiW089722@www.freebsd.org>
Resent-Message-ID: <200812101320.mBADK4nF095861@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         129546
>Category:       ports
>Synopsis:       [patch] x11/nvidia-driver: update to 810.11
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 10 13:20:04 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Artem Naluzhnyy
>Release:        x11/nvidia-driver
>Organization:
>Environment:
>Description:
Changes:
  * update to recent 810.11
  * fix power source detection (AC/battery) - binary NVIDIA X.org driver uses wrong matching pattern for ACAD notify events
  * add some hints for power saving

Zander from www.nvnews.net (NVIDIA) have just confirmed that the bug with power source detection is in their bugreport system now. Hope it will be fixed in upcoming release.
>How-To-Repeat:

>Fix:
diff -ruN nvidia-driver.bak/Makefile nvidia-driver/Makefile
--- nvidia-driver.bak/Makefile	2008-10-27 21:54:17.000000000 +0200
+++ nvidia-driver/Makefile	2008-12-10 15:02:22.000000000 +0200
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	nvidia-driver
-DISTVERSION?=	177.80
+DISTVERSION?=	180.11
 PORTREVISION?=	0			# As a reminder it can be overridden
 CATEGORIES=	x11 kld
 MASTER_SITES=	${MASTER_SITE_NVIDIA}
@@ -28,7 +28,8 @@
 
 OPTIONS=	FREEBSD_AGP	"Use FreeBSD AGP GART driver" off \
 		ACPI		"Enable support for ACPI Power Management" off \
-		LINUX		"Build with support for Linux compatibility" on
+		LINUX		"Build with support for Linux compatibility" on \
+		POWERPATCH	"Patch X.org driver to detect power source" on \
 
 # Starting with version 1.0-7667, NVidia has dropped support for numerous
 # "legacy" GPUs.  Consult NVidia README (the Appendix) to find out whether
@@ -80,6 +81,15 @@
 .endif
 
 post-patch: .SILENT
+# Fix power source detection in binary X.org driver
+.if defined(WITH_POWERPATCH)
+	${PRINTF} '%%*s notify=%%x\0\0\0\0\0\0\0\0' \
+		| dd of="${WRKSRC}/obj/nvidia_drv.so" bs=1 seek=0x00360acd conv=notrunc >/dev/null 2>&1
+	if [ `md5 -q "${WRKSRC}/obj/nvidia_drv.so"` != 'aa4f72c2c9530a6009a67eb97c33727a' ]; then \
+		echo "Something wrong with binary X.org driver patching. Contact the port maintainer."; \
+		false; \
+	fi
+.endif
 # We should support -CURRENT: kill the check
 	${REINPLACE_CMD} '24,26d' ${WRKSRC}/src/nv-freebsd.h
 # Fix `agpvar.h' location on recent -CURRENT
diff -ruN nvidia-driver.bak/distinfo nvidia-driver/distinfo
--- nvidia-driver.bak/distinfo	2008-10-29 06:59:27.000000000 +0200
+++ nvidia-driver/distinfo	2008-12-10 14:46:28.000000000 +0200
@@ -1,6 +1,6 @@
-MD5 (NVIDIA-FreeBSD-x86-177.80.tar.gz) = 9058785f24eb5bec2e7f885abdc753a8
-SHA256 (NVIDIA-FreeBSD-x86-177.80.tar.gz) = 169f06ff5af4c4b5a0f0fbec6a1d7d7318feb25dce64cdbe63861af92de65437
-SIZE (NVIDIA-FreeBSD-x86-177.80.tar.gz) = 16704786
+MD5 (NVIDIA-FreeBSD-x86-180.11.tar.gz) = ce59da74168ab44a7132ab770811d912
+SHA256 (NVIDIA-FreeBSD-x86-180.11.tar.gz) = 18c91c2c2a5c846f76a808e9e330a40d0dd0a074715cdc19f8dfa907affc0880
+SIZE (NVIDIA-FreeBSD-x86-180.11.tar.gz) = 17831970
 MD5 (NVIDIA-FreeBSD-x86-173.14.12.tar.gz) = d3a622573ed0e2ef14013c51daa3c326
 SHA256 (NVIDIA-FreeBSD-x86-173.14.12.tar.gz) = 0b9849d0f2b09533c384227370c94469a45384adc216a8b716a02bfc9a7340be
 SIZE (NVIDIA-FreeBSD-x86-173.14.12.tar.gz) = 15856061
diff -ruN nvidia-driver.bak/files/pkg-message.in nvidia-driver/files/pkg-message.in
--- nvidia-driver.bak/files/pkg-message.in	2008-03-30 17:22:08.000000000 +0300
+++ nvidia-driver/files/pkg-message.in	2008-12-10 15:04:20.000000000 +0200
@@ -36,3 +36,25 @@
 enabled in kernel, the sysctl ``kern.ipc.shmall'' should be increased.
 
 See %%DOCSDIR%%/README for more information.
+
+------------------------------------------------------------------------------
+To configure GPU and memory clock control for power saving and max performance
+you may put "RegistryDwords" option into appropriate NVIDIA "Device" section
+of your xorg.conf file and reload nvidia.ko module or reboot.
+
+Common examples:
+ 
+  * on battery - max power saving, on AC - max performance
+  Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x1;"
+
+  * on battery - max power saving, on AC: adaptive strategy
+  Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2233; PowerMizerDefault=0x3;"
+
+  * on battery - adaptive strategy, on AC - max performance
+  Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1;"
+
+  * adaptive strategy for any power source
+  Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3333;"
+
+See more details here -
+http://tutanhamon.com.ua/technovodstvo/NVIDIA-UNIX-driver/


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812101319.mBADJDiW089722>