Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVIDIA Drivers Survey (Dec. 2024) #7768

Open
wants to merge 6 commits into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion runtime-display/nvidia+390/autobuild/defines
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PKGSEC=x11
PKGDEP="libcl zlib opencl-registry-api xorg-server gtk-2 dkms libglvnd"
PKGDES="The proprietary drivers suite for NVIDIA cards (390 Legacy Branch)"

PKGCONFL="mesa<=11.1.0 xorg-server<=1.18.0-2 nvidia+340 nvidia"
PKGCONFL="mesa<=11.1.0 xorg-server<=1.18.0-2 nvidia+340 nvidia nvidia-open"
PKGBREAK="xorg-server<=1.19.5-2 nvidia-libgl<=390.25-2"
PKGREP="xorg-server<=1.19.5-2 nvidia-libgl<=390.25-2"
ABSTRIP=0
Expand Down
1 change: 1 addition & 0 deletions runtime-display/nvidia+390/spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
VER=390.157
REL=1
SRCS="file::rename=NVIDIA-Linux-$VER.run::https://us.download.nvidia.com/XFree86/Linux-x86_64/${VER}/NVIDIA-Linux-x86_64-${VER}.run"
CHKUPDATE="anitya::id=231058"
CHKSUMS="sha256::5bebbca6e8fed5d6b9d81070fb9e351f18edc534952553cbdc71e8fd0b9b328a"
2 changes: 2 additions & 0 deletions runtime-display/nvidia-open/autobuild/beyond
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
abinfo "Fixing SO permission bits ..."
find "$PKGDIR" -name '*.so*' -print -exec chmod 755 {} ';'
43 changes: 43 additions & 0 deletions runtime-display/nvidia-open/autobuild/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
pushd "$SRCDIR"/nvidia-driver
abinfo "Installing kernel module sources ..."
mkdir -vp "${PKGDIR}/usr/src"
cp -drv --no-preserve='ownership' "$SRCDIR"/nvidia-driver "${PKGDIR}/usr/src/nvidia-${PKGVER%%+*}"
popd

pushd "$SRCDIR"/nvidia-settings
abinfo "Building control panel ..."
make -C src all DO_STRIP=
make -C doc all DO_STRIP=

abinfo "Installing control panel ..."
mkdir -vp "$PKGDIR"/usr/{bin,lib}
make -C src install \
DESTDIR="$PKGDIR" \
PREFIX=/usr
make -C doc install \
DESTDIR="$PKGDIR" \
PREFIX=/usr

