summaryrefslogtreecommitdiffstats
path: root/system/nvidia-driver
diff options
context:
space:
mode:
Diffstat (limited to 'system/nvidia-driver')
-rw-r--r--system/nvidia-driver/README53
-rw-r--r--system/nvidia-driver/README.nvidia-persistenced33
-rw-r--r--system/nvidia-driver/changelog.txt48
-rw-r--r--system/nvidia-driver/nvidia-driver.SlackBuild191
-rw-r--r--system/nvidia-driver/nvidia-driver.info32
-rw-r--r--system/nvidia-driver/nvidia-switch124
-rw-r--r--system/nvidia-driver/rc.nvidia-persistenced61
-rw-r--r--system/nvidia-driver/skip_conflict-GPU_detect.patch29
-rw-r--r--system/nvidia-driver/slack-desc2
9 files changed, 253 insertions, 320 deletions
diff --git a/system/nvidia-driver/README b/system/nvidia-driver/README
index cbfb71ee50..bf4903ba11 100644
--- a/system/nvidia-driver/README
+++ b/system/nvidia-driver/README
@@ -1,25 +1,38 @@
This is the proprietary binary video driver from NVidia for the X.Org
-X-server. This package does not include the kernel-module - it is a part
-of the nvidia-kernel package at SlackBuilds.org.
+X-server. This package does not include the kernel-module - it is a
+part of the nvidia-kernel package at SlackBuilds.org.
-NOTE: 64-bit x86_64 support ONLY for Slackware64. For x86 32-bit support,
-use nvidia-legacy390-{driver,kernel}
+NOTE: 64-bit x86_64 support ONLY for Slackware64. For x86 32-bit
+support, use nvidia-legacy390-{driver,kernel}
+
+The Wine libraries are now installed by default. To disable, pass
+ WINE="no" to the script.
+
+Installing the 32-bit compatibility libraries is available:
+if desired, do:
-Installing the 32-bit compatibility libraries is available: if desired, do:
COMPAT32="yes" ./nvidia-driver.SlackBuild
-
-If you plan to test this buildscript on current (15.0), to avoid stomping
-on the installed libglvnd, do:
- CURRENT="yes" ./nvidia-driver.SlackBuild
-
-Several useful utilities are included: nvidia-xsettings, nvidia-smi, and
-nvidia-settings. Please refer to the Nvidia documentation and man pages
-for details and usage.
-
-For CUDA/OpenCL to work after reboot, and for utilites such as nvidia-smi,
-you might need to include the following line in your /etc/rc.d/rc.local:
--------------8<---------------
-# Create missing nvidia device nodes after reboot
-/usr/bin/nvidia-modprobe -c 0 -u
-------------->8---------------
+This script now gives the option of installing the nvidia-persistenced
+daemon. For details, see README.nvidia-persistenced.
+
+Several useful utilities are included: nvidia-xsettings, nvidia-smi,
+and nvidia-settings. Please refer to the Nvidia documentation and
+man pages for details and usage.
+
+For CUDA/OpenCL to work after reboot, and for utilites such as
+nvidia-smi, you might need to include the following line in your
+/etc/rc.d/rc.local:
+(This is REQUIRED if you plan on running nvidia-persistenced)
+
+ # Create missing nvidia device nodes after reboot
+ /usr/bin/nvidia-modprobe -c 0 -u
+
+Notes:
+1. You still need to blacklist the open source nouveau driver.
+ This is easily done by installing xf86-video-nouveau-blacklist in
+ extra/xf86-video-nouveau-blacklist on the distibution DVD.
+
+CAUTION! Please DO NOT USE this script for Slackware(64) versions 14.2
+or older as it WILL corrupt the mesa and xorg installations.
+Please use the scripts from those repos instead.
diff --git a/system/nvidia-driver/README.nvidia-persistenced b/system/nvidia-driver/README.nvidia-persistenced
new file mode 100644
index 0000000000..5dd841ff87
--- /dev/null
+++ b/system/nvidia-driver/README.nvidia-persistenced
@@ -0,0 +1,33 @@
+The NVIDIA Persistence Daemon is a userspace daemon on Linux to support
+persistence of driver state across Cuda job runs. The daemon targets
+all current Tesla, Quadro and GRID GPUs. For further information, see
+
+https://docs.nvidia.com/deploy/driver-persistence/index.html
+
+The driver now includes rc.nvidia-persistenced as an option.
+While it can be run as root, it is more secure to run it as an
+unpriveleged user, so we run it as user nvidia.
+
+To install it, Pass PERSISTENCED=yes to the script. It will create the
+user and group nvidia, and install rc.nvidia-persistenced to /etc/rc.d.
+
+To activate the daemon, add the following to /etc/rc.d/local:
+
+# Start the nvidia-persistenced daemon:
+if [ -x /etc/rc.d/rc.nvidia-persistenced ]; then
+ /etc/rc.d/rc.nvidia-persistenced start
+fi
+
+and then 'chmod +x /etc/rc.d/rc.nvidia-persistenced' to make it
+executable.
+
+Add the following to /etc/rc.d/rc.local_shutdown:
+
+# Stop the nvidia-persistenced daemon:
+if [ -x /etc/rc.d/rc.nvidia-persistenced ]; then
+ /etc/rc.d/rc.nvidia-persistenced stop
+fi
+
+NOTE: This may not work on all systems. If you encounter problems
+with it, just 'chmod -x /etc/rc.d/rc.persistenced' and it will no
+longer load. YMMV.
diff --git a/system/nvidia-driver/changelog.txt b/system/nvidia-driver/changelog.txt
deleted file mode 100644
index ce4312bf9a..0000000000
--- a/system/nvidia-driver/changelog.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-1.0 20-MAR-2011 New Maintainer: Edward W. Koenig <kingbeowulf@gmail.com>
-1.1 10-APR-2011 updated to new version, testing 13.37rc4.6692
-1.2 27-MAY-2011 new version, allow multilib option, minor edits
-1.2.1 20-JUN-2011 minor edits, thanks to Robby and Roberto
-1.5 01-JUL-2011 new version, single driver download, add switch to select pure x86_64 or x86_64 with 32-bit compatibility.
-1.6 27-AUG-2011 version bump, minor edits
-1.7 21-OCT-2011 version bump
-1.8 24-MAR-2012 version bump, fix to nvidia-switch thanks to Phill W.
-1.9 02-AUG-2012 version bmp, fixes, updates, nvidia-switch for install/uninstall only
-2.0 21-AUG-2012 new version (important security fix), missing vdpau-nvidia, dropped *.h
-2.1 25-AUG-2012 new version -Long Lived Branch, fixed symlinks (per Das email)
-2.2 22-NOV-2012 new version -Long Lived Branch. Updates: libs, apps
-2.3 15-FEB-2013 new version -Long Lived Branch.
-2.4 19-MAY-2013 new version -Long Lived Branch.
-2.6 20-OCT-2013 new version -Long Lived Branch, add new lib, fix nvidia-switch --remove
-3.0 13-NOV-2013 new version (LLB), update libs
-3.1 12-APR-2014 new version (LLB), update libs
-3.2a 12-JUL-2014 new version (LLB), update libs and bug fixes, fix /dev/nvidia-uvm
-3.3 20-NOV-2014 new version (LLB), update libs, fix nvidia-switch
-3.4 11-JAN-2015 new version (LLB), monitor detection bug fix, add libEGL/GLES
-4.0 07-FEB-2015 new long lived branch, version update, bug fixes
-4.1 27-APR-2015 version update LLB, fix $VERSION usage
-4.2 28-JUL-2015 version update LLB, bug fixes, clean-ups.
-4.3 05-SEP-2015 version update LLB
-4.4 13-DEC-2015 version update, X.Org 1.18 support
-4.5 12-MAR-2016 version update LLB, symlink fixes, drop nvidia-installer, get ready for 14.2
-4.5a 26-MAR-2016 fixed broken symlinks
-4.6 24-APR-2016 version update LLB, fix symlinks, added to version if multilib
-4.7 31-APR-2016 version update LLB, added nvidia-installer, updated libs/symlinks
-5.0 20-FEB-2017 version update LLB, security fixes, updated libs/symlinks, nvidia-switch
-5.1 01-APR-2017 fix nvidia-switch lib names to prevent bad ldconfig symlinks on reboot
-5.2 02-JUN-2017 version update LLB, refactor/debug scripts, use nvidia-installer
-5.3 13-OCT-2017 version update LLB, bug fixes, update copyright
-5.4 18-FEB-2018 version update LLB, updates, bug fix (thanks Leo)
-5.5 25-MAR-2018 version update LLB
-5.6 23-APR-2018 version update LLB, update symlinks, fix changelog formatting
-5.7 28-MAY-2018 version update LLB
-5.8 30-JUL-2018 version update LLB
-5.9 06-SEP-2018 version update LLB
-6.0 09-N0V-2018 version update LLB, 32-bit CPU support dropped, x86_64 COMPAT32 available.
-6.1 22-Dec-2018 version update LLB, fix libglx symlink
-6.2 04-FEB-2019 beta version update LLB (build fixes kernel 4.4.168+), minor fixes/corrections
-6.3 26-FEB-2019 version update LLB
-6.4 20-APR-2019 version update LLB
-6.5 14-MAY-2019 version update LLB
-6.6 10-AUG-2019 version update LLB, drop non-glvnd libs. This script will NOT work on current
-6.7 11-SEP-2019 version update LLB, fix for pre-Turing GPUs (This script will NOT work on current).
-7.0 28-NOV-2019 version update LLB, add temp glvnd switch for 15.0, remove nvidia-switch
diff --git a/system/nvidia-driver/nvidia-driver.SlackBuild b/system/nvidia-driver/nvidia-driver.SlackBuild
index cb536d4137..62f2d75100 100644
--- a/system/nvidia-driver/nvidia-driver.SlackBuild
+++ b/system/nvidia-driver/nvidia-driver.SlackBuild
@@ -1,8 +1,10 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for nvidia-driver
-# Copyright 2012-2019 Edward W. Koenig, Vancouver, WA, USA
+# Copyright 2012-2019 Edward W. Koenig, Vancouver, WA, US
+# Copyright 2020-2023 Lenard Spencer, Orlando, FL, USA
+#
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,14 +24,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# see changelog.txt
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nvidia-driver
-VERSION=${VERSION:-440.36}
+VERSION=${VERSION:-550.76}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-
-CURRENT=${CURRENT:-no}
+PKGTYPE=${PKGTYPE:-tgz}
set -e
@@ -41,7 +42,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -57,6 +57,28 @@ else
exit 1
fi
+if [ "${COMPAT32}" = "yes" ]; then
+ MULTI="_multilib"
+else
+ MULTI=""
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION$MULTI-$TARGET-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+if [ "${PERSISTENCED:-no}" = "yes" ]; then
+ if [ "`getent group nvidia > /dev/null`" -o "`getent passwd nvidia > /dev/null`" ]; then
+ echo "User and/or group nvidia do not exist!"
+ echo "Please create user and group nvidia and rerun this script."
+ exit 1
+ fi
+fi
+
SRCNAM=NVIDIA-Linux-$TARGET-${VERSION}
# make a clean package directory tree
@@ -64,10 +86,9 @@ rm -rf $PKG
rm -rf $TMP/$SRCNAM
mkdir -p $TMP $PKG $OUTPUT $PKG/install
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,extensions} \
- $PKG/etc/OpenCL/vendors/ $PKG/usr/{bin,doc,man/man1,sbin} \
+ $PKG/etc/OpenCL/vendors/ $PKG/usr/{bin,doc,man/man1} \
$PKG/usr/share/{applications,nvidia,pixmaps,egl/egl_external_platform.d} \
- $PKG/usr/include/GL $PKG/etc/vulkan/{icd.d,implicit_layer.d} $PKG/etc/X11/xorg.conf.d \
- $PKG/etc/X11/glvnd/egl_vendor.d $PKG/var/log/nvidia/{32,64}
+ $PKG/etc/X11/glvnd/egl_vendor.d $PKG/var/log
if [ "$COMPAT32" = "yes" ]; then
mkdir -p $PKG/usr/lib/tls
@@ -81,10 +102,8 @@ rm -rf nvidia-settings-$VERSION
tar xvf $CWD/nvidia-settings-$VERSION.tar.bz2
rm -rf nvidia-xconfig-$VERSION
tar xvf $CWD/nvidia-xconfig-$VERSION.tar.bz2
-rm -rf nvidia-modprobe-$VERSION.tar.bz2
+rm -rf nvidia-modprobe-$VERSION
tar xvf $CWD/nvidia-modprobe-$VERSION.tar.bz2
-rm -rf nvidia-persistenced-$VERSION.tar.bz2
-tar xvf $CWD/nvidia-persistenced-$VERSION.tar.bz2
sh $CWD/$SRCNAM.run --extract-only
cd $SRCNAM
chown -R root:root .
@@ -96,10 +115,16 @@ find -L . \
# Compiling the various open source apps instead of using the precompiled binaries
# Compiling nvidia-installer from source
+
cd $TMP/nvidia-installer-$VERSION
-# Let's try to remove the conflicting files and GPU detection
- patch -p0 < $CWD/skip_conflict-GPU_detect.patch
+# Install various files in $PKG instead of the root filesystem:
+ sed -i "s|/etc/vulkan|$PKG/etc/vulkan|" files.c
+ sed -i "s|/lib/firmware/nvidia|$PKG/lib/firmware/nvidia|" files.c
+ sed -i "s|\"/etc\"|\"$PKG/etc\"|" nvidia-installer.h
+ sed -i "s|/var/lib/nvidia|$PKG/var/lib/nvidia|" backup.c
+ sed -i "s|/usr/lib/nvidia|$PKG/usr/lib/nvidia|" files.c
+ sed -i "s|/usr/lib/nvidia|$PKG/usr/lib/nvidia|" misc.c
chown -R root:root .
find -L . \
@@ -122,13 +147,11 @@ mv -f $PKG/usr/man/man1/nvidia-installer.1.gz $TMP/$SRCNAM
if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
COMP32="--install-compat32-libs --compat32-prefix=$PKG/usr"
- MULTI="_multi"
else
if [ ! "$ARCH" = "x86_64" ]; then
COMP32=""
else
COMP32="--no-install-compat32-libs"
- MULTI=""
fi
fi
@@ -150,41 +173,41 @@ cd $TMP/$SRCNAM
--log-file-name=$PKG/var/log/nvidia-installer.log \
--egl-external-platform-config-path=$PKG/usr/share/egl/egl_external_platform.d \
--no-nvidia-modprobe \
- --install-libglvnd \
+ --no-install-libglvnd \
+ --no-wine-files \
+ --no-systemd \
+ --no-peermem \
$COMP32
-# Clean-up: we really do not need this:
-rm -rf /var/lib/nvidia
-# If running current (15.0) remove duplicate libglvnd files
-if [ "$CURRENT" = "yes" ]; then
- rm -f $PKG/usr/lib$LIBDIRSUFFIX/libEGL.so.1.1.0
- rm -f $PKG/usr/lib$LIBDIRSUFFIX/libGL.so.1.7.0
- rm -f $PKG/usr/lib$LIBDIRSUFFIX/libGLESv1_CM.so.1.2.0
- rm -f $PKG/usr/lib$LIBDIRSUFFIX/libGLESv2.so.2.1.0
- rm -f $PKG/usr/lib$LIBDIRSUFFIX/libGLX.so.0.0.0
- rm -f $PKG/usr/lib$LIBDIRSUFFIX/libGLdispatch.so.0.0.0
- rm -f $PKG/usr/lib$LIBDIRSUFFIX/libGLdispatch.so.0
- rm -f $PKG/usr/lib$LIBDIRSUFFIX/libOpenGl.0.0.0
- if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
- rm -f $PKG/usr/lib/libEGL.so.1.1.0
- rm -f $PKG/usr/lib/libGL.so.1.7.0
- rm -f $PKG/usr/lib/libGLESv1_CM.so.1.2.0
- rm -f $PKG/usr/lib/libGLESv2.so.2.1.0
- rm -f $PKG/usr/lib/libGLX.so.0.0.0
- rm -f $PKG/usr/lib/libGLdispatch.so.0.0.0
- rm -f $PKG/usr/lib/libGLdispatch.so.0
- rm -f $PKG/usr/lib/libOpenGl.0.0.0
- fi
+# If we are using Wine, then:
+if [ "${WINE:-yes}" != "no" ]; then
+ mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/nvidia/wine
+ install -m 755 _nvngx.dll $PKG/usr/lib$LIBDIRSUFFIX/nvidia/wine
+ install -m 755 nvngx.dll $PKG/usr/lib$LIBDIRSUFFIX/nvidia/wine
fi
-
-# add tls
-if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
- install -m 755 32/libnvidia-tls.so.$VERSION $PKG/usr/lib/tls/libnvidia-tls.so.$VERSION
- cd $PKG/usr/lib
- ln -sf tls/libnvidia-tls.so.$VERSION libnvidia-tls.so.$VERSION
- cd -
+# libOpenCL.so is now included in 15.0 (in ocl-icd),
+# so we don't need this one.
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libOpenCL.so*
+if [ "${COMPAT32}" = "yes" ]; then
+ rm -f $PKG/usr/lib/libOpenCL.so*
+fi
+# remove a pair of folders installed and used by nvidia-installer but
+# no longer needed (caused the "failed to remove some directories"
+# warning message):
+rm -rf $PKG/usr/lib/nvidia || true
+rm -rf $PKG/var/lib || true
+
+# if not multilib, remove the unneeded /usr/lib folder:
+if [ "${COMPAT32}" != "yes" ]; then
+ rm -rf $PKG/usr/lib || true
fi
+# Mitigate a bug in nvidia-installer that misplaces a symlink
+# (Thanks to marco70 on LQ for catching this)
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/gbm
+rm -f nvidia-drm_gbm.so
+ ln -sf ../libnvidia-allocator.so.1 nvidia-drm_gbm.so
+)
# Compile utilites from source, replacing the precompiled versions
#
# Compiling nvidia-settings
@@ -244,45 +267,19 @@ cd -
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" make
-
- install -m 755 _out/Linux_$TARGET/nvidia-modprobe $PKG/usr/bin/
+# must be installed suid root for nvidia-persistenced to work properly
+ install -m 4755 _out/Linux_$TARGET/nvidia-modprobe $PKG/usr/bin/
install -m 644 _out/Linux_$TARGET/nvidia-modprobe.1.gz $PKG/usr/man/man1/
cd -
-# Compiling nvidia-persistenced
- cd $TMP/nvidia-persistenced-$VERSION
- chown -R root:root .
- find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
- CFLAGS="$SLKCFLAGS" make
-#FIXME: need rc.nvidia-persistenced script; see doc
- install -m 755 _out/Linux_$TARGET/nvidia-persistenced $PKG/usr/bin/
- install -m 644 _out/Linux_$TARGET/nvidia-persistenced.1.gz $PKG/usr/man/man1/
- cd -
-
-# Don't ship .la files:
-rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
-if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
- rm -f $PKG/usr/lib/*.la
-fi
-
-# These update or correct wrong paths
+# These update the paths in nvidia-settings.desktop
sed -i "s|__UTILS_PATH__|/usr/bin|" $PKG/usr/share/applications/nvidia-settings.desktop
sed -i "s|__PIXMAP_PATH__|/usr/share/pixmaps|" $PKG/usr/share/applications/nvidia-settings.desktop
-sed -i "s|__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__|Application;Settings;|" $PKG/usr/share/applications/nvidia-settings.desktop
-
-# Move ICDs to $PKG and cleanup (no switch option in installer?)
-mv /etc/OpenCL/vendors/nvidia.icd $PKG/etc/OpenCL/vendors/nvidia.icd
-mv /etc/vulkan/icd.d/nvidia_icd.json $PKG/etc/vulkan/icd.d/nvidia_icd.json
-mv /etc/vulkan/implicit_layer.d/nvidia_layers.json $PKG/etc/vulkan/implicit_layer.d/nvidia_layers.json
-rm -rf /etc/OpenCL
-rm -rf /etc/vulkan
+sed -i "s|__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__|Settings;|" $PKG/usr/share/applications/nvidia-settings.desktop
+# Remove depcrecated entry in nvidia-settings.desktop
+sed -i '/Encoding/d' $PKG/usr/share/applications/nvidia-settings.desktop
-# Remove xorg conf file since we take care of that in nvidia-driver
+# Remove xorg conf file since we handle that in nvidia-kernel
rm -rf $PKG/etc/X11/xorg.conf.d
cd $TMP/$SRCNAM
@@ -296,8 +293,38 @@ cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
sed "s/PKGVERSION/$VERSION/g" $CWD/slack-desc > $PKG/install/slack-desc
+if [ "$COMPAT32" = "yes" ]; then
+ sed -i "s|nvidia-driver: @MULTILIB@|nvidia-driver: This package includes the 32-bit libraries.|" $PKG/install/slack-desc
+else
+ sed -i "s|nvidia-driver: @MULTILIB@|nvidia-driver:|" $PKG/install/slack-desc
+fi
+
cat $CWD/doinst.sh > $PKG/install/doinst.sh
-# Flag install as multlib as needed and build package.
+# Add nvidia-persistenced:
+if [ "${PERSISTENCED:-no}" = "yes" ]; then
+ cd $TMP
+ rm -rf nvidia-persistenced-$VERSION.tar.bz2
+ tar xvf $CWD/nvidia-persistenced-$VERSION.tar.bz2
+# Compiling nvidia-persistenced
+ cd $TMP/nvidia-persistenced-$VERSION
+ chown -R root:root .
+ find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+ CFLAGS="$SLKCFLAGS" make
+ install -m 755 _out/Linux_$TARGET/nvidia-persistenced $PKG/usr/bin/
+ install -m 644 _out/Linux_$TARGET/nvidia-persistenced.1.gz $PKG/usr/man/man1/
+# install rc.nvidia-perstistenced:
+ mkdir -p $PKG/etc/rc.d $PKG/var/run/nvidia-persistenced
+ install -m 755 $CWD/rc.nvidia-persistenced $PKG/etc/rc.d/rc.nvidia-persistenced
+ sed -i "s|__USER__|nvidia|" $PKG/etc/rc.d/rc.nvidia-persistenced
+ chown nvidia:nvidia $PKG/var/run/nvidia-persistenced
+fi
+
+# Flag multilib as needed and build package.
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION$MULTI-$TARGET-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION$MULTI-$TARGET-$BUILD$TAG.$PKGTYPE
diff --git a/system/nvidia-driver/nvidia-driver.info b/system/nvidia-driver/nvidia-driver.info
index 929d009c5d..1c4648cef1 100644
--- a/system/nvidia-driver/nvidia-driver.info
+++ b/system/nvidia-driver/nvidia-driver.info
@@ -1,20 +1,20 @@
PRGNAM="nvidia-driver"
-VERSION="440.36"
-HOMEPAGE="http://www.nvidia.com"
+VERSION="550.76"
+HOMEPAGE="https://www.nvidia.com"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
-DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/440.36/NVIDIA-Linux-x86_64-440.36.run \
- https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-440.36.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-440.36.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-440.36.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-440.36.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-440.36.tar.bz2"
-MD5SUM_x86_64="0a85672111e3eb348838a5919253411b \
- e024b533882f834f7fbaabbded3a243a \
- a505045ed590ad38093438263d225c9b \
- b7a86c33ccc6d82289207d1295630025 \
- 923f6ea80fd6936b349107e2bc2209b6 \
- aff1463ace949faa29a5ec6f6900d66f"
+DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/550.76/NVIDIA-Linux-x86_64-550.76.run \
+ https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-550.76.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-550.76.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-550.76.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-550.76.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-550.76.tar.bz2"
+MD5SUM_x86_64="5f8b7b1f439e5ded0a092bcb22e856a6 \
+ e180babbc004a7c3619a0dc902904234 \
+ 93ed775d26a16bab7be611a8877081b5 \
+ f4c4c7209fc7f5cc2587f677a9115ac5 \
+ d13fc7da6aab55f1ac8445c9c6fe73e3 \
+ 8d058fe472b3fca86c3a77830b33e575"
REQUIRES="nvidia-kernel"
-MAINTAINER="Edward W. Koenig"
-EMAIL="kingbeowulf@gmail.com"
+MAINTAINER="Lenard Spencer"
+EMAIL="lenardrspencer@gmail.com"
diff --git a/system/nvidia-driver/nvidia-switch b/system/nvidia-driver/nvidia-switch
deleted file mode 100644
index 105156c3c4..0000000000
--- a/system/nvidia-driver/nvidia-switch
+++ /dev/null
@@ -1,124 +0,0 @@
-#!/bin/sh
-
-# Copyright 2012-2019 Edward W. Koenig, Vancouver, WA, USA
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# nvidia-switch utility 4.5
-#
-# A tool to install and cleanly remove the nvidia driver without stomping on the xorg files.
-# Note: this tool "should" allow switching on the fly, but why? Pick a driver! You will still
-# need to edit a bunch of other config files.
-
-# TO-DO: needs more cleanup, simplify linking using system tools, add 15.0 fixes
-
-ROOT="${ROOT:-/}"
-CWD=$(pwd)
-COMPAT32="LIB32FLAG" # This will be replaced in the build script (yes | no)
-LIBSUFFIX="LIBDIRSUFFIX" # This will be replaced in the build script
-INC="${ROOT}usr/include/GL"
-LIB="${ROOT}usr/lib${LIBSUFFIX}"
-LIB32="${ROOT}usr/lib"
-XMOD="${LIB}/xorg/modules"
-XLIB="$XMOD/extensions"
-NV_VERSION="PKGVERSION" # This will be replaced in the build script
-GL_VERSION="1.2.0"
-GLVND="yes" # This will be replaced in the build script (yes | no)
-
-
-save_GL(){
-# backup original mesa and xorg conflicts ##to /var/log/nvidia
- cd $2
- case "$1" in
- "nvidia")
- mv libGL.la libGL.la-xorg
- mv libGL.la-nvidia libGL.la
- ;;
-
- "xorg")
- mv libGL.la libGL.la-nvidia
- mv libGL.la-xorg libGL.la
- ;;
-
- *)
- echo "nothing to do for save_gl?"
- exit 1
- ;;
- esac
- cd "$CWD"
-}
-
-nvidia_install(){
- if [ ! -d $SAVELIBS ]; then
- echo "Creating missing $SAVELIB ..."
- mkdir -p $SAVELIBS
- fi
- echo $'Installing to nvidia-driver files!\n'
- echo "Make sure the nvidia driver is ENABLED in /etc/X11/xorg.conf"
- echo "and in /etc/X11/xorg.conf.d."
- echo "Otherwise, this may lead to improperly working drivers."
-
- save_GL "nvidia" $LIB
-
-# Check for multilib configuration
- if [ "$COMPAT32" = "yes" ]; then
- save_GL "nvidia" $LIB32
- fi
-}
-
-nvidia_remove(){
- echo $'Returning to stock xorg files!\n'
- echo "Make sure the nvidia driver is DISABLED in /usr/share/X11/xorg.conf.d"
- echo "/etc/X11/xorg.conf and in /etc/X11/xorg.conf.d."
- echo "Otherwise, this may lead to improperly working drivers."
-
- save_GL "xorg" $LIB
-# Check for multilib configuration
- if [ "$COMPAT32" = "yes" ]; then
- save_GL "xorg" $LIB32
- fi
-
- if [ -e $NV_CONF ]; then
- echo "You will need to remove/save $NV_CONF from nvidia-driver to use"
- echo "any open source drivers."
- fi
-}
-
-usage(){
- echo "Usage:"
- echo " --install Set up nvidia driver files"
- echo " --remove Return to stock xorg files and restore all symlinks"
- echo " --help Show this help message"
-}
-
-case "$1" in
- "--install")
- nvidia_install
-
- ;;
- "--remove")
- nvidia_remove
- ;;
- "--help")
- usage
- ;;
- *)
- usage
- ;;
-esac
diff --git a/system/nvidia-driver/rc.nvidia-persistenced b/system/nvidia-driver/rc.nvidia-persistenced
new file mode 100644
index 0000000000..b95480a4e0
--- /dev/null
+++ b/system/nvidia-driver/rc.nvidia-persistenced
@@ -0,0 +1,61 @@
+#!/bin/bash -e
+#
+# NVIDIA Persistence Daemon Init Script
+#
+# Copyright (c) 2013 NVIDIA Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+NVPD=nvidia-persistenced
+NVPD_BIN=/usr/bin/${NVPD}
+NVPD_RUNTIME=/var/run/${NVPD}
+NVPD_PIDFILE=${NVPD_RUNTIME}/${NVPD}.pid
+NVPD_USER=__USER__
+
+if [ -f ${NVPD_PIDFILE} ]; then
+ read -r NVPD_PID < "${NVPD_PIDFILE}"
+ # Remove stale runtime files
+ if [ "${NVPD_PID}" ] && [ ! -d /proc/${NVPD_PID} ]; then
+ unset NVPD_PID
+ rm -rf "${NVPD_RUNTIME}"
+ fi
+fi
+
+case "${1}" in
+ start)
+ echo "Starting NVIDIA Persistence Daemon"
+
+ # Execute the daemon as the intended user
+ ${NVPD_BIN} --user ${NVPD_USER}
+ ;;
+ stop)
+ echo "Stopping NVIDIA Persistence Daemon"
+
+ # Stop the daemon - its PID should have been read in
+ [ ! -z "${NVPD_PID}" ] && kill ${NVPD_PID} &> /dev/null
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *) echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/system/nvidia-driver/skip_conflict-GPU_detect.patch b/system/nvidia-driver/skip_conflict-GPU_detect.patch
deleted file mode 100644
index 2b979cbf46..0000000000
--- a/system/nvidia-driver/skip_conflict-GPU_detect.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -uaN command-list.c command-list.c.new
---- command-list.c 2018-01-24 20:59:24.000000000 -0800
-+++ command-list.c.new 2018-02-18 00:51:13.218202297 -0800
-@@ -903,6 +903,8 @@
- // Allocate enough space for the whole file list, plus two extra files and
- // a NULL at the end.
- cfList = nvalloc((p->num_entries + 3) * sizeof(ConflictingFileInfo));
-+/* let's just return an empty list! */
-+ return cfList;
-
- for (i = 0; i < p->num_entries; i++) {
- PackageEntry *entry = &p->entries[i];
-
-diff -uaN misc.c misc.c.new
---- misc.c 2018-02-18 00:52:42.822203145 -0800
-+++ misc.c.new 2018-02-18 00:53:28.926203581 -0800
-@@ -2289,7 +2289,10 @@
- "For further details, please see the appendix SUPPORTED "
- "NVIDIA GRAPHICS CHIPS in the README available on the Linux "
- "driver download page at www.nvidia.com.", p->version);
-- return FALSE;
-+/* return FALSE;
-+ * We're just going to keep the message but skip the result
-+ * so we can run this in a VM.
-+ */
- }
-
- if (!found_vga_device)
-
diff --git a/system/nvidia-driver/slack-desc b/system/nvidia-driver/slack-desc
index 6781f2468f..7b63dee80e 100644
--- a/system/nvidia-driver/slack-desc
+++ b/system/nvidia-driver/slack-desc
@@ -15,5 +15,5 @@ nvidia-driver:
nvidia-driver: See /usr/doc/nvidia-driver-PKGVERSION/README.Slackware
nvidia-driver: for more information.
nvidia-driver:
-nvidia-driver:
+nvidia-driver: https://www.nvidia.com
nvidia-driver: