[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#682335: pre-approve for freeze exception: glx-alternatives/0.3.0, nvidia-support/20120721+1 [both contrib]



Package: release.debian.org
Severity: normal

Hi,

I'd like to ask whether an exception is possible for the following
change/move of functionality:

The non-free video drivers Nvidia and Fglrx need to blacklist their free
counterparts Nouveau and Radeon. Currently a conffile is shipped in
/etc/modprobe.d/ and any solution to switch back to the free drivers
requires *purging* nvidia-kernel-common (or fglrx-driver) and extra
documentation is needed since plain package removal is insufficient.

While discussing the debconf templates on d-l-english@ last week (which
include several "... the PACKAGE must be *purged*, just removing is not
sufficient") I finally came up with a possible solution which needs a
initramfs hook and yet another slave alternative ...

I'm attaching half of the debdiff: the changes for nvidia-kernel-common
(src:nvidia-support) and glx-alternative-nvidia (src:glx-alternatives),
corresponding changes will be needed for fglrx (fglrx-driver,
glx-alternative-fglrx), too. There will also be some version bumping in
nvidia-graphics-modules* to use the updated nvidia-kernel-common and
glx-alternative-nvidia.

I don't have any bug numbers at hand, but there have been reports in the
past that were fixed by workarounds (e.g. improved bug-scripts that
helped me analyze the problems), and manual advise, because I didn't
see this quite easy solution.

It would be really great if we could get these changes into wheezy, as
it should solve possible problems switching from the non-free drivers
back to the free ones (and in wheezy we need to drop proprietary driver
support for some older hardware, so working (and easy) non-free->free
switching paths will be needed).

I'm part of the maintainer teams of all possibly affected packages, so
no unrelated packages outside of my control are going to break.
And for the packages under my control, I'll do intensive testing :-)

I'm waiting for a positive reply before doing further testing and
implementing the fglrx side.


Andreas
Index: zz_nvidia-blacklists-nouveau
===================================================================
--- zz_nvidia-blacklists-nouveau	(revision 0)
+++ zz_nvidia-blacklists-nouveau	(revision 0)
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = "prereqs" ]; then exit 0; fi
+
+. /usr/share/initramfs-tools/hook-functions
+
+# there may be a dangling symlink
+if [ -n "$DESTDIR" ] && [ -L "$DESTDIR"/etc/modprobe.d/nvidia-blacklists-nouveau.conf ]; then
+	rm -f "$DESTDIR"/etc/modprobe.d/nvidia-blacklists-nouveau.conf
+fi
+
+# this will dereference the symlink
+copy_exec /etc/modprobe.d/nvidia-blacklists-nouveau.conf

Property changes on: zz_nvidia-blacklists-nouveau
___________________________________________________________________
Added: svn:executable
   + *

Index: nvidia-blacklists-nouveau.conf
===================================================================
--- nvidia-blacklists-nouveau.conf	(revision 0)
+++ nvidia-blacklists-nouveau.conf	(revision 0)
@@ -0,0 +1,4 @@
+# You need to run "update-initramfs -u" after editing this file.
+
+# see #580894
+blacklist nouveau
Index: debian/glx-alternative-nvidia.postinst
===================================================================
--- debian/glx-alternative-nvidia.postinst	(revision 3172)
+++ debian/glx-alternative-nvidia.postinst	(working copy)
@@ -43,6 +43,7 @@
 # * /usr/lib/xorg/modules/linux/libglx.so
 # * /usr/lib/xorg/modules/drivers/nvidia_drv.so 
 # * several more NVIDIA libraries etc.
+# * /etc/modprobe.d/nvidia-blacklists-nouveau.conf
 setup_alternatives()
 {
 	slaves="
@@ -58,6 +59,7 @@
 		$(add_multiarch_slave /usr/lib "" libXvMCNVIDIA_dynamic.so.1 /usr/lib nvidia/)
 		$(add_slave /usr/lib/xorg/modules/linux/libglx.so linux-libglx.so /usr/lib/nvidia/libglx.so)
 		$(add_slave /usr/bin/nvidia-bug-report.sh nvidia-bug-report.sh /usr/lib/nvidia/nvidia-bug-report.sh)
+		$(add_slave /etc/modprobe.d/nvidia-blacklists-nouveau.conf nvidia-blacklists-nouveau.conf /etc/nvidia/nvidia-blacklists-nouveau.conf)
 "
 
 	if echo "$slaves" | grep -q "slave" ; then
@@ -67,6 +69,11 @@
 	fi
 
 	ldconfig
+
+	# trigger rebuilding the initrd to (de-)activate the nouveau blacklist
+	if [ -x /usr/sbin/update-initramfs ]; then
+		update-initramfs -u
+	fi
 }
 
 if [ "$1" = "triggered" ]; then
Index: debian/glx-alternative-nvidia.lintian-overrides
===================================================================
--- debian/glx-alternative-nvidia.lintian-overrides	(revision 3172)
+++ debian/glx-alternative-nvidia.lintian-overrides	(working copy)
@@ -1,5 +1,6 @@
 # We don't ship libraries, but we manipulate links.
 postinst-has-useless-call-to-ldconfig
 # The alternatives put slave links in these directories.
+package-contains-empty-directory etc/modprobe.d/
 package-contains-empty-directory usr/lib/xorg/modules/drivers/
 package-contains-empty-directory usr/lib/xorg/modules/linux/
Index: debian/glx-alternative-nvidia.dirs
===================================================================
--- debian/glx-alternative-nvidia.dirs	(revision 3172)
+++ debian/glx-alternative-nvidia.dirs	(working copy)
@@ -1,2 +1,3 @@
+etc/modprobe.d
 usr/lib/xorg/modules/drivers
 usr/lib/xorg/modules/linux
Index: debian/control
===================================================================
--- debian/control	(revision 3172)
+++ debian/control	(working copy)
@@ -99,6 +99,8 @@
  nvidia-glx-legacy-71xx (<< 71.86.14-3),
  nvidia-glx-legacy-96xx (<< 96.43.19-2),
  nvidia-glx-legacy-173xx (<< 173.14.30-2),
+# the nouveau blacklist was previously there
+# nvidia-kernel-common (<< 20120630-2~),
 Description: allows the selection of NVIDIA as GLX provider
  In setups with several GLX providers (e.g. the free MESA implementation and
  proprietary graphics hardware vendor implementations) this metapackage
Index: debian/glx-alternative-nvidia.install
===================================================================
--- debian/glx-alternative-nvidia.install	(revision 0)
+++ debian/glx-alternative-nvidia.install	(revision 0)
@@ -0,0 +1,2 @@
+nvidia-blacklists-nouveau.conf	etc/nvidia/
+zz_nvidia-blacklists-nouveau	usr/share/initramfs-tools/hooks/
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 3172)
+++ debian/changelog	(working copy)
@@ -1,3 +1,16 @@
+glx-alternatives (0.2.3) UNRELEASED; urgency=low
+
+  * glx-alternative-nvidia: Handle blacklisting of the nouveau kernel module
+    to avoid leaving the blacklist behind if the Nvidia driver is disabled:
+    - ship blacklist as /etc/nvidia/nvidia-blacklists-nouveau.conf
+    - add a slave alternative that links it into /etc/modprobe.d/
+    - add initramfs hook to properly install the file (and not a dangling
+      symlink) in the initrd
+    - add Breaks: nvidia-kernel-common (<< 20120630-2~) which previously
+      included the blacklisting in /etc/modprobe.d/nvidia-kernel-common.conf
+
+ -- Andreas Beckmann <debian@abeckmann.de>  Sat, 21 Jul 2012 18:48:40 +0200
+
 glx-alternatives (0.2.2) unstable; urgency=low
 
   * Run ldconfig after updating diversions and alternatives.