abinfo "Installing XNVCtrl headers ..."
install -Dvm644 src/libXNVCtrl/*.h -t "$PKGDIR"/usr/include/NVCtrl
popd

pushd "$SRCDIR"/nvidia-xconfig
abinfo "Building nvidia-xconfig ..."
make all DO_STRIP=

abinfo "Installing nvidia-xconfig ..."
make install \
DESTDIR="$PKGDIR" \
PREFIX=/usr
popd

pushd "$SRCDIR"/nvidia-persistenced
abinfo "Building nvidia-persistenced ..."
make all DO_STRIP=

abinfo "Installing nvidia-persistenced ..."
make install \
DESTDIR="$PKGDIR" \
PREFIX=/usr
popd
11 changes: 11 additions & 0 deletions runtime-display/nvidia-open/autobuild/defines
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PKGNAME=nvidia-open
PKGSEC=x11
PKGDEP="libcl zlib opencl-registry-api xorg-server dkms \
libglvnd egl-wayland gtk-3 jansson libvdpau \
libxnvctrl vulkan nvidia-firmware nvidia-utils"
PKGDES="The open-source drivers suite for NVIDIA cards"
BUILDDEP="inetutils"

FAIL_ARCH="!(amd64|arm64)"

PKGCONFL="mesa<=11.1.0 xorg-server<=1.18.0-2 nvidia+340 nvidia+390 nvidia"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blacklist nouveau
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=NVIDIA Persistence Daemon
Wants=syslog.target

[Service]
Type=forking
ExecStart=/usr/bin/nvidia-persistenced --user nvidia-persistenced
ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
u nvidia-persistenced - "NVIDIA Persistence Daemon" / /bin/nologin
g nvidia-persistenced - -
m nvidia-persistenced nvidia-persistenced
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ if test -d /usr/lib/modules; then
done
fi

getent group nvidia-persistenced &>/dev/null || groupadd -g 143 nvidia-persistenced
getent passwd nvidia-persistenced &>/dev/null || useradd -c 'NVIDIA Persistence Daemon' -u 143 -g nvidia-persistenced -d '/' -s /sbin/nologin nvidia-persistenced

systemd-sysusers nvidia.conf
systemctl enable nvidia-persistenced
29 changes: 29 additions & 0 deletions runtime-display/nvidia-open/autobuild/prepare
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
abinfo "Replacing placeholders in dkms.conf ..."
sed -i "s/__VERSION_STRING/${PKGVER%%+*}/" "$SRCDIR"/nvidia-driver/kernel-open/dkms.conf
# shellcheck disable=SC2016
sed -i 's/__JOBS/`nproc`/' "$SRCDIR"/nvidia-driver/kernel-open/dkms.conf
sed -i 's/__EXCLUDE_MODULES//' "$SRCDIR"/nvidia-driver/kernel-open/dkms.conf
sed -i 's/__DKMS_MODULES//' "$SRCDIR"/nvidia-driver/kernel-open/dkms.conf
sed -i '$i\
BUILT_MODULE_NAME[0]="nvidia"\
BUILT_MODULE_LOCATION[0]="kernel-open"\
DEST_MODULE_LOCATION[0]="/kernel/drivers/video"\
BUILT_MODULE_NAME[1]="nvidia-uvm"\
BUILT_MODULE_LOCATION[1]="kernel-open"\
DEST_MODULE_LOCATION[1]="/kernel/drivers/video"\
BUILT_MODULE_NAME[2]="nvidia-modeset"\
BUILT_MODULE_LOCATION[2]="kernel-open"\
DEST_MODULE_LOCATION[2]="/kernel/drivers/video"\
BUILT_MODULE_NAME[3]="nvidia-drm"\
BUILT_MODULE_LOCATION[3]="kernel-open"\
DEST_MODULE_LOCATION[3]="/kernel/drivers/video"\
BUILT_MODULE_NAME[4]="nvidia-peermem"\
BUILT_MODULE_LOCATION[4]="kernel-open"\
DEST_MODULE_LOCATION[4]="/kernel/drivers/video"' "$SRCDIR"/nvidia-driver/kernel-open/dkms.conf

mv -vf "$SRCDIR"/nvidia-driver/kernel-open/dkms.conf "$SRCDIR"/nvidia-driver/dkms.conf

abinfo "Generating postinst and prerm"
for i in postinst prerm; do
sed -e "s/@DRV_VER@/${PKGVER%%+*}/g" "$SRCDIR"/autobuild/${i}.in > "$SRCDIR"/autobuild/${i}
done
14 changes: 14 additions & 0 deletions runtime-display/nvidia-open/spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
_DRIVER_VER=565.77
# Note: sometimes utilities are not updated timely
_UTILS_VERS=565.57.01
VER=${_DRIVER_VER}+utils${_UTILS_VERS}
SRCS="git::rename=nvidia-driver;commit=tags/aosc/${_DRIVER_VER}/1::https://github.com/AOSC-Tracking/nvidia-open
git::rename=nvidia-settings;commit=tags/${_UTILS_VERS}::https://github.com/NVIDIA/nvidia-settings
git::rename=nvidia-xconfig;commit=tags/${_UTILS_VERS}::https://github.com/NVIDIA/nvidia-xconfig
git::rename=nvidia-persistenced;commit=tags/${_UTILS_VERS}::https://github.com/NVIDIA/nvidia-persistenced"
CHKSUMS="SKIP
SKIP
SKIP
SKIP"
CHKUPDATE="anitya::id=319677"
SUBDIR=.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ sanity_check() {
# The regex glob matching so that should not be installed, due to
# - Incompatibility with with GLVND, or
# - A separate package containing this so.
BLACKLIST="(EGL|GL|GLESv1_CM|GLESv2|GLX|OpenGL|OpenCL|GLdispatch|nvidia-egl-wayland).so."
BLACKLIST="(EGL|GL|GLESv1_CM|GLESv2|GLX|OpenGL|OpenCL|GLdispatch|nvidia-egl-wayland|libnvidia-gtk3|libnvidia-wayland-client).so."
# Assuming pwd is in NVIDIA-Linux-${NV_ARCH}
abinfo "Checking whether all the .so provided has been installed"
_PROVIDED=$(find -maxdepth 1 -name "*.so.*" -exec basename {} \; | sort | sed -E "/${BLACKLIST}/d")
Expand All @@ -71,48 +71,7 @@ case "$ABHOST" in
abdie "Unsupported architecture"
esac


cd "$SRCDIR"/NVIDIA-Linux-${NV_ARCH}-${PKGVER}

if [[ -d "${SRCDIR}/autobuild/patches" ]]; then
abinfo "Patching kernel driver"
for i in $(find "${SRCDIR}/autobuild/patches/" -type f -name "*.patch" | sort); do
abinfo "Applying $(basename $i)"
(
cd kernel
patch -Np1 -i "$i"
)
done
else
abinfo "No kernel patches needed"
fi

cd kernel

abinfo "Processing DKMS configuration file..."
sed -i "s/__VERSION_STRING/$PKGVER/" dkms.conf
sed -i 's/__JOBS/`nproc`/' dkms.conf
sed -i 's/__DKMS_MODULES//' dkms.conf
sed -i '$iBUILT_MODULE_NAME[0]="nvidia"\
DEST_MODULE_LOCATION[0]="/kernel/drivers/video"\
BUILT_MODULE_NAME[1]="nvidia-uvm"\
DEST_MODULE_LOCATION[1]="/kernel/drivers/video"\
BUILT_MODULE_NAME[2]="nvidia-modeset"\
DEST_MODULE_LOCATION[2]="/kernel/drivers/video"\
BUILT_MODULE_NAME[3]="nvidia-drm"\
DEST_MODULE_LOCATION[3]="/kernel/drivers/video"\
BUILT_MODULE_NAME[4]="nvidia-peermem"\
DEST_MODULE_LOCATION[4]="/kernel/drivers/video"' dkms.conf

cd ..

abinfo "NVIDIA blacklist for Nouveau..."
install -dm 755 "$PKGDIR"/usr/{lib/modprobe.d,src}
cp -dr --no-preserve='ownership' kernel "$PKGDIR"/usr/src/nvidia-$PKGVER
echo 'blacklist nouveau' > "$PKGDIR"/usr/lib/modprobe.d/nvidia.conf

abinfo "NVIDIA Persistenced..."
tar xf nvidia-persistenced-init.tar.bz2
pushd "$SRCDIR"/NVIDIA-Linux-${NV_ARCH}-${PKGVER}

abinfo "Processing and installing OpenCL runtime..."
install_for_all 644 nvidia.icd "$PKGDIR"/etc/OpenCL/vendors
Expand Down Expand Up @@ -152,10 +111,14 @@ install -Dvm755 "libnvidia-cfg.so.$PKGVER" \
"$PKGDIR"/usr/lib/libnvidia-cfg.so.$PKGVER
install -Dvm755 "libnvidia-ml.so.$PKGVER" \
"$PKGDIR"/usr/lib/libnvidia-ml.so.$PKGVER
install -Dvm755 "libnvidia-egl-xlib.so.1" \
"$PKGDIR"/usr/lib/libnvidia-egl-xlib.so.1
install -Dvm755 "libnvidia-egl-xcb.so.1" \
"$PKGDIR"/usr/lib/libnvidia-egl-xcb.so.1
if [[ $NV_ARCH == "x86_64" ]]; then
install -Dvm755 "libnvidia-sandboxutils.so.$PKGVER" \
"$PKGDIR"/usr/lib/libnvidia-sandboxutils.so.$PKGVER
fi
install -Dvm755 "libnvidia-egl-xlib.so.1.0.0" \
"$PKGDIR"/usr/lib/libnvidia-egl-xlib.so.1.0.0
install -Dvm755 "libnvidia-egl-xcb.so.1.0.0" \
"$PKGDIR"/usr/lib/libnvidia-egl-xcb.so.1.0.0
install -Dvm644 "20_nvidia_xlib.json" \
"$PKGDIR"/usr/share/egl/egl_external_platform.d/20_nvidia_xlib.json
install -Dvm644 "20_nvidia_xcb.json" \
Expand All @@ -177,8 +140,9 @@ abinfo "Nvidia GPU control APIs"
install_for_all 755 "libnvidia-api.so.1" "$PKGDIR"/usr/lib

abinfo "Wayland support libraries and platform files..."
install_for_all 755 "libnvidia-egl-gbm.so.1.1.1" "$PKGDIR"/usr/lib
install_if_amd64 755 "libnvidia-wayland-client.so.$PKGVER" "$PKGDIR"/usr/lib
install_for_all 755 "libnvidia-egl-gbm.so.1.1.2" "$PKGDIR"/usr/lib
# libnvidia-wayland-client.so is open-source

install -Dvm644 "15_nvidia_gbm.json" \
"$PKGDIR"/usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json
mkdir -vp "$PKGDIR/usr/lib/gbm"
Expand Down Expand Up @@ -236,12 +200,6 @@ abinfo "Debug and core dump utility..."
install -Dvm755 nvidia-debugdump \
"$PKGDIR"/usr/bin/nvidia-debugdump

abinfo "NVIDIA X configurator..."
install -Dvm755 nvidia-xconfig \
"$PKGDIR"/usr/bin/nvidia-xconfig
install -Dvm644 nvidia-xconfig.1.gz \
"$PKGDIR"/usr/share/man/man1/nvidia-xconfig.1.gz

abinfo "NVIDIA Bug Reporter..."
install -Dvm755 nvidia-bug-report.sh \
"$PKGDIR"/usr/bin/nvidia-bug-report
Expand All @@ -266,29 +224,14 @@ install -Dvm4755 nvidia-modprobe \
install -Dvm644 nvidia-modprobe.1.gz \
"$PKGDIR"/usr/share/man/man1/nvidia-modprobe.1.gz

abinfo "NVIDIA Persistence Daemon..."
install -Dvm755 nvidia-persistenced \
"$PKGDIR"/usr/bin/nvidia-persistenced
install -Dvm644 nvidia-persistenced.1.gz \
"$PKGDIR"/usr/share/man/man1/nvidia-persistenced.1.gz
install -Dvm644 \
nvidia-persistenced-init/systemd/nvidia-persistenced.service.template \
"$PKGDIR"/usr/lib/systemd/system/nvidia-persistenced.service
sed -e 's/__USER__/nvidia-persistenced/' \
-i "$PKGDIR"/usr/lib/systemd/system/nvidia-persistenced.service

abinfo "Application profiles..."
install -Dvm644 nvidia-application-profiles-$PKGVER-rc \
"$PKGDIR"/usr/share/nvidia/nvidia-application-profiles-$PKGVER-rc
install -Dvm644 nvidia-application-profiles-$PKGVER-key-documentation \
"$PKGDIR"/usr/share/nvidia/nvidia-application-profiles-$PKGVER-key-documentation

abinfo "NVIDIA Control Panel..."
install_for_all 755 nvidia-settings "$PKGDIR"/usr/bin
install_for_all 644 nvidia-settings.1.gz "$PKGDIR"/usr/share/man/man1
install_for_all 644 nvidia-settings.png "$PKGDIR"/usr/share/pixmaps
install_for_all 755 libnvidia-gtk2.so.$PKGVER "$PKGDIR"/usr/lib
install_for_all 755 libnvidia-gtk3.so.$PKGVER "$PKGDIR"/usr/lib

abinfo "Power management services"
for i in suspend hibernate resume; do
Expand All @@ -301,10 +244,6 @@ install_for_all 755 nvidia-powerd "${PKGDIR}/usr/bin"
install_for_all 644 nvidia-dbus.conf "${PKGDIR}/usr/share/dbus-1/system.d"
install_for_all 644 systemd/system/nvidia-powerd.service "$PKGDIR"/usr/lib/systemd/system

abinfo "Card Firmware"
install_for_all 644 firmware/gsp_ga10x.bin "${PKGDIR}"/usr/lib/firmware/nvidia/${PKGVER}
install_for_all 644 firmware/gsp_tu10x.bin "${PKGDIR}"/usr/lib/firmware/nvidia/${PKGVER}

if ((NEED_FIX)); then
aberr "Additional files should be installed. See errors above."
abdir
Expand All @@ -323,14 +262,10 @@ ln -sv "libglxserver_nvidia.so.$PKGVER" \

abinfo "License and help texts"
for i in README.txt LICENSE NVIDIA_Changelog; do
install -Dvm644 $i "$PKGDIR"/usr/share/doc/nvidia/$i
install -Dvm644 $i "$PKGDIR"/usr/share/doc/nvidia-utils/$i
done

cd "$SRCDIR"

abinfo "Installing XNVCtrl headers ..."
install -Dvm644 "$SRCDIR"/nvidia-settings-*/src/libXNVCtrl/*.h \
-t "$PKGDIR"/usr/include/NVCtrl
popd

if [[ $NV_ARCH == "x86_64" ]]; then
abinfo "Installing optenv32 libraries"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ install -Dvm755 "libnvidia-opticalflow.so.$PKGVER" \
"$PKGDIR"/opt/32/lib/libnvidia-opticalflow.so.$PKGVER
install -Dvm755 "libnvidia-nvvm.so.$PKGVER" \
"$PKGDIR"/opt/32/lib/libnvidia-nvvm.so.$PKGVER
install -Dvm755 "libnvidia-egl-xlib.so.1" \
"$PKGDIR"/opt/32/lib/libnvidia-egl-xlib.so.1
install -Dvm755 "libnvidia-egl-xcb.so.1" \
"$PKGDIR"/opt/32/lib/libnvidia-egl-xcb.so.1
install -Dvm755 "libnvidia-egl-gbm.so.1.1.1" \
"$PKGDIR"/opt/32/lib/libnvidia-egl-gbm.so.1.1.1
install -Dvm755 "libnvidia-egl-xlib.so.1.0.0" \
"$PKGDIR"/opt/32/lib/libnvidia-egl-xlib.so.1.0.0
install -Dvm755 "libnvidia-egl-xcb.so.1.0.0" \
"$PKGDIR"/opt/32/lib/libnvidia-egl-xcb.so.1.0.0
install -Dvm755 "libnvidia-egl-gbm.so.1.1.2" \
"$PKGDIR"/opt/32/lib/libnvidia-egl-gbm.so.1.1.2

install -Dvm755 "libnvidia-gpucomp.so.$PKGVER" \
"$PKGDIR"/opt/32/lib/libnvidia-gpucomp.so.$PKGVER
Expand All @@ -63,9 +63,3 @@ install -Dvm755 "libnvidia-glvkspirv.so.$PKGVER" \
sanity_check "${PKGDIR}/opt/32"

create_links

cd ..

abinfo "Installing XNVCtrl headers ..."
install -Dvm644 "$SRCDIR"/nvidia-settings-*/src/libXNVCtrl/*.h \
-t "$PKGDIR"/opt/32/include/NVCtrl
14 changes: 14 additions & 0 deletions runtime-display/nvidia/01-utils/defines
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
PKGNAME=nvidia-utils
PKGSEC=x11
# Note: this package includes all proprietary binaries from NVIDIA driver that
# are not open-source.
# If a binary is both source-available and available in the proprietary
# .run driver package, please put its pre-built binary in nvidia
# and open source version in nvidia-open respectively.
PKGDES="The proprietary utilities for NVIDIA cards"

PKGCONFL="nvidia<=565.77"
PKGBREAK="nvidia<=565.77"
ABSTRIP=0

FAIL_ARCH="!(amd64|arm64)"
2 changes: 2 additions & 0 deletions runtime-display/nvidia/01-utils/prepare
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
abinfo "Extracting archive"
sh NVIDIA-Linux-$PKGVER.run --extract-only
22 changes: 22 additions & 0 deletions runtime-display/nvidia/02-firmware/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
NV_ARCH="undefined"

case "$ABHOST" in
amd64)
NV_ARCH="x86_64"
;;
arm64)
NV_ARCH="aarch64"
;;
*)
abdie "Unsupported architecture"
esac

pushd "$SRCDIR"/NVIDIA-Linux-${NV_ARCH}-${PKGVER}

abinfo "Installing GSP binaries ..."
install -Dvm644 firmware/gsp_ga10x.bin \
"${PKGDIR}"/usr/lib/firmware/nvidia/"${PKGVER}"/gsp_ga10x.bin
install -Dvm644 firmware/gsp_tu10x.bin \
"${PKGDIR}"/usr/lib/firmware/nvidia/"${PKGVER}"/gsp_tu10x.bin

popd
9 changes: 9 additions & 0 deletions runtime-display/nvidia/02-firmware/defines
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PKGNAME=nvidia-firmware
PKGSEC=x11
PKGDES="The proprietary GPS firmwares for NVIDIA cards"

PKGCONFL="nvidia<=565.77"
PKGBREAK="nvidia<=565.77"
ABSTRIP=0

FAIL_ARCH="!(amd64|arm64)"
Loading