diff options
-rw-r--r-- | system/nvidia-driver/README | 9 | ||||
-rw-r--r-- | system/nvidia-driver/README.nvidia-persistenced | 7 | ||||
-rw-r--r-- | system/nvidia-driver/nvidia-driver.SlackBuild | 30 | ||||
-rw-r--r-- | system/nvidia-driver/nvidia-driver.info | 26 | ||||
-rw-r--r-- | system/nvidia-driver/nvidia-switch | 11 | ||||
-rw-r--r-- | system/nvidia-driver/rc.nvidia-persistenced | 19 |
6 files changed, 50 insertions, 52 deletions
diff --git a/system/nvidia-driver/README b/system/nvidia-driver/README index e941e818f7..d56d2733cd 100644 --- a/system/nvidia-driver/README +++ b/system/nvidia-driver/README @@ -12,8 +12,8 @@ If you plan to test this buildscript on current (15.0 EXPERIMENTAL), to avoid stomping on the installed libglvnd, do: CURRENT="yes" ./nvidia-driver.SlackBuild -This script now installs the nvidia-persitenced daemon. For details, see -README.nvidia-persitenced. +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 @@ -21,6 +21,7 @@ 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 @@ -35,5 +36,5 @@ Notes: 3. On 14.2 ONLY, if you want to revert back to the open source drivers, run 'nvidia-switch --remove' to restore the original libGL.la and then 'removepkg nvidia-driver' "should" work in most cases. If not, - simply reinstall the orginal Mesa package. (THIS STEP IS NO LONGER - NECESSARY ON CURRENT.) + just go into /usr/lib64 (as root of course) and rename libGL.la-xorg + to libGL.la. (THIS STEP IS NO LONGER NECESSARY ON CURRENT.) diff --git a/system/nvidia-driver/README.nvidia-persistenced b/system/nvidia-driver/README.nvidia-persistenced index ba1825eb86..9b0abc2c73 100644 --- a/system/nvidia-driver/README.nvidia-persistenced +++ b/system/nvidia-driver/README.nvidia-persistenced @@ -1,9 +1,9 @@ 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. Create the nvidia user and group with the following: +run it as user nvidia. - # groupadd -g 365 nvidia - # useradd -u 365 -g 365 -c "Nvidia" -d /dev/null -s /bin/false 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: @@ -24,4 +24,3 @@ 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/nvidia-driver.SlackBuild b/system/nvidia-driver/nvidia-driver.SlackBuild index 97f33d6d6d..48d12a7d5d 100644 --- a/system/nvidia-driver/nvidia-driver.SlackBuild +++ b/system/nvidia-driver/nvidia-driver.SlackBuild @@ -27,8 +27,8 @@ # see changelog.txt PRGNAM=nvidia-driver -VERSION=${VERSION:-440.64} -BUILD=${BUILD:-2} +VERSION=${VERSION:-440.82} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} CURRENT=${CURRENT:-no} @@ -168,6 +168,10 @@ rm -rf /etc/vulkan 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 if [ "$CURRENT" = "yes" ]; then # Don't ship .la files. Also, libOpenCL.so is now included @@ -311,11 +315,21 @@ else fi # Add rc.nvidia-persistenced: -mkdir -p $PKG/var/run/nvidia-persistenced -chown nvidia:nvidia $PKG/var/run/nvidia-persistenced -mkdir -p $PKG/etc/rc.d -cat $CWD/rc.nvidia-persistenced > $PKG/etc/rc.d/rc.nvidia-persistenced -sed -i "s|__USER__|nvidia|" $PKG/etc/rc.d/rc.nvidia-persistenced +if [ "${PERSISTENCED:-no}" = "yes" ]; then + 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 +fi cat $CWD/doinst.sh > $PKG/install/doinst.sh @@ -324,6 +338,6 @@ if [ "$CURRENT" = "no" ]; then echo -e "./usr/sbin/nvidia-switch --install\n" >> $PKG/install/doinst.sh fi -# Flag install as multlib as needed and build package. +# Flag multlib as needed and build package. cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION$MULTI-$TARGET-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/nvidia-driver/nvidia-driver.info b/system/nvidia-driver/nvidia-driver.info index 72426486ff..afaf437f08 100644 --- a/system/nvidia-driver/nvidia-driver.info +++ b/system/nvidia-driver/nvidia-driver.info @@ -1,20 +1,20 @@ PRGNAM="nvidia-driver" -VERSION="440.64" +VERSION="440.82" HOMEPAGE="http://www.nvidia.com" DOWNLOAD="UNSUPPORTED" MD5SUM="" -DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/440.64/NVIDIA-Linux-x86_64-440.64.run \ - https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-440.64.tar.bz2 \ - https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-440.64.tar.bz2 \ - https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-440.64.tar.bz2 \ - https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-440.64.tar.bz2 \ - https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-440.64.tar.bz2" -MD5SUM_x86_64="ba746d5b5f50369139bbed47da04aa74 \ - fbe92127e8d41c54059742f12eb0e347 \ - 2fffb0aca454437534029b935bf65a79 \ - 24c79658da81294c39c1fe22d0fc704e \ - 94b081b77eba7cfd2aa82ffda54cca90 \ - 80a50eb9892588d57cca02b1822cddbd" +DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/440.82/NVIDIA-Linux-x86_64-440.82.run \ + https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-440.82.tar.bz2 \ + https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-440.82.tar.bz2 \ + https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-440.82.tar.bz2 \ + https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-440.82.tar.bz2 \ + https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-440.82.tar.bz2" +MD5SUM_x86_64="80eb4fd64124c5cab0ebf560f84a9bfa \ + de77054e0718af0d164eed7409805d12 \ + 3e70b9d80cae148d86c4173ba3fff1c5 \ + c457dfcfd7c490f087ae09f76352738a \ + cb2f2ae00e623399961a1f9ab276fea0 \ + fefdfa0b14ed6369e319a41e0fb90c79" REQUIRES="nvidia-kernel" MAINTAINER="Lenard Spencer" EMAIL="lenardrspencer@gmail.com" diff --git a/system/nvidia-driver/nvidia-switch b/system/nvidia-driver/nvidia-switch index af2bd17701..0554fa7335 100644 --- a/system/nvidia-driver/nvidia-switch +++ b/system/nvidia-driver/nvidia-switch @@ -47,14 +47,17 @@ save_GL(){ cd $2 case "$1" in "nvidia") - mv libGL.la libGL.la-xorg - mv libGL.la-nvidia libGL.la + if [ ! -e libGL.la-xorg ]; then + mv libGL.la libGL.la-xorg + fi + cp -a libGL.la-nvidia libGL.la /sbin/ldconfig ;; "xorg") - mv libGL.la libGL.la-nvidia - mv libGL.la-xorg libGL.la + if [ -e libGL.la-xorg ]; then + cp -a libGL.la-xorg libGL.la + fi /sbin/ldconfig ;; diff --git a/system/nvidia-driver/rc.nvidia-persistenced b/system/nvidia-driver/rc.nvidia-persistenced index bf53fd9345..59bdf18d11 100644 --- a/system/nvidia-driver/rc.nvidia-persistenced +++ b/system/nvidia-driver/rc.nvidia-persistenced @@ -22,25 +22,6 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # -# This is a sample System V init script, designed to show how the NVIDIA -# Persistence Daemon can be started. -# -# This sample does not rely on any init system functions, to ensure the -# widest portability possible. -# -# chkconfig: 2345 99 01 -# description: Starts and stops the NVIDIA Persistence Daemon -# processname: nvidia-persistenced -# -### BEGIN INIT INFO -# Provides: nvidia-persistenced -# Required-Start: $ALL -# Required-Stop: $ALL -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Description: Starts and stops the NVIDIA Persistence Daemon -### END INIT INFO - NVPD=nvidia-persistenced NVPD_BIN=/usr/bin/${NVPD} |