Index: debian/nvidia-kernel-common.modprobe
===================================================================
--- debian/nvidia-kernel-common.modprobe	(revision 3172)
+++ debian/nvidia-kernel-common.modprobe	(working copy)
@@ -3,6 +3,3 @@
 # To enable FastWrites and Sidebus addressing, uncomment these lines
 # options nvidia NVreg_EnableAGPSBA=1
 # options nvidia NVreg_EnableAGPFW=1
-
-# see #580894
-blacklist nouveau
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 3172)
+++ debian/changelog	(working copy)
@@ -1,3 +1,13 @@
+nvidia-support (20120630+3) UNRELEASED; urgency=low
+
+  * nvidia-kernel-common: The nouveau blacklist is now handled by
+    glx-alternative-nvidia, disabling the Nvidia driver and re-enabling
+    Nouveau no longer requires purging the nvidia-kernel-commmon package.
+    - remove the blacklist line from /etc/modprobe.d/nvidia-kernel-common.conf
+    - add Breaks: glx-alternative-nvidia (<< 0.2.3~)
+
+ -- Andreas Beckmann <debian@abeckmann.de>  Sat, 21 Jul 2012 20:36:06 +0200
+
 nvidia-support (20120630+2) UNRELEASED; urgency=low
 
   * Debconf templates reviewed by debian-l10n-english@.
Index: debian/control
===================================================================
--- debian/control	(revision 3172)
+++ debian/control	(working copy)
@@ -39,6 +39,7 @@
 Architecture: amd64 i386
 Pre-Depends: ${misc:Pre-Depends}
 Depends: kmod | module-init-tools (<< 4), ${misc:Depends}
+Breaks: glx-alternative-nvidia (<< 0.2.3~)
 Description: NVIDIA binary kernel module support files
  This package contains support files used for any version of the NVIDIA
  kernel module.  It sets up udev and ConsoleKit rules, ensures the NVIDIA

Reply to: