1
0
forked from ports/opt

nvidia-fb: feature branch version 465.24.02, replaces nvidia-sl

This commit is contained in:
Matt Housh 2021-04-20 17:06:02 -05:00
parent 4c9a7613bd
commit a13fc8ebbe
7 changed files with 282 additions and 0 deletions

99
nvidia-fb/.footprint Normal file
View File

@ -0,0 +1,99 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/OpenCL/
drwxr-xr-x root/root etc/OpenCL/vendors/
-rw-r--r-- root/root etc/OpenCL/vendors/nvidia.icd
drwxr-xr-x root/root etc/vulkan/
drwxr-xr-x root/root etc/vulkan/icd.d/
-rw-r--r-- root/root etc/vulkan/icd.d/nvidia_icd.json
drwxr-xr-x root/root lib/
drwxr-xr-x root/root lib/modules/
drwxr-xr-x root/root lib/modules/<kernel-version>/
drwxr-xr-x root/root lib/modules/<kernel-version>/extra/
-rw-r--r-- root/root lib/modules/<kernel-version>/extra/nvidia-drm.ko
-rw-r--r-- root/root lib/modules/<kernel-version>/extra/nvidia-ib-peermem-stub.ko
-rw-r--r-- root/root lib/modules/<kernel-version>/extra/nvidia-modeset.ko
-rw-r--r-- root/root lib/modules/<kernel-version>/extra/nvidia-peermem.ko
-rw-r--r-- root/root lib/modules/<kernel-version>/extra/nvidia-uvm.ko
-rw-r--r-- root/root lib/modules/<kernel-version>/extra/nvidia.ko
drwxr-xr-x root/root lib/udev/
drwxr-xr-x root/root lib/udev/rules.d/
-rw-r--r-- root/root lib/udev/rules.d/90-nvidia-uvm.rules
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/nvidia-cuda-mps-control
-rwxr-xr-x root/root usr/bin/nvidia-cuda-mps-server
-rwxr-xr-x root/root usr/bin/nvidia-debugdump
-rwsr-xr-x root/root usr/bin/nvidia-modprobe
-rwxr-xr-x root/root usr/bin/nvidia-persistenced
-rwxr-xr-x root/root usr/bin/nvidia-settings
-rwxr-xr-x root/root usr/bin/nvidia-smi
-rwxr-xr-x root/root usr/bin/nvidia-xconfig
drwxr-xr-x root/root usr/lib/
lrwxrwxrwx root/root usr/lib/libEGL_nvidia.so.0 -> libEGL_nvidia.so.465.24.02
-rwxr-xr-x root/root usr/lib/libEGL_nvidia.so.465.24.02
lrwxrwxrwx root/root usr/lib/libGLESv1_CM_nvidia.so.1 -> libGLESv1_CM_nvidia.so.465.24.02
-rwxr-xr-x root/root usr/lib/libGLESv1_CM_nvidia.so.465.24.02
lrwxrwxrwx root/root usr/lib/libGLESv2_nvidia.so.2 -> libGLESv2_nvidia.so.465.24.02
-rwxr-xr-x root/root usr/lib/libGLESv2_nvidia.so.465.24.02
lrwxrwxrwx root/root usr/lib/libGLX_nvidia.so.0 -> libGLX_nvidia.so.465.24.02
-rwxr-xr-x root/root usr/lib/libGLX_nvidia.so.465.24.02
-rwxr-xr-x root/root usr/lib/libOpenCL.so.1.0.0
lrwxrwxrwx root/root usr/lib/libcuda.so -> libcuda.so.465.24.02
lrwxrwxrwx root/root usr/lib/libcuda.so.1 -> libcuda.so.465.24.02
-rwxr-xr-x root/root usr/lib/libcuda.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvcuvid.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-cbl.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-cfg.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-compiler.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-eglcore.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-encode.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-fbc.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-glcore.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-glsi.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-glvkspirv.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-gtk2.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-gtk3.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-ifr.so.465.24.02
lrwxrwxrwx root/root usr/lib/libnvidia-ml.so -> libnvidia-ml.so.465.24.02
lrwxrwxrwx root/root usr/lib/libnvidia-ml.so.1 -> libnvidia-ml.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-ml.so.465.24.02
lrwxrwxrwx root/root usr/lib/libnvidia-opencl.so -> libnvidia-opencl.so.465.24.02
lrwxrwxrwx root/root usr/lib/libnvidia-opencl.so.1 -> libnvidia-opencl.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-opencl.so.465.24.02
lrwxrwxrwx root/root usr/lib/libnvidia-ptxjitcompiler.so -> libnvidia-ptxjitcompiler.so.465.24.02
lrwxrwxrwx root/root usr/lib/libnvidia-ptxjitcompiler.so.1 -> libnvidia-ptxjitcompiler.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-ptxjitcompiler.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-rtcore.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvidia-tls.so.465.24.02
lrwxrwxrwx root/root usr/lib/libnvoptix.so -> libnvoptix.so.465.24.02
lrwxrwxrwx root/root usr/lib/libnvoptix.so.1 -> libnvoptix.so.465.24.02
-rwxr-xr-x root/root usr/lib/libnvoptix.so.465.24.02
drwxr-xr-x root/root usr/lib/nvidia/
drwxr-xr-x root/root usr/lib/nvidia/xorg/
lrwxrwxrwx root/root usr/lib/nvidia/xorg/libglxserver_nvidia.so -> libglxserver_nvidia.so.465.24.02
lrwxrwxrwx root/root usr/lib/nvidia/xorg/libglxserver_nvidia.so.1 -> libglxserver_nvidia.so.465.24.02
-rwxr-xr-x root/root usr/lib/nvidia/xorg/libglxserver_nvidia.so.465.24.02
drwxr-xr-x root/root usr/lib/tls/
drwxr-xr-x root/root usr/lib/vdpau/
lrwxrwxrwx root/root usr/lib/vdpau/libvdpau_nvidia.so -> libvdpau_nvidia.so.465.24.02
lrwxrwxrwx root/root usr/lib/vdpau/libvdpau_nvidia.so.1 -> libvdpau_nvidia.so.465.24.02
-rwxr-xr-x root/root usr/lib/vdpau/libvdpau_nvidia.so.465.24.02
drwxr-xr-x root/root usr/lib/xorg/
drwxr-xr-x root/root usr/lib/xorg/modules/
drwxr-xr-x root/root usr/lib/xorg/modules/drivers/
-rwxr-xr-x root/root usr/lib/xorg/modules/drivers/nvidia_drv.so
drwxr-xr-x root/root usr/lib/xorg/modules/extensions/
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/X11/
drwxr-xr-x root/root usr/share/X11/xorg.conf.d/
-rw-r--r-- root/root usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
drwxr-xr-x root/root usr/share/applications/
-rw-r--r-- root/root usr/share/applications/nvidia-settings.desktop
drwxr-xr-x root/root usr/share/glvnd/
drwxr-xr-x root/root usr/share/glvnd/egl_vendor.d/
-rw-r--r-- root/root usr/share/glvnd/egl_vendor.d/10_nvidia.json
drwxr-xr-x root/root usr/share/nvidia/
-rw-r--r-- root/root usr/share/nvidia/nvidia-application-profiles-465.24.02-key-documentation
-rw-r--r-- root/root usr/share/nvidia/nvidia-application-profiles-465.24.02-rc
drwxr-xr-x root/root usr/share/pixmaps/
-rw-r--r-- root/root usr/share/pixmaps/nvidia-settings.png

