summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
author Lenard Spencer <lenardrspencer@gmail.com>2022-04-01 22:10:52 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-02 18:19:06 +0700
commited60c94ff16f8745cce3b798de5eb47610468aa2 (patch)
tree7b2be7431062815e77a9dd6d013ad8b296017905 /system
parent6f24d6ae0b172455b566c3fc49bb378fb9fa8e80 (diff)
downloadslackbuilds-ed60c94ff16f8745cce3b798de5eb47610468aa2.tar.gz
slackbuilds-ed60c94ff16f8745cce3b798de5eb47610468aa2.tar.xz
system/nvidia-legacy470-driver: Added (Nvidia 470 driver).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/nvidia-legacy470-driver/README44
-rw-r--r--system/nvidia-legacy470-driver/README.nvidia-persistenced33
-rw-r--r--system/nvidia-legacy470-driver/doinst.sh4
-rw-r--r--system/nvidia-legacy470-driver/nvidia-legacy470-driver.SlackBuild324
-rw-r--r--system/nvidia-legacy470-driver/nvidia-legacy470-driver.info20
-rw-r--r--system/nvidia-legacy470-driver/rc.nvidia-persistenced61
-rw-r--r--system/nvidia-legacy470-driver/skip_conflict-GPU_detect.patch47
-rw-r--r--system/nvidia-legacy470-driver/slack-desc19
8 files changed, 552 insertions, 0 deletions
diff --git a/system/nvidia-legacy470-driver/README b/system/nvidia-legacy470-driver/README
new file mode 100644
index 0000000000..79f756d487
--- /dev/null
+++ b/system/nvidia-legacy470-driver/README
@@ -0,0 +1,44 @@
+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.
+
+NOTE: 64-bit x86_64 support ONLY for Slackware64. For x86 32-bit
+support, use nvidia-legacy390-{driver,kernel}
+
+Installing the 32-bit compatibility libraries is available:
+if desired, do:
+
+ COMPAT32="yes" ./nvidia-legacy470-driver.SlackBuild
+
+This script now gives the option of installing the nvidia-persitenced
+daemon. For details, see README.nvidia-persitenced.
+
+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.
+
+2. If nvidia-driver is already installed, the script will abort with
+ a prompt to remove the existing driver (it is not necessary to
+ remove the kernel module).
+
+3. With Slackware 15.0, nvidia-switch has been dropped once and for
+ all as there are no longer any conflicts.
+
+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 script from those repos instead.
+
+The Nvidia 470.xx series will be supported through December 2024.
diff --git a/system/nvidia-legacy470-driver/README.nvidia-persistenced b/system/nvidia-legacy470-driver/README.nvidia-persistenced
new file mode 100644
index 0000000000..5dd841ff87
--- /dev/null
+++ b/system/nvidia-legacy470-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-legacy470-driver/doinst.sh b/system/nvidia-legacy470-driver/doinst.sh
new file mode 100644
index 0000000000..392c12adb9
--- /dev/null
+++ b/system/nvidia-legacy470-driver/doinst.sh
@@ -0,0 +1,4 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications
+fi
+
diff --git a/system/nvidia-legacy470-driver/nvidia-legacy470-driver.SlackBuild b/system/nvidia-legacy470-driver/nvidia-legacy470-driver.SlackBuild
new file mode 100644
index 0000000000..df04d30c7a
--- /dev/null
+++ b/system/nvidia-legacy470-driver/nvidia-legacy470-driver.SlackBuild
@@ -0,0 +1,324 @@
+#!/bin/bash
+
+# Slackware build script for nvidia-legacy470-driver
+
+# Copyright 2012-2019 Edward W. Koenig, Vancouver, WA, US
+# Copyright 2021 Lenard Spencer, Orlando, FL, 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.
+
+# see changelog.txt
+
+PRGNAM=nvidia-legacy470-driver
+VERSION=${VERSION:-470.103.01}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+set -e
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+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-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ TARGET="x86_64"
+ LIBDIRSUFFIX="64"
+# Set 32-bit compatibility flag default
+ COMPAT32=${COMPAT32:-no}
+else
+ echo "$ARCH is not supported."
+ exit 1
+fi
+
+# There are a couple of unresolved issues with nvidia-installer, so we
+# abort if an Nvidia driver is still installed:
+if [ -x /usr/bin/nvidia-installer ]; then
+ echo -e "\n A previous Nvidia installation has been detected!"
+ echo -e " Please remove the installed driver and rerun this script.\n"
+ exit 1
+fi
+
+SRCNAM=NVIDIA-Linux-$TARGET-${VERSION}
+
+# make a clean package directory tree
+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/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
+
+if [ "$COMPAT32" = "yes" ]; then
+ mkdir -p $PKG/usr/lib/tls
+fi
+
+# Extract all the sources
+cd $TMP
+rm -rf nvidia-installer-$VERSION
+tar xvf $CWD/nvidia-installer-$VERSION.tar.bz2
+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 xvf $CWD/nvidia-modprobe-$VERSION.tar.bz2
+sh $CWD/$SRCNAM.run --extract-only
+cd $SRCNAM
+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 {} \;
+
+# 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
+
+ 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" LDFLAGS="-lz" make
+
+ install -m 755 _out/Linux_$TARGET/nvidia-installer $PKG/usr/bin/
+ install -m 644 _out/Linux_$TARGET/nvidia-installer.1.gz $PKG/usr/man/man1/
+
+cd -
+
+# Now we need to copy the newly patched and compiled nvidia-installer
+# to the driver source tree for use
+mv -f $PKG/usr/bin/nvidia-installer $TMP/$SRCNAM
+mv -f $PKG/usr/man/man1/nvidia-installer.1.gz $TMP/$SRCNAM
+
+if [ "${COMPAT32}" = "yes" ]; then
+ COMP32="--install-compat32-libs --compat32-prefix=$PKG/usr"
+ MULTI="_multilib"
+else
+ COMP32="--no-install-compat32-libs"
+ MULTI=""
+fi
+
+# Install the binary libs using nvidia-installer compiled above
+cd $TMP/$SRCNAM
+./nvidia-installer -s --no-kernel-module --no-drm --no-unified-memory \
+ -z -n -b --no-rpms --no-distro-scripts \
+ --no-kernel-module-source --no-x-check --force-libglx-indirect \
+ --x-prefix=$PKG/usr \
+ --x-module-path=$PKG/usr/lib${LIBDIRSUFFIX}/xorg/modules \
+ --x-library-path=$PKG/usr/lib${LIBDIRSUFFIX} \
+ --x-sysconfig-path=$PKG/etc/X11/xorg.conf.d \
+ --opengl-prefix=$PKG/usr \
+ --utility-prefix=$PKG/usr \
+ --utility-libdir=lib${LIBDIRSUFFIX} \
+ --documentation-prefix=$PKG/usr \
+ --application-profile-path=$PKG/usr/share/nvidia \
+ --glvnd-egl-config-path=$PKG/etc/X11/glvnd/egl_vendor.d \
+ --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 \
+ --no-systemd \
+ --no-peermem \
+ $COMP32
+
+ # 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
+
+# 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.1.0.0
+if [ "${COMPAT32}" = "yes" ]; then
+ rm -f $PKG/usr/lib/libOpenCL.so.1.0.0
+fi
+
+# Compile utilites from source, replacing the precompiled versions
+#
+# Compiling nvidia-settings
+cd $TMP/nvidia-settings-$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 {} \;
+
+ cd src/libXNVCtrl
+ make clean
+ CFLAGS="$SLKCFLAGS" \
+ make
+ cd ../../
+
+ CFLAGS="$SLKCFLAGS" \
+ make
+
+ install -m 755 src/_out/Linux_$TARGET/nvidia-settings $PKG/usr/bin/
+ install -m 644 doc/_out/Linux_$TARGET/nvidia-settings.1.gz $PKG/usr/man/man1/
+ install -m 644 doc/nvidia-settings.desktop $PKG/usr/share/applications/
+ install -m 644 doc/nvidia-settings.png $PKG/usr/share/pixmaps/
+# For nvidia-settings GUI support
+ install -m 755 src/_out/Linux_$TARGET/libnvidia-gtk2.so $PKG/usr/lib$LIBDIRSUFFIX/libnvidia-gtk2.so.$VERSION
+ install -m 755 src/_out/Linux_$TARGET/libnvidia-gtk3.so $PKG/usr/lib$LIBDIRSUFFIX/libnvidia-gtk3.so.$VERSION
+cd -
+
+# Compiling nvidia-xconfig
+cd $TMP/nvidia-xconfig-$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-xconfig $PKG/usr/bin/
+ install -m 644 _out/Linux_$TARGET/nvidia-xconfig.1.gz $PKG/usr/man/man1/
+cd -
+
+# Some optional utilities, such as laptop for possible GPU switching and
+# nvidia-modprobe needed to create device nodes, see README!
+# FIXME: Needs cleanup at a later date.
+
+# Compiling nvidia-modprobe
+ cd $TMP/nvidia-modprobe-$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
+# 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 -
+
+# 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
+
+# Remove xorg conf file since we handle that in nvidia-kernel
+rm -rf $PKG/etc/X11/xorg.conf.d
+
+cd $TMP/$SRCNAM
+# put docs in the right place
+mv $PKG/usr/share/man/man1/nvidia-* $PKG/usr/man/man1
+rm -rf $PKG/usr/share/man
+mv $PKG/usr/share/doc/NVIDIA_GLX-1.0 $PKG/usr/doc/$PRGNAM-$VERSION
+rm -rf $PKG/usr/share/doc
+cp -a LICENSE NVIDIA_Changelog README.txt $PKG/usr/doc/$PRGNAM-$VERSION
+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
+
+# 14.2 needs nvidia-switch, -current does not
+if [ "$CURRENT" = "no" ]; then
+ echo -e "usr/sbin/nvidia-switch --install\n" >> $PKG/install/doinst.sh
+fi
+
+# Add rc.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/
+
+ if ! getent group nvidia > /dev/null 2>&1; then
+ echo "Creating the group nvidia:"
+ groupadd -g 365 nvidia || exit 1
+ fi
+ if ! getent passwd nvidia > /dev/null 2>&1; then
+ echo "Creating the user nvidia:"
+ useradd -u 365 -g 365 -c "Nvidia" -d /dev/null -s /bin/false nvidia || exit 1
+ fi
+ mkdir -p $PKG/var/run/nvidia-persistenced
+ chown nvidia:nvidia $PKG/var/run/nvidia-persistenced
+ mkdir -p $PKG/etc/rc.d
+ 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
+ cat <<EOF >> $PKG/install/doinst.sh
+# Create group and user nvidia if they don't already exist
+if ! getent group nvidia > /dev/null 2>&1; then
+ echo "Creating the group nvidia:"
+ groupadd -g 365 nvidia || exit 1
+fi
+if ! getent passwd nvidia > /dev/null 2>&1; then
+ echo "Creating the user nvidia:"
+ useradd -u 365 -g 365 -c "Nvidia" -d /dev/null -s /bin/false nvidia || exit 1
+fi
+
+EOF
+fi
+
+# Flag multlib as needed and build package.
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/nvidia-legacy470-driver/nvidia-legacy470-driver.info b/system/nvidia-legacy470-driver/nvidia-legacy470-driver.info
new file mode 100644
index 0000000000..25b86cc296
--- /dev/null
+++ b/system/nvidia-legacy470-driver/nvidia-legacy470-driver.info
@@ -0,0 +1,20 @@
+PRGNAM="nvidia-legacy470-driver"
+VERSION="470.103.01"
+HOMEPAGE="http://www.nvidia.com"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/470.103.01/NVIDIA-Linux-x86_64-470.103.01.run \
+ https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-470.103.01.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-470.103.01.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-470.103.01.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-470.103.01.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-470.103.01.tar.bz2"
+MD5SUM_x86_64="f4ea68e482f51f7b358c8bec6162c27a \
+ f8c30b5d2a83880c4235ca867c48f92f \
+ 3eb0e1857afb7958e90d6650d1a79a03 \
+ 1c90761474340fe8db6276ff1bf5f091 \
+ e8aed4ba86c301c0773420b187dfe82d \
+ 6efff0f5fbe83b1b969c6c9bcce36204"
+REQUIRES="nvidia-legacy470-kernel"
+MAINTAINER="Lenard Spencer"
+EMAIL="lenardrspencer@gmail.com"
diff --git a/system/nvidia-legacy470-driver/rc.nvidia-persistenced b/system/nvidia-legacy470-driver/rc.nvidia-persistenced
new file mode 100644
index 0000000000..59bdf18d11
--- /dev/null
+++ b/system/nvidia-legacy470-driver/rc.nvidia-persistenced
@@ -0,0 +1,61 @@
+#!/bin/sh -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-legacy470-driver/skip_conflict-GPU_detect.patch b/system/nvidia-legacy470-driver/skip_conflict-GPU_detect.patch
new file mode 100644
index 0000000000..a64b671d60
--- /dev/null
+++ b/system/nvidia-legacy470-driver/skip_conflict-GPU_detect.patch
@@ -0,0 +1,47 @@
+diff -uaN command-list.c command-list.c.new
+--- command-list.c 2020-01-29 17:56:11.000000000 -0800
++++ command-list.c.new 2020-03-08 11:24:03.000000000 -0700
+@@ -890,6 +890,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 2020-01-29 17:56:11.000000000 -0800
++++ misc.c.new 2020-03-08 11:42:12.000000000 -0700
+@@ -1153,13 +1153,12 @@
+ }
+
+ if (!install) {
+- ui_warn(op, "The %s module will not be installed. As a result, %s "
+- "will not function with this installation of the NVIDIA "
+- "driver.", optional_modules[i].module_name,
++ ui_warn(op, "The %s module will be installed with no gpu detect. As a result, %s "
++ "will function with this installation of the NVIDIA "
++ "driver, but only if the card is installed", optional_modules[i].module_name,
+ optional_modules[i].optional_module_dependee);
+-
+- remove_kernel_module_from_package(p,
+- optional_modules[i].module_name);
++// remove_kernel_module_from_package(p,
++// optional_modules[i].module_name);
+ }
+ }
+ }
+@@ -2036,7 +2035,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-legacy470-driver/slack-desc b/system/nvidia-legacy470-driver/slack-desc
new file mode 100644
index 0000000000..5abffe7275
--- /dev/null
+++ b/system/nvidia-legacy470-driver/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+nvidia-legacy470-driver: nvidia-legacy470-driver (Proprietary Binary Nvidia Video Driver)
+nvidia-legacy470-driver:
+nvidia-legacy470-driver: This is the proprietary binary video driver from nvidia for
+nvidia-legacy470-driver: the x.org X server. This package does not include the kernel
+nvidia-legacy470-driver: module - it is included in the nvidia-kernel package.
+nvidia-legacy470-driver:
+nvidia-legacy470-driver: See /usr/doc/nvidia-legacy470-driver-PKGVERSION/README.Slackware
+nvidia-legacy470-driver: for more information.
+nvidia-legacy470-driver:
+nvidia-legacy470-driver: https://www.nvidia.com
+nvidia-legacy470-driver: