diff options
Diffstat (limited to 'system/nvidia-driver')
-rw-r--r-- | system/nvidia-driver/README | 59 | ||||
-rw-r--r-- | system/nvidia-driver/nvidia-driver.SlackBuild | 168 | ||||
-rw-r--r-- | system/nvidia-driver/nvidia-driver.info | 28 | ||||
-rw-r--r-- | system/nvidia-driver/nvidia-switch | 125 | ||||
-rw-r--r-- | system/nvidia-driver/rc.nvidia-persistenced | 2 | ||||
-rw-r--r-- | system/nvidia-driver/skip_conflict-GPU_detect.patch | 47 | ||||
-rw-r--r-- | system/nvidia-driver/slack-desc | 2 |
7 files changed, 110 insertions, 321 deletions
diff --git a/system/nvidia-driver/README b/system/nvidia-driver/README index 9f87edbdff..bf4903ba11 100644 --- a/system/nvidia-driver/README +++ b/system/nvidia-driver/README @@ -1,24 +1,20 @@ 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 +X-server. This package does not include the kernel-module - it is a part of the nvidia-kernel package at SlackBuilds.org. -NOTE: This driver is 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: - COMPAT32="yes" ./nvidia-driver.SlackBuild - -If you plan to test this buildscript on current/15.0, do: - CURRENT="yes" ./nvidia-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. + COMPAT32="yes" ./nvidia-driver.SlackBuild -This script now gives the option of installing the nvidia-persitenced -daemon. For details, see README.nvidia-persitenced. +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 @@ -26,42 +22,17 @@ 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 for nvidia-persistenced to work): +/etc/rc.d/rc.local: +(This is REQUIRED if you plan on running nvidia-persistenced) # Create missing nvidia device nodes after reboot - if [ -x /usr/bin/nvidia-modprobe ]; then - /usr/bin/nvidia-modprobe -c 0 -u - fi + /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. As of version 450.xx, Nvidia no longer includes libGL.la in their - distribution package. On 14.2 ONLY, nvidia-switch saves these - files to /var/log/nvidia/{32,64}: - - libGL{,ESv1_CM,ESv2}.la - libGL.so.1.2.0 - libGLESv1_cm.so.1.1.0 - libGLESv2.so.2.0.0 - - It then modifies the .la files in /usr/lib{,64} to point to the - nvidia versions of these libraries. If you want to revert back to - the open source drivers, run 'nvidia-switch --remove' to restore - the original mesa libraries, then 'removepkg nvidia-driver' - "should" work in most cases. If you forget to run - nvidia-switch --remove, just copy the original files saved in - /var/log/nvidia/{32,64} back to /usr/lib{,64} (don't forget to run - /sbin/ldconfig). (THIS STEP IS NOT NECESSARY ON CURRENT.) - -4. (IMPORTANT ON 14.2) When it comes time to remove this package with - 'removepkg' (or just about any other package for that matter), you - MUST run '/sbin/ldconfig' to restore any symlinks. This is due to - removepkg not running ldconfig after removing a package. - (This has been added to current/15.0.) +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/nvidia-driver.SlackBuild b/system/nvidia-driver/nvidia-driver.SlackBuild index d3f94e08e5..62f2d75100 100644 --- a/system/nvidia-driver/nvidia-driver.SlackBuild +++ b/system/nvidia-driver/nvidia-driver.SlackBuild @@ -1,9 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for nvidia-driver # Copyright 2012-2019 Edward W. Koenig, Vancouver, WA, US -# Copyright 2020 Lenard Spencer, Orlando, FL, USA +# Copyright 2020-2023 Lenard Spencer, Orlando, FL, USA # # All rights reserved. # @@ -24,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:-460.56} +VERSION=${VERSION:-550.76} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} - -CURRENT=${CURRENT:-no} +PKGTYPE=${PKGTYPE:-tgz} set -e @@ -43,7 +42,6 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -59,12 +57,26 @@ else 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 +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} @@ -74,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/etc/X11/glvnd/egl_vendor.d $PKG/var/log if [ "$COMPAT32" = "yes" ]; then mkdir -p $PKG/usr/lib/tls @@ -104,11 +115,16 @@ find -L . \ # 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 -# 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 . \ @@ -128,14 +144,15 @@ cd - # 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 -if [ "${COMPAT32}" = "yes" ]; then +if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then COMP32="--install-compat32-libs --compat32-prefix=$PKG/usr" - MULTI="_multilib" else - COMP32="--no-install-compat32-libs" - MULTI="" + if [ ! "$ARCH" = "x86_64" ]; then + COMP32="" + else + COMP32="--no-install-compat32-libs" + fi fi # Install the binary libs using nvidia-installer compiled above @@ -156,44 +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 \ + --no-install-libglvnd \ + --no-wine-files \ + --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 -# 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 +# 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 -# just in case any other programs make an entry here -if [ -z "$(ls -A /etc/vulkan)" ]; then - rm -rf /etc/vulkan -fi - -if [ "$CURRENT" = "yes" ]; then -# libOpenCL.so is now included in current (in ocl-icd), +# 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 -else -# Bash script to cleanly install (in doinst.sh) and uninstall the nvidia -# files so we don't stomp on any overlapping xorg files. -# Note: switching can be problematic ;-) - mkdir -p $PKG/var/log/nvidia/{32,64} - 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 [ ${COMPAT32} = "yes" ]; then - sed -i s/LIB32FLAG/yes/g $PKG/usr/sbin/nvidia-switch - else - sed -i s/LIB32FLAG/no/g $PKG/usr/sbin/nvidia-switch - fi +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 @@ -261,7 +275,9 @@ 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 +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 handle that in nvidia-kernel rm -rf $PKG/etc/X11/xorg.conf.d @@ -285,12 +301,7 @@ 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: +# Add nvidia-persistenced: if [ "${PERSISTENCED:-no}" = "yes" ]; then cd $TMP rm -rf nvidia-persistenced-$VERSION.tar.bz2 @@ -307,34 +318,13 @@ if [ "${PERSISTENCED:-no}" = "yes" ]; then 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 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 - 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 + chown nvidia:nvidia $PKG/var/run/nvidia-persistenced fi -# Flag multlib as needed and build package. +# 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 2451c05bf0..1c4648cef1 100644 --- a/system/nvidia-driver/nvidia-driver.info +++ b/system/nvidia-driver/nvidia-driver.info @@ -1,20 +1,20 @@ PRGNAM="nvidia-driver" -VERSION="460.56" -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/460.56/NVIDIA-Linux-x86_64-460.56.run \ - https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-460.56.tar.bz2 \ - https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-460.56.tar.bz2 \ - https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-460.56.tar.bz2 \ - https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-460.56.tar.bz2 \ - https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-460.56.tar.bz2" -MD5SUM_x86_64="5851075ac80f5b5f0415ef5e31327e51 \ - 9cc0fd1069f22f2caf5f9b7200025f45 \ - 6ad183a5a2497eb588247a6b4da76377 \ - 9ed0dab4e34f81b6b49095fa751c0b37 \ - 0cb0e4639168b099869f5650dea04729 \ - 7447b3c157c294bf8f547eb1657c5078" +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="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 9196cf7b8a..0000000000 --- a/system/nvidia-driver/nvidia-switch +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/sh - -# Copyright 2012-2019 Edward W. Koenig, Vancouver, WA, USA -# Copyright 2020 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. -# -# nvidia-switch utility 4.7.2 -# -# A tool to install and cleanly remove the nvidia driver without stomping -# on the mesa files. Note: this tool "should" allow switching on the fly, -# but why? Pick a driver! You will stilll need to edit a bunch of other -# config files. - -# When ROOT=<PATH> is specified when using {install,upgrade,remove}pkg, -# PATH is usually specified without a trailing "/", so we need to add it -if [ "$ROOT" = "" ]; then - ROOT="${ROOT:-"/"}" -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" - -save_GL(){ -# backup original mesa conflicts - cd $2 - case "$1" in - "nvidia") - cp libGL{,ES*}.la /var/log/nvidia/$3 - mv libGL{.so.1.2.0,ESv1_CM.so.1.1.0,ESv2.so.2.0.0} /var/log/nvidia/$3 - sed -i s/1.2.0/1.7.0/g libGL.la - sed -i s/1.1.0/1.2.0/g libGLESv1_CM.la - sed -i s/2.0.0/2.1.0/g libGLESv2.la - ;; - - "xorg") - mv /var/log/nvidia/$3/* . - ;; - - *) - echo "nothing to do for save_gl?" - exit 1 - ;; - esac - cd "$CWD" -} - -nvidia_install(){ - echo $'Installing to nvidia-driver files!\n' - echo "Make sure the nvidia driver is ENABLED in /etc/X11/xorg.conf" - echo "and/or in either /usr/share/X11/xorg.conf.d or" - echo "/etc/X11/xorg.conf.d. Otherwise, this may lead to improperly" - echo -e "working drivers.\n" - - if [ "$LIBSUFFIX" = "64" ]; then - save_GL "nvidia" $LIB "64" - # Check for multilib configuration - if [ "$COMPAT32" = "yes" ]; then - save_GL "nvidia" $LIB32 "32" - fi - else - save_GL "nvidia" $LIB "32" - fi -} - -nvidia_remove(){ - echo $'Returning to stock xorg files!\n' - echo "Make sure the nvidia driver is DISABLED in /etc/X11/xorg.conf" - echo "and in /usr/share/X11/xorg.conf.d and /etc/X11/xorg.conf.d." - echo "Otherwise, this may lead to improperly working drivers." - echo -e "\nPLEASE run /sbin/ldconfing after removing nvidia-driver.\n" - - if [ "$LIBSUFFIX" = "64" ]; then - save_GL "xorg" $LIB "64" - # Check for multilib configuration - if [ "$COMPAT32" = "yes" ]; then - save_GL "xorg" $LIB32 "32" - fi - else - save_GL "xorg" $LIB "32" - fi -} - -usage(){ - echo "Usage:" - echo " --install Set up nvidia driver files and update symlinks" - echo " --remove Return to stock xorg files and restore 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 index 59bdf18d11..b95480a4e0 100644 --- a/system/nvidia-driver/rc.nvidia-persistenced +++ b/system/nvidia-driver/rc.nvidia-persistenced @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/bash -e # # NVIDIA Persistence Daemon Init Script # 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 a64b671d60..0000000000 --- a/system/nvidia-driver/skip_conflict-GPU_detect.patch +++ /dev/null @@ -1,47 +0,0 @@ -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-driver/slack-desc b/system/nvidia-driver/slack-desc index 165da72937..7b63dee80e 100644 --- a/system/nvidia-driver/slack-desc +++ b/system/nvidia-driver/slack-desc @@ -16,4 +16,4 @@ nvidia-driver: See /usr/doc/nvidia-driver-PKGVERSION/README.Slackware nvidia-driver: for more information. nvidia-driver: nvidia-driver: https://www.nvidia.com -nvidia-driver: @MULTILIB@ +nvidia-driver: |