aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorLenard Spencer <lenardrspencer@gmail.com>2021-05-10 20:09:20 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-05-17 08:49:45 +0700
commit850efa92bfdd4c27cdd5abd001a5bc429d700aa1 (patch)
tree0856499ff9d9a10da7d412aed7b31de9c4c1c91c /system
parentd031160eb3e0ac66748a5f6860382618818d7140 (diff)
system/nvidia-legacy390-driver: Updated for version 390.143.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/nvidia-legacy390-driver/README74
-rw-r--r--system/nvidia-legacy390-driver/README.nvidia-persistenced13
-rw-r--r--system/nvidia-legacy390-driver/douninst.sh14
-rw-r--r--system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch36
-rw-r--r--system/nvidia-legacy390-driver/nvidia-legacy390-driver.SlackBuild107
-rw-r--r--system/nvidia-legacy390-driver/nvidia-legacy390-driver.info50
-rw-r--r--system/nvidia-legacy390-driver/nvidia-switch83
-rw-r--r--system/nvidia-legacy390-driver/slack-desc2
8 files changed, 135 insertions, 244 deletions
diff --git a/system/nvidia-legacy390-driver/README b/system/nvidia-legacy390-driver/README
index 56e253398f158..bfdeabac4caa8 100644
--- a/system/nvidia-legacy390-driver/README
+++ b/system/nvidia-legacy390-driver/README
@@ -1,29 +1,17 @@
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-legacy390-kernel package at SlackBuilds.org.
+X-server. This package does not include the kernel module - it is a
+part of the nvidia-legacy390-kernel package at SlackBuilds.org.
-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-legacy390-driver.SlackBuild
-If you plan to test this buildscript on current/15.0, do:
-
- CURRENT="yes" ./nvidia-legacy390-driver.SlackBuild
-
-This avoids stomping on the libglvnd libraries, plus it forces the
-script to use the prebuilt nvidia-installer since it no longer builds
-in current. As a consequence, this script may no longer work in a VM.
-
-If you build and install this driver on current WITHOUT using the
-CURRENT="yes" flag, it will corrupt both xorg-server AND libglvnd, so
-after removing the driver both packages will have to be reinstalled.
-
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.
+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
@@ -33,17 +21,6 @@ properly)
# Create missing nvidia device nodes after reboot
/usr/bin/nvidia-modprobe -c 0 -u
-Included is a script called nvidia-switch, which is used to switch
-between the xorg and nvidia drivers, but it will not edit xorg.conf for
-you; you have to do that manually. The nvidia-switch script is
-installed to /usr/sbin.
-
-Usage of nvidia-switch:
- nvidia-switch --install <--> save the stock xorg files and
- install the nvidia files and symlinks.
- nvidia-switch --remove <--> remove the nvidia files and symlinks and
- restore the stock xorg files.
-
NOTES:
Since nvidia-legacy390-driver conflicts with some files of xorg, it's a
bit complex to install/uninstall the driver. However, installation of
@@ -51,22 +28,23 @@ the nvidia-legacy390-driver package backs up the conflicting files and
puts the nvidia-specific files into place by automatically running
nvidia-switch --install in doinst.sh.
-Before uninstalling or upgrading this package, it is IMPORTANT that
-you execute 'nvidia-switch --remove', which will switch back to the
-stock xorg files and remove all links created by nvidia-switch during
-installation. If you forget to do this, you might have to do the switch
-manually, since 'nvidia-switch --install' may fail, resulting in xorg
-not working. Here are the affected files (and their packages):
-
- /usr/lib[64]/libGL.so.1.2 (mesa)
- /usr/lib[64]/libGL.la (mesa)
- /usr/lib[64]/libGLESv1_CM.so.1.0.0 (mesa)
- /usr/lib[64]/libGLESv2.so.2.0.0 (mesa)
- /usr/lib[64]/libEGL.so.1.0.0 (mesa)
- /usr/lib[64]/xorg/modules/libwfb.so (xorg-server)
- /usr/lib[64]/xorg/modules/extensions/libglx.so (xorg-server)
-
-Simply remove the dead nvidia symlinks and and reinstall the mesa and
-xorg-server packages. (In current, if libglx.so is a dead symlink,
-it MUST be removed before reinstalling xorg-server.)
+NEW! This package now includes a douninst.sh script, so it is no
+longer necessary to run nvidia-switch --remove before uninstalling or
+upgrading. However, nvidia-switch is still included for use when
+xorg-server is upgraded. Usage of nvidia-switch:
+ nvidia-switch --install <--> save the stock xorg files and
+ install the nvidia symlinks.
+ nvidia-switch --remove <--> remove the nvidia symlinks
+ and restore the stock xorg files.
+The affected files are:
+/usr/lib[64]/xorg/modules/extensions/libglx.so (xorg-server)
+/usr/lib[64]/xorg/modules/libnvidia-wfb.so.1 (nvidia-specific symlink)
+
+If you forget to run nvidia-switch --remove before upgrading
+xorg-server, all you need to do is run nvidia-switch --install and all
+should be well.
+
+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.
diff --git a/system/nvidia-legacy390-driver/README.nvidia-persistenced b/system/nvidia-legacy390-driver/README.nvidia-persistenced
index 38e8937cdee20..8bdb77aa5f2d8 100644
--- a/system/nvidia-legacy390-driver/README.nvidia-persistenced
+++ b/system/nvidia-legacy390-driver/README.nvidia-persistenced
@@ -1,12 +1,12 @@
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
+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.
+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.
@@ -18,7 +18,8 @@ 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.
+and then 'chmod +x /etc/rc.d/rc.nvidia-persistenced' to make it
+executable.
Add the following to /etc/rc.d/rc.local_shutdown:
diff --git a/system/nvidia-legacy390-driver/douninst.sh b/system/nvidia-legacy390-driver/douninst.sh
new file mode 100644
index 0000000000000..d9c58a7dc2263
--- /dev/null
+++ b/system/nvidia-legacy390-driver/douninst.sh
@@ -0,0 +1,14 @@
+( cd usr/libSUFFIX/xorg/modules/extensions
+ if [ -e libglx.so-xorg ]; then
+ mv libglx.so-xorg libglx.so
+ else
+ if [ ! -e libglx.so ]; then
+ echo -e "WARNING: libglx.so not found! Please reinstall xorg-server!\n"
+ fi
+ fi
+ )
+echo "The Nvidia legacy390 driver is removed. Make sure the Nvidia driver is"
+echo "DISABLED in /etc/X11/xorg.conf as well as /etc/X11/xorg.conf.d/ and"
+echo "/usr/share/X11/xorg.conf.d/. Otherwise, this may lead to improperly"
+echo -e "working drivers.\n"
+
diff --git a/system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch b/system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch
new file mode 100644
index 0000000000000..7b230fcb11d38
--- /dev/null
+++ b/system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch
@@ -0,0 +1,36 @@
+diff -Naur nvidia-installer-460.67.orig/kernel.c nvidia-installer-460.67/kernel.c
+--- nvidia-installer-460.67.orig/kernel.c 2021-03-10 19:24:00.000000000 -0500
++++ nvidia-installer-460.67/kernel.c 2021-04-16 17:59:48.828574898 -0400
+@@ -23,7 +23,10 @@
+ #include <sys/utsname.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <sys/sysctl.h>
++#include <gnu/libc-version.h>
++#if __GLIBC__ == 2 && __GLIBC_MINOR__ <= 30
++ #include <sys/sysctl.h>
++#endif
+ #include <ctype.h>
+ #include <stdlib.h>
+ #include <dirent.h>
+@@ -1076,7 +1079,8 @@
+ }
+
+ if (!loglevel_set) {
+- /*
++#if __GLIBC__ == 2 && __GLIBC_MINOR__ <= 30
++ /*
+ * Explicitly initialize the value of len, even though it looks like the
+ * syscall should do that, since in practice it doesn't always actually
+ * set the value of the pointed-to length parameter.
+@@ -1090,6 +1094,10 @@
+ loglevel_set = TRUE;
+ }
+ }
++#else /* sys/sysctl.h has been removed from glibc 2.32 and later */
++ if (!old_level)
++ loglevel_set = TRUE;
++#endif
+ }
+
+ return loglevel_set;
diff --git a/system/nvidia-legacy390-driver/nvidia-legacy390-driver.SlackBuild b/system/nvidia-legacy390-driver/nvidia-legacy390-driver.SlackBuild
index 5e7b6ea665f0e..325a08d19b997 100644
--- a/system/nvidia-legacy390-driver/nvidia-legacy390-driver.SlackBuild
+++ b/system/nvidia-legacy390-driver/nvidia-legacy390-driver.SlackBuild
@@ -26,12 +26,10 @@
# see changelog.txt
PRGNAM=nvidia-legacy390-driver
-VERSION=${VERSION:-390.141}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-390.143}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
-CURRENT=${CURRENT:-no}
-
set -e
if [ -z "$ARCH" ]; then
@@ -108,9 +106,12 @@ find -L . \
\( -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
-if [ "$CURRENT" = "no" ]; then
- cd $TMP/nvidia-installer-$VERSION
+cd $TMP/nvidia-installer-$VERSION
+
+# First, patch for the removed sys/sysctl.h:
+ patch -p1 < $CWD/nvidia-installer-removed-sysctl-h.patch
# Let's try to remove the conflicting files and GPU detection
patch -p0 < $CWD/skip_conflict-GPU_detect.patch
@@ -127,13 +128,12 @@ if [ "$CURRENT" = "no" ]; then
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 -
+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
-fi
+mv -f $PKG/usr/bin/nvidia-installer $TMP/$SRCNAM
+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"
@@ -172,15 +172,6 @@ cd $TMP/$SRCNAM
# 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
-# In current, mesa now puts an entry into this directory, so we
-# leave it alone if it is not empty
-if [ -z "$(ls -A /etc/OpenCL/vendors)" ]; then
- rm -rf /etc/OpenCL
-fi
-# just in case any other programs make an entry here
-if [ -z "$(ls -A /etc/vulkan)" ]; then
- rm -rf /etc/vulkan
-fi
# Compile utilites from source, replacing the precompiled versions
#
@@ -253,13 +244,6 @@ mkdir -p $PKG/usr/sbin
install -m 0755 $CWD/nvidia-switch $PKG/usr/sbin/
sed -i s/PKGVERSION/$VERSION/g $PKG/usr/sbin/nvidia-switch
sed -i s/LIBDIRSUFFIX/$LIBDIRSUFFIX/g $PKG/usr/sbin/nvidia-switch
-if [ "$CURRENT" = "no" ]; then
- sed -i s/GLVNDFLAG/yes/g $PKG/usr/sbin/nvidia-switch
- sed -i s/GLVERSION/1.2.0/g $PKG/usr/sbin/nvidia-switch
-else
- sed -i s/GLVNDFLAG/no/g $PKG/usr/sbin/nvidia-switch
- sed -i s/GLVERSION/1.7.0/g $PKG/usr/sbin/nvidia-switch
-fi
if [ ${COMPAT32} = "yes" ]; then
sed -i s/LIB32FLAG/yes/g $PKG/usr/sbin/nvidia-switch
else
@@ -267,62 +251,25 @@ else
fi
# These add or correct wrong paths
-if [ "$CURRENT" = "no" ]; then
- sed -i "s|$TMP/package-$PRGNAM/usr|/usr|" $PKG/usr/lib$LIBDIRSUFFIX/libGL.la
- sed -i "s|/usr/X11R6/lib|/usr/lib$LIBDIRSUFFIX|" $PKG/usr/lib$LIBDIRSUFFIX/libGL.la
-
- if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
- sed -i "s|$TMP/package-$PRGNAM/usr|/usr|" $PKG/usr/lib/libGL.la
- sed -i "s|/usr/X11R6/lib|/usr/lib|" $PKG/usr/lib/libGL.la
- sed -i "s|'/usr/'|'/usr/lib'|" $PKG/usr/lib/libGL.la
- fi
-fi
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
# rename wrong/conficting files as needed; remove conflicting symlinks created by installer
cd $PKG/usr/lib$LIBDIRSUFFIX
- if [ "$CURRENT" = "no" ]; then
- mv libEGL.so.1.1.0 libEGL.so.1.1.0-nvidia
- mv libGL.la libGL.la-nvidia
- mv libGL.so.1.7.0 libGL.so.1.7.0-nvidia
- mv libGLESv1_CM.so.1.2.0 libGLESv1_CM.so.1.2.0-nvidia
- mv libGLESv2.so.2.1.0 libGLESv2.so.2.1.0-nvidia
- rm -f libEGL.so
- rm -f libGL.so
- rm -f libGL.so.1
- rm -f libGLESv1_CM.so
- rm -f libGLESv2.so
- else
- rm libGL.la
- rm libOpenCL.so.1.0.0
- fi
- rm -f xorg/modules/libwfb.so
- if [ -e xorg/modules/extensions/libglx.so ]; then
- (cd xorg/modules/extensions
- rm libglx.so
- )
- fi
+ rm libGL.la
+ rm libOpenCL.so.1.0.0
+ rm -f xorg/modules/libwfb.so
+ if [ -e xorg/modules/extensions/libglx.so ]; then
+ rm -f xorg/modules/extionsions/libglx.so
+ fi
cd -
if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
- cd $PKG/usr/lib
- if [ "$CURRENT" = "no" ]; then
- mv libEGL.so.1.1.0 libEGL.so.1.1.0-nvidia
- mv libGL.la libGL.la-nvidia
- mv libGLESv1_CM.so.1.2.0 libGLESv1_CM.so.1.2.0-nvidia
- mv libGLESv2.so.2.1.0 libGLESv2.so.2.1.0-nvidia
- rm -f libEGL.so
- rm -f libGL.so
- rm -f libGL.so.1
- rm -f libGLESv1_CM.so
- rm -f libGLESv2.so
- else
- rm libGL.la
- rm libOpenCL.so.1.0.0
- fi
- cd -
+ cd $PKG/usr/lib
+ rm libGL.la
+ rm libOpenCL.so.1.0.0
+ cd -
# FIXME With COMPAT32=yes on pure x86_64, a weird /usr/lib/libGL.so.1
# symlink to $PKG/usr/lib64/libGL.so.1 appears? Who would do this,
# so ignoring for now.
@@ -331,14 +278,6 @@ fi
# Remove xorg conf file since we handle that in nvidia-legacy390-kernel
rm -rf $PKG/etc/X11/xorg.conf.d
-if [ "$CURRENT" = "no" ]; then
- mkdir -p $PKG/var/log/nvidia/{32,64}
- cat <<EOF > $PKG/var/log/nvidia/README.txt
-Do NOT delete this directory!
-nvidia-switch will backup the original X.org libraries here.
-EOF
-fi
-
cd $TMP/$SRCNAM
# put docs in the right place
mv $PKG/usr/share/man/man1/nvidia-* $PKG/usr/man/man1
@@ -352,13 +291,15 @@ 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|@MULTILIB@|This package includes the 32-bit compatibility libraries.|" $PKG/install/slack-desc
+ sed -i "s|@MULTILIB@| This package includes the 32-bit compatibility libraries.|" $PKG/install/slack-desc
else
sed -i "s|@MULTILIB@||" $PKG/install/slack-desc
fi
cat $CWD/doinst.sh > $PKG/install/doinst.sh
+# Add new douninst.sh script:
+sed "s/SUFFIX/$LIBDIRSUFFIX/g" $CWD/douninst.sh > $PKG/install/douninst.sh
# Add rc.nvidia-persistenced:
if [ "${PERSISTENCED:-no}" = "yes" ]; then
cd $TMP
@@ -373,7 +314,7 @@ if [ "${PERSISTENCED:-no}" = "yes" ]; then
\( -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 -I/usr/include/tirpc -Wl,-ltirpc" make
+ 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/
diff --git a/system/nvidia-legacy390-driver/nvidia-legacy390-driver.info b/system/nvidia-legacy390-driver/nvidia-legacy390-driver.info
index 110f8ab193128..b314520d533c2 100644
--- a/system/nvidia-legacy390-driver/nvidia-legacy390-driver.info
+++ b/system/nvidia-legacy390-driver/nvidia-legacy390-driver.info
@@ -1,30 +1,30 @@
PRGNAM="nvidia-legacy390-driver"
-VERSION="390.141"
+VERSION="390.143"
HOMEPAGE="http://www.nvidia.com"
-DOWNLOAD="https://download.nvidia.com/XFree86/Linux-x86/390.141/NVIDIA-Linux-x86-390.141.run \
- https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-390.141.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-390.141.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-390.141.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-390.141.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-390.141.tar.bz2"
-MD5SUM="f3e6660ffe5338b17b7e643d0eceb57e \
- ff1c359809225ac9fc3562a16bc302bd \
- baa8df62e2449ec6dd55c3d27cf23490 \
- 24c4e151626dc920525966d4bd3a2dbd \
- 61be9b85fd9b2198cdbc555a3625d39b \
- 94c281d2704d87809176e3084102bfee"
-DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/390.141/NVIDIA-Linux-x86_64-390.141.run \
- https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-390.141.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-390.141.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-390.141.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-390.141.tar.bz2 \
- https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-390.141.tar.bz2"
-MD5SUM_x86_64="0c7fc061349bbb2f0d7e26af9f1b082a \
- ff1c359809225ac9fc3562a16bc302bd \
- baa8df62e2449ec6dd55c3d27cf23490 \
- 24c4e151626dc920525966d4bd3a2dbd \
- 61be9b85fd9b2198cdbc555a3625d39b \
- 94c281d2704d87809176e3084102bfee"
+DOWNLOAD="https://download.nvidia.com/XFree86/Linux-x86/390.143/NVIDIA-Linux-x86-390.143.run \
+ https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-390.143.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-390.143.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-390.143.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-390.143.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-390.143.tar.bz2"
+MD5SUM="7b5704f3c89223d5ecb4f26ca9463c26 \
+ def90705f245c17a93303a863ee591ab \
+ 5ee49194c37c97d81cddc34068d8f723 \
+ 1c897a24ea263abd89f23504632ac842 \
+ 6adc329cd15cdb88587190330a91e098 \
+ dcfdf003fd33372698eb4be07f65f1af"
+DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/390.143/NVIDIA-Linux-x86_64-390.143.run \
+ https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-390.143.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-390.143.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-390.143.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-390.143.tar.bz2 \
+ https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-390.143.tar.bz2"
+MD5SUM_x86_64="1b526fa9567a09eb1e18545f675c8f82 \
+ def90705f245c17a93303a863ee591ab \
+ 5ee49194c37c97d81cddc34068d8f723 \
+ 1c897a24ea263abd89f23504632ac842 \
+ 6adc329cd15cdb88587190330a91e098 \
+ dcfdf003fd33372698eb4be07f65f1af"
REQUIRES="nvidia-legacy390-kernel"
MAINTAINER="Lenard Spencer"
EMAIL="lenardrspencer@gmail.com"
diff --git a/system/nvidia-legacy390-driver/nvidia-switch b/system/nvidia-legacy390-driver/nvidia-switch
index 5ea8a5c1c8c64..2e71e3b75b542 100644
--- a/system/nvidia-legacy390-driver/nvidia-switch
+++ b/system/nvidia-legacy390-driver/nvidia-switch
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 2012-2017 Edward W. Koenig, Vancouver, WA, USA
-# Updates copyright 2020 Lenard Spencer, Orlando, FL, USA
+# Updates copyright 2020, 2021 Lenard Spencer, Orlando, FL, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,7 +26,7 @@
# 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.
+# of other config files.
# TO-DO: needs more cleanup, simplify linking using system tools
@@ -39,72 +39,11 @@ else
ROOT="${ROOT}/"
fi
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="GLVERSION"
-GLVND="GLVNDFLAG" # This will be replaced in the build script (yes | no)
-SAVELIBS="${ROOT}var/log/nvidia"
-
-save_GL(){
-# backup original mesa and xorg conflicts to /var/log/nvidia
- cd $2
- # Need to make sure save path is reset incase of multilib
- SAVELIBS="${ROOT}var/log/nvidia"
- if [ "$2" = "$LIB32" ]; then
- SAVELIBS="${SAVELIBS}/32"
- elif [ "$2" = "$LIB" ]; then
- SAVELIBS="${SAVELIBS}/64"
- fi
-
- case "$1" in
- "nvidia")
-
- if [ "$GLVND" = "yes" ]; then
- mv libGL.so.$GL_VERSION $SAVELIBS
- mv libEGL.so.1.?.0 $SAVELIBS
- mv libGLESv1_CM.so.1.1.0 $SAVELIBS
- mv libGLESv2.so.2.0.0 $SAVELIBS
- ln -sf libGL.so.1.7.0-nvidia libGL.so.1
- ln -sf libGL.so.1 libGL.so
- ln -sf libEGL.so.1.1.0-nvidia libEGL.so.1.1.0
- ln -sf libEGL.so.1 libEGL.so
- ln -sf libGLESv1_CM.so.1.2.0-nvidia libGLESv1_CM.libGLESv1_CM.so.1
- ln -sf libGLESv1_CM.so.1 libGLESv1_CM.so
- ln -sf libGLESv2.so.2.1.0-nvidia libGLESv2.so.2
- ln -sf libGLESv2.so.2 libGLESv2.so
- fi
- ;;
-
- "xorg")
- if [ -e libGL.la ]; then
- mv libGL.la libGL.la-nvidia
- fi
- if [ "$GLVND" = "yes" ]; then
- mv $SAVELIBS/* .
- ln -sf libGL.so.$GL_VERSION libGL.so.1
- ln -sf libGL.so.1 libGL.so
- ln -sf libEGL.so.1.0.0 libEGL.so.1
- ln -sf libEGL.so.1 libEGL.so
- ln -sf libGLESv1_CM.so.1.1.0 libGLESv1_CM.so.1
- ln -sf libGLESv1_CM.so.1.1.0 libGLESv1_CM.so
- ln -sf libGLESv2.so.2.0.0 libGLESv2.so.2
- ln -sf libGLESv2.so.2.0.0 libGLESv2.so
- fi
- ;;
-
- *)
- echo "nothing to do for save_gl?"
- exit 1
- ;;
- esac
- cd "$CWD"
-}
save_glx(){
cd "$XLIB"
@@ -150,22 +89,13 @@ save_wfb(){
}
nvidia_install(){
- if [ ! -d $SAVELIBS ]; then
- echo "Creating missing $SAVELIB ..."
- mkdir -p $SAVELIBS
- fi
echo $'Installing to nvidia-legacy390-driver files:\n'
echo "Make sure the nvidia driver is ENABLED in /etc/X11/xorg.conf"
echo "and in /etc/X11/xorg.conf.d. Otherwise, this may lead to"
echo -e "improperly working drivers.\n"
save_glx "nvidia"
- save_GL "nvidia" $LIB
save_wfb "nvidia"
-# Check for multilib configuration
- if [ "$COMPAT32" = "yes" ]; then
- save_GL "nvidia" $LIB32
- fi
}
nvidia_remove(){
@@ -173,17 +103,8 @@ nvidia_remove(){
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 -e "Otherwise, this may lead to improperly working drivers.\n"
- if [ "$GLVND" = "yes" ]; then
- echo -e "Be sure to run /sbin/ldconfig after removing nvidia-legacy390-driver.\n"
- fi
save_glx "xorg"
- save_GL "xorg" $LIB
save_wfb "xorg"
-
-# Check for multilib configuration
- if [ "$COMPAT32" = "yes" ]; then
- save_GL "xorg" $LIB32
- fi
}
if [ "$LIBSUFFIX" = "64" ]; then
diff --git a/system/nvidia-legacy390-driver/slack-desc b/system/nvidia-legacy390-driver/slack-desc
index 74666d37f01a9..492676344824f 100644
--- a/system/nvidia-legacy390-driver/slack-desc
+++ b/system/nvidia-legacy390-driver/slack-desc
@@ -15,5 +15,5 @@ nvidia-legacy390-driver:
nvidia-legacy390-driver: See /usr/doc/nvidia-legacy390-driver-PKGVERSION/README.Slackware
nvidia-legacy390-driver: for more information.
nvidia-legacy390-driver:
-nvidia-legacy390-driver: @MULTILIB@
+nvidia-legacy390-driver:@MULTILIB@
nvidia-legacy390-driver: