diff options
Diffstat (limited to 'x11-drivers/nvidia-drivers/files')
14 files changed, 151 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-drivers/files/50nvidia-prelink-blacklist b/x11-drivers/nvidia-drivers/files/50nvidia-prelink-blacklist new file mode 100644 index 0000000..5e139de --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/50nvidia-prelink-blacklist @@ -0,0 +1 @@ +PRELINK_PATH_MASK="/usr/lib{,64}/tls/libnvidia-tls*:/usr/lib{,64}/libnvidia*:/usr/lib{,64}/libGL*:/usr/lib{,64}/opengl/nvidia/*:/usr/lib{,64}/OpenCL/vendors/nvidia/*:/usr/lib{,64}/xorg/modules/drivers/nvidia*:/usr/lib{,64}/libvdpau_nvidia*:/usr/lib{,64}/libXvMCNVIDIA*:/usr/lib{,64}/libcuda*:/usr/lib{,64}/libnvcuvid*" 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 0000000..e9d6274 --- /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 0000000..48c41d8 --- /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 0000000..a96b0cd --- /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-persistenced.conf b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.conf new file mode 100644 index 0000000..637ac1a --- /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 0000000..f80456d --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.init @@ -0,0 +1,24 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 0000000..618b9b3 --- /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-drm nvidia-modeset nvidia-uvm nvidia diff --git a/x11-drivers/nvidia-drivers/files/nvidia-settings-linker.patch b/x11-drivers/nvidia-drivers/files/nvidia-settings-linker.patch new file mode 100644 index 0000000..fe9d336 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-settings-linker.patch @@ -0,0 +1,22 @@ +--- a/nvidia-settings-@PV@/utils.mk ++++ b/nvidia-settings-@PV@/utils.mk +@@ -475,7 +475,7 @@ + define READ_ONLY_OBJECT_FROM_FILE_RULE + $$(OUTPUTDIR)/$$(notdir $(1)).o: $(1) + $(at_if_quiet)cd $$(dir $(1)); \ +- $$(call quiet_cmd_no_at,LD) -r -z noexecstack --format=binary \ ++ $$(call quiet_cmd_no_at,NVLD) -r -z noexecstack --format=binary \ + $$(notdir $(1)) -o $$(OUTPUTDIR_ABSOLUTE)/$$(notdir $$@) + $$(call quiet_cmd,OBJCOPY) \ + --rename-section .data=.rodata,contents,alloc,load,data,readonly \ +--- a/nvidia-settings-@PV@/src/libXNVCtrl/utils.mk ++++ b/nvidia-settings-@PV@/src/libXNVCtrl/utils.mk +@@ -475,7 +475,7 @@ + define READ_ONLY_OBJECT_FROM_FILE_RULE + $$(OUTPUTDIR)/$$(notdir $(1)).o: $(1) + $(at_if_quiet)cd $$(dir $(1)); \ +- $$(call quiet_cmd_no_at,LD) -r -z noexecstack --format=binary \ ++ $$(call quiet_cmd_no_at,NVLD) -r -z noexecstack --format=binary \ + $$(notdir $(1)) -o $$(OUTPUTDIR_ABSOLUTE)/$$(notdir $$@) + $$(call quiet_cmd,OBJCOPY) \ + --rename-section .data=.rodata,contents,alloc,load,data,readonly \ diff --git a/x11-drivers/nvidia-drivers/files/nvidia-settings.desktop b/x11-drivers/nvidia-drivers/files/nvidia-settings.desktop new file mode 100644 index 0000000..b4b452e --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-settings.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=NVIDIA X Server Settings +Comment=Configure NVIDIA X Server Settings +Exec=/usr/bin/nvidia-settings +Icon=nvidia-settings +Categories=System;Settings; 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 0000000..8ee51e3 --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-smi.init @@ -0,0 +1,24 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 0000000..9487b08 --- /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 0000000..6579bf7 --- /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-uvm.udev-rule b/x11-drivers/nvidia-drivers/files/nvidia-uvm.udev-rule new file mode 100644 index 0000000..3df8a3a --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-uvm.udev-rule @@ -0,0 +1 @@ +KERNEL=="nvidia_uvm", RUN+="/bin/bash -c '/bin/mknod -m 660 /dev/nvidia-uvm c $(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0; /bin/chgrp video /dev/nvidia-uvm'" 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 0000000..2eb30bb --- /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}" |