x11-drivers/nvidia-drivers: Default disable PreserveVideoMemoryAllocations

Bug: https://bugs.gentoo.org/763129
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
David Seifert
2021-02-08 10:39:20 +01:00
parent 3053f68df4
commit 3f48cdfdff
2 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
# 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_DeviceFileGID=VIDEOGID \
NVreg_DeviceFileMode=432 \
NVreg_DeviceFileUID=0 \
NVreg_ModifyDeviceFiles=1 \
NVreg_PreserveVideoMemoryAllocations=0 \
NVreg_TemporaryFilePath=/tmp

View File

@@ -214,7 +214,7 @@ src_install() {
# This file is tweaked with the appropriate video group in
# pkg_preinst, see bug #491414
insinto /etc/modprobe.d
newins "${FILESDIR}"/nvidia-430.conf nvidia.conf
newins "${FILESDIR}"/nvidia-460.conf nvidia.conf
if use uvm; then
doins "${FILESDIR}"/nvidia-rmmod.conf