7
nvidia-fb/.signature Normal file
View File

@ -0,0 +1,7 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/av4SVfvJ0hkaujftRuQF0yu5vEqjB1b1QO04aba1SDq1ZCC8oxV2TcmcbyrPa5Ta3cWNRsDLY/FEtnVCF+6HgU=
SHA256 (Pkgfile) = 0903b7bc528793686ad7be22563f2ff0882e522c927b433ef521f7d0a6b38c4c
SHA256 (.footprint) = 6ed3633a505daf2d367334b5762c4c9391a4dd60d6944a34e207cb79d3b41547
SHA256 (NVIDIA-Linux-x86_64-465.24.02.run) = 8d5e7021a159ac194e691afbeead19fd3a300fc4ffdb2f7dc3694b36f384ac38
SHA256 (90-nvidia-uvm.rules) = c35c61cebf5bf9a112ac06539bdc670a388afa4b50a7f8223a114fbeafedb140
SHA256 (10-nvidia-drm-outputclass.conf) = 4a72c70d7e348102f8c159b3f58973218bc740de1d86830f7cbee1c40744929c

View File

@ -0,0 +1,13 @@
# This xorg.conf.d configuration snippet configures the X server to
# automatically load the nvidia X driver when it detects a device driven by the
# nvidia-drm.ko kernel module. Please note that this only works on Linux kernels
# version 3.9 or higher with CONFIG_DRM enabled, and only if the nvidia-drm.ko
# kernel module is loaded before the X server is started.
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
ModulePath "/usr/lib/nvidia/xorg"
ModulePath "/usr/lib/xorg/modules"
EndSection

