diff options
Diffstat (limited to 'x11-drivers/nvidia-drivers/files')
11 files changed, 133 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-drivers/files/95-nvidia-settings b/x11-drivers/nvidia-drivers/files/95-nvidia-settings new file mode 100644 index 00000000..e9d62742 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/95-nvidia-settings @@ -0,0 +1,2 @@ +#!/bin/sh +/opt/bin/nvidia-settings --load-config-only diff --git a/x11-drivers/nvidia-drivers/files/95-nvidia-settings-r1 b/x11-drivers/nvidia-drivers/files/95-nvidia-settings-r1 new file mode 100644 index 00000000..48c41d8a --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/95-nvidia-settings-r1 @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/bin/nvidia-settings --load-config-only diff --git a/x11-drivers/nvidia-drivers/files/nvidia-169.07 b/x11-drivers/nvidia-drivers/files/nvidia-169.07 new file mode 100644 index 00000000..a96b0cd1 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-169.07 @@ -0,0 +1,14 @@ +# Nvidia drivers support +alias char-major-195 nvidia +alias /dev/nvidiactl char-major-195 + +# To tweak the driver the following options can be used, note that +# you should be careful, as it could cause instability!! For more +# options see /usr/share/doc/PACKAGE/README +# +# !!! SECURITY WARNING !!! +# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW +# WHAT YOU ARE DOING. +# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH, +# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE. +options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-370.28-profiles-rc.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-370.28-profiles-rc.patch new file mode 100644 index 00000000..cec890b2 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-370.28-profiles-rc.patch @@ -0,0 +1,11 @@ +--- a/nvidia-application-profiles-370.28-rc ++++ b/nvidia-application-profiles-370.28-rc +@@ -44,7 +44,7 @@ + { + "name" : "NamedVertexAttributesApplyDivisor", + "settings" : [ "GL23cd0e", 1 ] +- }, ++ } + ], + "rules" : [ + { diff --git a/x11-drivers/nvidia-drivers/files/nvidia-persistenced.conf b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.conf new file mode 100644 index 00000000..637ac1af --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.conf @@ -0,0 +1,8 @@ +# run-time configuration file for /etc/init.d/nvidia-persistenced + +# NVPD_USER: The user nvidia-persistenced is intended to run for +NVPD_USER="" + +# ARGS: Additional arguments to set the default persistence mode +# (see nvidia-persistenced(1)) +ARGS="" diff --git a/x11-drivers/nvidia-drivers/files/nvidia-persistenced.init b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.init new file mode 100644 index 00000000..98a7cbe2 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.init @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +pidfile="/var/run/nvidia-persistenced/nvidia-persistenced.pid" + +start() { + if ! [ "${NVPD_USER}x" = x ]; then + ebegin "Starting nvidia-persistenced for ${NVPD_USER}" + NVPD_USER_ARG="--user ${NVPD_USER}" + else + ebegin "Starting nvidia-persistenced" + fi + start-stop-daemon --start --quiet --pidfile ${pidfile} \ + --background --exec /opt/bin/nvidia-persistenced \ + -- ${NVPD_USER_ARG} ${ARGS} + eend $? +} + +stop() { + ebegin "Stopping nvidia-persistenced" + start-stop-daemon --stop --quiet --pidfile ${pidfile} + eend $? +} diff --git a/x11-drivers/nvidia-drivers/files/nvidia-rmmod.conf b/x11-drivers/nvidia-drivers/files/nvidia-rmmod.conf new file mode 100644 index 00000000..48a82736 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-rmmod.conf @@ -0,0 +1,3 @@ +# Nvidia UVM support + +remove nvidia modprobe -r --ignore-remove nvidia-modeset nvidia-uvm nvidia diff --git a/x11-drivers/nvidia-drivers/files/nvidia-smi.init b/x11-drivers/nvidia-drivers/files/nvidia-smi.init new file mode 100644 index 00000000..75aebb5c --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-smi.init @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +pidfile="/run/nvidia-smi.pid" + +depend() { + after modules +} + +start() { + ebegin "Starting NVIDIA System Management Interface" + rm -f ${pidfile} + start-stop-daemon --start --quiet --pidfile ${pidfile} \ + --make-pidfile --background --exec /opt/bin/nvidia-smi -- \ + -q -l 300 + eend $? +} + +stop() { + ebegin "Stopping NVIDIA System Management Interface" + start-stop-daemon --stop --quiet --pidfile ${pidfile} + eend $? +} diff --git a/x11-drivers/nvidia-drivers/files/nvidia-udev.sh b/x11-drivers/nvidia-drivers/files/nvidia-udev.sh new file mode 100644 index 00000000..9487b08e --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-udev.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +if [ $# -ne 1 ]; then + echo "Invalid args" >&2 + exit 1 +fi + +case $1 in + add|ADD) + /opt/bin/nvidia-smi > /dev/null + ;; + remove|REMOVE) + rm -f /dev/nvidia* + ;; +esac + +exit 0 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-udev.sh-r1 b/x11-drivers/nvidia-drivers/files/nvidia-udev.sh-r1 new file mode 100644 index 00000000..6579bf74 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-udev.sh-r1 @@ -0,0 +1,20 @@ +#!/bin/sh + +if [ $# -ne 1 ]; then + echo "Invalid args" >&2 + exit 1 +fi + +case $1 in + add|ADD) + #hopefully this prevents infinite loops like bug #454740 + if lsmod | grep -iq nvidia; then + /opt/bin/nvidia-smi > /dev/null + fi + ;; + remove|REMOVE) + rm -f /dev/nvidia* + ;; +esac + +exit 0 diff --git a/x11-drivers/nvidia-drivers/files/nvidia.udev-rule b/x11-drivers/nvidia-drivers/files/nvidia.udev-rule new file mode 100644 index 00000000..2eb30bb0 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia.udev-rule @@ -0,0 +1,6 @@ +ACTION=="add", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}" +# Previously the ACTION was "add|remove" but one user on bug #376527 had a +# problem until he recompiled udev-171-r5, which is one of the versions I +# tested with and it was fine. I'm breaking the rules out just to be safe +# so someone else doesn't have an issue +ACTION=="remove", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}" |