View File

@ -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'"

133
nvidia-fb/Pkgfile Normal file
View File

@ -0,0 +1,133 @@
# Description: NVIDIA Linux Display Driver (feature branch)
# URL: https://www.nvidia.com/
# Maintainer: Matt Housh, jaeger at crux dot ninja
# Depends on: gtk gtk3 libglvnd
name=nvidia-fb
version=465.24.02
release=1
source=(https://us.download.nvidia.com/XFree86/Linux-x86_64/$version/NVIDIA-Linux-x86_64-$version.run \
90-nvidia-uvm.rules 10-nvidia-drm-outputclass.conf)
build() {
sh NVIDIA-Linux-x86_64-$version.run --extract-only
cd NVIDIA-Linux-x86_64-$version
# X driver and GLX extension
install -d $PKG/usr/lib/xorg/modules/{drivers,extensions}
install -m 0755 nvidia_drv.so $PKG/usr/lib/xorg/modules/drivers/
install -d -m 0755 $PKG/usr/lib/nvidia/xorg
install -m 0755 libglxserver_nvidia.so.$version $PKG/usr/lib/nvidia/xorg/
ln -s libglxserver_nvidia.so.$version $PKG/usr/lib/nvidia/xorg/libglxserver_nvidia.so
ln -s libglxserver_nvidia.so.$version $PKG/usr/lib/nvidia/xorg/libglxserver_nvidia.so.1
# EGL and OpenGL ES libraries and config
install -d $PKG/usr/lib
install -m 0755 libGLESv1_CM_nvidia.so.$version $PKG/usr/lib/
ln -s libGLESv1_CM_nvidia.so.$version $PKG/usr/lib/libGLESv1_CM_nvidia.so.1
install -m 0755 libGLESv2_nvidia.so.$version $PKG/usr/lib/
ln -s libGLESv2_nvidia.so.$version $PKG/usr/lib/libGLESv2_nvidia.so.2
install -D -m 0644 10_nvidia.json $PKG/usr/share/glvnd/egl_vendor.d/10_nvidia.json
# wayland EGL library and config
#install -d $PKG/usr/share/egl/egl_external_platform.d
#install -m 0755 libnvidia-egl-wayland.so.1.0.2 $PKG/usr/lib/
#install -m 0644 10_nvidia_wayland.json $PKG/usr/share/egl/egl_external_platform.d/
# GLVND vendor implementation libraries
install -m 0755 libGLX_nvidia.so.$version $PKG/usr/lib/
ln -s libGLX_nvidia.so.$version $PKG/usr/lib/libGLX_nvidia.so.0
install -m 0755 libEGL_nvidia.so.$version $PKG/usr/lib/
ln -s libEGL_nvidia.so.$version $PKG/usr/lib/libEGL_nvidia.so.0
# vulkan ICD config
install -d $PKG/etc/vulkan/icd.d
install -m 0644 nvidia_icd.json $PKG/etc/vulkan/icd.d/nvidia_icd.json
# driver component libraries
install -m 0755 libnvidia-cfg.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-compiler.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-eglcore.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-glcore.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-glsi.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-glvkspirv.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-rtcore.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-cbl.so.$version $PKG/usr/lib/
# vendor VDPAU library
install -D -m 0755 libvdpau_nvidia.so.$version $PKG/usr/lib/vdpau/libvdpau_nvidia.so.$version
ln -s libvdpau_nvidia.so.$version $PKG/usr/lib/vdpau/libvdpau_nvidia.so.1
ln -s libvdpau_nvidia.so.$version $PKG/usr/lib/vdpau/libvdpau_nvidia.so
# CUDA libraries
install -m 0755 libcuda.so.$version $PKG/usr/lib/
ln -s libcuda.so.$version $PKG/usr/lib/libcuda.so.1
ln -s libcuda.so.$version $PKG/usr/lib/libcuda.so
install -m 0755 libnvidia-ptxjitcompiler.so.$version $PKG/usr/lib/
ln -s libnvidia-ptxjitcompiler.so.$version $PKG/usr/lib/libnvidia-ptxjitcompiler.so.1
ln -s libnvidia-ptxjitcompiler.so.$version $PKG/usr/lib/libnvidia-ptxjitcompiler.so
# OpenCL libraries and config
install -m 0755 libOpenCL.so.1.0.0 $PKG/usr/lib/
install -m 0755 libnvidia-opencl.so.$version $PKG/usr/lib/
ln -s libnvidia-opencl.so.$version $PKG/usr/lib/libnvidia-opencl.so.1
ln -s libnvidia-opencl.so.$version $PKG/usr/lib/libnvidia-opencl.so
install -D -m 0644 nvidia.icd $PKG/etc/OpenCL/vendors/nvidia.icd
# CUDA MPI applications
install -d $PKG/usr/bin
install -m 0755 nvidia-cuda-mps-control $PKG/usr/bin/
install -m 0755 nvidia-cuda-mps-server $PKG/usr/bin/
# TLS libraries
install -m 0755 libnvidia-tls.so.$version $PKG/usr/lib/
install -d $PKG/usr/lib/tls
# monitoring and management API library
install -m 0755 libnvidia-ml.so.$version $PKG/usr/lib/
ln -s libnvidia-ml.so.$version $PKG/usr/lib/libnvidia-ml.so.1
ln -s libnvidia-ml.so.$version $PKG/usr/lib/libnvidia-ml.so
# applications
install -m 4755 nvidia-modprobe $PKG/usr/bin/
install -m 0755 nvidia-{xconfig,settings,smi,debugdump,persistenced} \
$PKG/usr/bin/
# nvidia-settings UI libraries
install -m 0755 libnvidia-gtk{2,3}.so.$version $PKG/usr/lib/
# encoding/decoding libraries
install -m 0755 libnvcuvid.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-encode.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-ifr.so.$version $PKG/usr/lib/
install -m 0755 libnvidia-fbc.so.$version $PKG/usr/lib/
# OptiX ray tracing engine
install -m 0755 libnvoptix.so.$version $PKG/usr/lib/
ln -s libnvoptix.so.$version $PKG/usr/lib/libnvoptix.so.1
ln -s libnvoptix.so.$version $PKG/usr/lib/libnvoptix.so
# X driver config
install -D -m 0644 $SRC/10-nvidia-drm-outputclass.conf \
$PKG/usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
# application profile keys and documentation
install -d -m 0755 $PKG/usr/share/nvidia
install -m 0644 nvidia-application-profiles-$version-rc $PKG/usr/share/nvidia/
install -m 0644 nvidia-application-profiles-$version-key-documentation $PKG/usr/share/nvidia/
# desktop file and icon
install -d $PKG/usr/share/{applications,pixmaps}
sed -i -e 's,__UTILS_PATH__,/usr/bin,' -e 's,__PIXMAP_PATH__,/usr/share/pixmaps,' nvidia-settings.desktop
install -m 0644 nvidia-settings.desktop $PKG/usr/share/applications/
install -m 0644 nvidia-settings.png $PKG/usr/share/pixmaps/
# nvidia-uvm udev rules file
install -D -m 0644 $SRC/90-nvidia-uvm.rules $PKG/lib/udev/rules.d/90-nvidia-uvm.rules
# kernel modules
cd kernel
IGNORE_CC_MISMATCH=1 make module
install -d $PKG/lib/modules/$(uname -r)/extra
install -m 0644 *.ko $PKG/lib/modules/$(uname -r)/extra/
}

9
nvidia-fb/README Normal file
View File

@ -0,0 +1,9 @@
README for nvidia 1xx.xx+
*** NOTE for nvidia with udev ***
If using udev, add your user to the "video" group to be able to
use the nvidia devices required for 3d to function properly.

20
nvidia-fb/pre-install Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
# check for root privileges needed for gl-select
if [ ! $(id -u) -eq 0 ]; then
echo "root privileges needed to run this pre-install script!"
exit 1
fi
# is gl-select available?
if [ -x /usr/bin/gl-select ]; then
printf '%b' "\033[33;1mNOTE: With the introduction of GLVND, gl-select is no
longer needed. This pre-install script will reset gl-select
to its default xorg setting if needed. It is recommended that
gl-select be uninstalled after installing libglvnd and
upgrading mesa3d.\033[0m\n"
# is nvidia currently selected?
if /usr/bin/gl-select status | grep -q 'nvidia.*is selected'; then
/usr/bin/gl-select use xorg
fi
fi