diff --git a/nvidia/.footprint b/nvidia/.footprint index 82b509642..d481a7336 100644 --- a/nvidia/.footprint +++ b/nvidia/.footprint @@ -2,6 +2,9 @@ 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// @@ -15,34 +18,52 @@ 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/ --rwxr-xr-x root/root usr/lib/libGL.so.390.77 -lrwxrwxrwx root/root usr/lib/libGL_so_1_2_nvidia -> libGL.so.390.77 -lrwxrwxrwx root/root usr/lib/libOpenCL.so -> libOpenCL.so.1.0.0 +lrwxrwxrwx root/root usr/lib/libEGL_nvidia.so.0 -> libEGL_nvidia.so. +-rwxr-xr-x root/root usr/lib/libEGL_nvidia.so.390.77 +lrwxrwxrwx root/root usr/lib/libGLESv1_CM_nvidia.so.1 -> libGLESv1_CM_nvidia.so.390.77 +-rwxr-xr-x root/root usr/lib/libGLESv1_CM_nvidia.so.390.77 +lrwxrwxrwx root/root usr/lib/libGLESv2_nvidia.so.2 -> libGLESv2_nvidia.so.390.77 +-rwxr-xr-x root/root usr/lib/libGLESv2_nvidia.so.390.77 +lrwxrwxrwx root/root usr/lib/libGLX_nvidia.so.0 -> libGLX_nvidia.so.390.77 +-rwxr-xr-x root/root usr/lib/libGLX_nvidia.so.390.77 -rwxr-xr-x root/root usr/lib/libOpenCL.so.1.0.0 +lrwxrwxrwx root/root usr/lib/libcuda.so -> libcuda.so.390.77 +lrwxrwxrwx root/root usr/lib/libcuda.so.1 -> libcuda.so.390.77 -rwxr-xr-x root/root usr/lib/libcuda.so.390.77 -lrwxrwxrwx root/root usr/lib/libnvcuvid.so -> libnvcuvid.so.390.77 -lrwxrwxrwx root/root usr/lib/libnvcuvid.so.1 -> libnvcuvid.so.390.77 -rwxr-xr-x root/root usr/lib/libnvcuvid.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-cfg.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-compiler.so.390.77 +-rwxr-xr-x root/root usr/lib/libnvidia-eglcore.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-encode.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-fatbinaryloader.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-fbc.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-glcore.so.390.77 +-rwxr-xr-x root/root usr/lib/libnvidia-glsi.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-gtk2.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-gtk3.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-ifr.so.390.77 -lrwxrwxrwx root/root usr/lib/libnvidia-ml.so -> libnvidia-ml.so.390.77 -lrwxrwxrwx root/root usr/lib/libnvidia-ml.so.1 -> libnvidia-ml.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-ml.so.390.77 +lrwxrwxrwx root/root usr/lib/libnvidia-opencl.so -> libnvidia-opencl.so.390.77 +lrwxrwxrwx root/root usr/lib/libnvidia-opencl.so.1 -> libnvidia-opencl.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-opencl.so.390.77 +lrwxrwxrwx root/root usr/lib/libnvidia-ptxjitcompiler.so -> libnvidia-ptxjitcompiler.so.390.77 +lrwxrwxrwx root/root usr/lib/libnvidia-ptxjitcompiler.so.1 -> libnvidia-ptxjitcompiler.so.390.77 +-rwxr-xr-x root/root usr/lib/libnvidia-ptxjitcompiler.so.390.77 -rwxr-xr-x root/root usr/lib/libnvidia-tls.so.390.77 +drwxr-xr-x root/root usr/lib/nvidia/ +drwxr-xr-x root/root usr/lib/nvidia/xorg/ +lrwxrwxrwx root/root usr/lib/nvidia/xorg/libglx.so -> libglx.so.390.77 +lrwxrwxrwx root/root usr/lib/nvidia/xorg/libglx.so.1 -> libglx.so.390.77 +-rwxr-xr-x root/root usr/lib/nvidia/xorg/libglx.so.390.77 drwxr-xr-x root/root usr/lib/tls/ -rwxr-xr-x root/root usr/lib/tls/libnvidia-tls.so.390.77 drwxr-xr-x root/root usr/lib/vdpau/ @@ -54,19 +75,17 @@ 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/ --rwxr-xr-x root/root usr/lib/xorg/modules/extensions/libglx.so.390.77 -lrwxrwxrwx root/root usr/lib/xorg/modules/extensions/libglx_so_nvidia -> libglx.so.390.77 --rwxr-xr-x root/root usr/lib/xorg/modules/libnvidia-wfb.so.390.77 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/man/ -drwxr-xr-x root/root usr/share/man/man1/ --rw-r--r-- root/root usr/share/man/man1/nvidia-persistenced.1.gz --rw-r--r-- root/root usr/share/man/man1/nvidia-settings.1.gz --rw-r--r-- root/root usr/share/man/man1/nvidia-smi.1.gz --rw-r--r-- root/root usr/share/man/man1/nvidia-xconfig.1.gz +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-390.77-key-documentation +-rw-r--r-- root/root usr/share/nvidia/nvidia-application-profiles-390.77-rc drwxr-xr-x root/root usr/share/pixmaps/ -rw-r--r-- root/root usr/share/pixmaps/nvidia-settings.png diff --git a/nvidia/.md5sum b/nvidia/.md5sum index f9b400818..8e9adcd01 100644 --- a/nvidia/.md5sum +++ b/nvidia/.md5sum @@ -1,2 +1,3 @@ +2097834b5b5f1fca0b82dd5518e11cb6 10-nvidia-drm-outputclass.conf 4511024cc556d0c6e7c467b6789524e2 90-nvidia-uvm.rules -6b17b58232eb02f1563319a1a78898c6 NVIDIA-Linux-x86_64-390.77.run +d741d5bb82146f1a90839fea781c07f3 NVIDIA-Linux-x86_64-390.77-no-compat32.run diff --git a/nvidia/.signature b/nvidia/.signature index 0f0297234..bbf7b6f06 100644 --- a/nvidia/.signature +++ b/nvidia/.signature @@ -1,6 +1,7 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/Y72bRyWJNdPqJFh+G1LOiePVxwRxPm94axWyzxypKFjnt6pHeR6o65w81lxgo215ScXIIrzIShP47oTKZIbrgw= -SHA256 (Pkgfile) = 62eb310a273bca81299d1d0b8c288e0b9b509733e7c884be41b340285015b94b -SHA256 (.footprint) = a3a7494c359b635a45f54c1b3b79395284774b089c55e29e5ab078897970c885 -SHA256 (NVIDIA-Linux-x86_64-390.77.run) = e51c5784520e73c179a57cf0dcd3a4c673d8142b28415a060066d83633637282 +RWSE3ohX2g5d/Tja9Skvi5LFu+c5VqWVOwqfylM/P2Ed7n63BkjLuglDsQY/bxbWNF5i9NVCp2BNrD/8hyMvmo2+I0Nho3GM2wQ= +SHA256 (Pkgfile) = ae3cf0969ae777f33673131c694e5131aa3579418f77e82421b3469a081b9bc3 +SHA256 (.footprint) = 2898477f874e0b8f1acd0fec90830b4d067a0b8343a888793ebfa91ee10a95d6 +SHA256 (NVIDIA-Linux-x86_64-390.77-no-compat32.run) = 6eb950dc4b59697d12d79a975b2c21a5e3cde49a12b61432d7e836110a06a6ea SHA256 (90-nvidia-uvm.rules) = c35c61cebf5bf9a112ac06539bdc670a388afa4b50a7f8223a114fbeafedb140 +SHA256 (10-nvidia-drm-outputclass.conf) = 4a72c70d7e348102f8c159b3f58973218bc740de1d86830f7cbee1c40744929c diff --git a/nvidia/10-nvidia-drm-outputclass.conf b/nvidia/10-nvidia-drm-outputclass.conf new file mode 100644 index 000000000..ec56317bc --- /dev/null +++ b/nvidia/10-nvidia-drm-outputclass.conf @@ -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 diff --git a/nvidia/Pkgfile b/nvidia/Pkgfile index a9ecb594e..5fdbab81d 100644 --- a/nvidia/Pkgfile +++ b/nvidia/Pkgfile @@ -1,87 +1,126 @@ -# Description: nVIDIA Linux Display Driver (long lived branch version) +# Description: NVIDIA Linux Display Driver (long lived branch) # URL: http://www.nvidia.com/ # Maintainer: Matt Housh, jaeger at crux dot ninja -# Depends on: gtk gl-select +# Depends on: gtk gtk3 libglvnd name=nvidia version=390.77 -release=1 -source=(http://us.download.nvidia.com/XFree86/Linux-x86_64/$version/NVIDIA-Linux-x86_64-$version.run \ - 90-nvidia-uvm.rules) +release=2 +source=(http://us.download.nvidia.com/XFree86/Linux-x86_64/$version/NVIDIA-Linux-x86_64-$version-no-compat32.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 + sh NVIDIA-Linux-x86_64-$version-no-compat32.run --extract-only + cd NVIDIA-Linux-x86_64-$version-no-compat32 - # libraries - install -d $PKG/usr/lib/{tls,vdpau} - install -m 0755 libGL.so.$version $PKG/usr/lib - install -m 0755 libOpenCL.so.1.0.0 $PKG/usr/lib - install -m 0755 libcuda.so.$version $PKG/usr/lib - install -m 0755 libnvidia-cfg.so.$version $PKG/usr/lib - install -m 0755 libnvidia-compiler.so.$version $PKG/usr/lib - install -m 0755 libnvidia-encode.so.$version $PKG/usr/lib - install -m 0755 libnvidia-fbc.so.$version $PKG/usr/lib - install -m 0755 libnvidia-glcore.so.$version $PKG/usr/lib - install -m 0755 libnvidia-gtk2.so.$version $PKG/usr/lib - install -m 0755 libnvidia-gtk3.so.$version $PKG/usr/lib - install -m 0755 libnvidia-ifr.so.$version $PKG/usr/lib - install -m 0755 libnvidia-ml.so.$version $PKG/usr/lib - install -m 0755 libnvidia-opencl.so.$version $PKG/usr/lib - install -m 0755 libnvidia-tls.so.$version $PKG/usr/lib - install -m 0755 libnvcuvid.so.$version $PKG/usr/lib - install -m 0755 tls/libnvidia-tls.so.$version $PKG/usr/lib/tls - install -m 0755 libvdpau_nvidia.so.$version $PKG/usr/lib/vdpau - install -m 0755 libnvidia-fatbinaryloader.so.$version $PKG/usr/lib + # 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 libglx.so.$version $PKG/usr/lib/nvidia/xorg/ + ln -s libglx.so.$version $PKG/usr/lib/nvidia/xorg/libglx.so + ln -s libglx.so.$version $PKG/usr/lib/nvidia/xorg/libglx.so.1 - 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 + # 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 - ln -s libnvcuvid.so.$version $PKG/usr/lib/libnvcuvid.so.1 - ln -s libnvcuvid.so.$version $PKG/usr/lib/libnvcuvid.so + # 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/ - 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 + # 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.$verison $PKG/usr/lib/libEGL_nvidia.so.0 - ln -s libOpenCL.so.1.0.0 $PKG/usr/lib/libOpenCL.so + # vulkan ICD config + install -d $PKG/etc/vulkan/icd.d + sed -i -e 's,__NV_VK_ICD__,libGLX_nvidia.so.0,g' nvidia_icd.json.template + install -m 0644 nvidia_icd.json.template $PKG/etc/vulkan/icd.d/nvidia_icd.json - # xorg driver/extensions - install -d $PKG/usr/lib/xorg/modules/{drivers,extensions} - install -m 0755 nvidia_drv.so $PKG/usr/lib/xorg/modules/drivers - install -m 0755 libglx.so.$version $PKG/usr/lib/xorg/modules/extensions - install -m 0755 libnvidia-wfb.so.$version $PKG/usr/lib/xorg/modules + # 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/ - # nvidia programs amd man-pages - install -d $PKG/usr/{bin,share/man/man1} - install -m 0755 nvidia-{debugdump,persistenced,settings,smi,xconfig} \ - $PKG/usr/bin - install -m 0644 nvidia-{persistenced,settings,smi,xconfig}.1.gz \ - $PKG/usr/share/man/man1 + # 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 - # desktop file and icon - install -d $PKG/usr/share/{applications,pixmaps} - sed -i 's:__UTILS_PATH__:/usr/bin: ; 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 + # 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-fatbinaryloader.so.$version $PKG/usr/lib/ + 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 - # additional symlinks required by gl-select - ln -s libGL.so.$version $PKG/usr/lib/libGL_so_1_2_nvidia - ln -s libglx.so.$version $PKG/usr/lib/xorg/modules/extensions/libglx_so_nvidia + # 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 - # opencl icd file - install -m 0644 -D 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/ - # nvidia-uvm module udev rule - install -d $PKG/lib/udev/rules.d - install -m 0644 $SRC/90-nvidia-uvm.rules $PKG/lib/udev/rules.d/90-nvidia-uvm.rules + # TLS libraries + install -m 0755 libnvidia-tls.so.$version $PKG/usr/lib/ + install -d $PKG/usr/lib/tls + install -m 0755 tls/libnvidia-tls.so.$version $PKG/usr/lib/tls/ - # nvidia-settings registry key file - install -D -m 0644 nvidia-application-profiles-$version-key-documentation \ - $PKG/usr/share/nvidia/nvidia-application-profiles-$version-key-documentation + # monitoring and management API library + install -m 0755 libnvidia-ml.so.$version $PKG/usr/lib/ - # kernel modules - cd kernel - IGNORE_CC_MISMATCH=1 make module - install -d -m 0755 $PKG/lib/modules/`uname -r`/extra - install -m 0644 *.ko $PKG/lib/modules/`uname -r`/extra/ + # 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/ + + # 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/ } diff --git a/nvidia/README b/nvidia/README index 719bfc407..180ad697d 100644 --- a/nvidia/README +++ b/nvidia/README @@ -1,5 +1,5 @@ -README for nvidia 1xx.xx +README for nvidia 1xx.xx+ @@ -7,38 +7,3 @@ README for nvidia 1xx.xx If using udev, add your user to the "video" group to be able to use the nvidia devices required for 3d to function properly. - - -*** NOTE for users of legacy hardware *** - -Before installing this port, take a look at the Legacy GPU list on -nvidia's site: http://www.nvidia.com/object/IO_32667.html - -If your hardware is supported by either the 1.0-96xx or 1.0-71xx -driver series, install the corresponding port instead of this one. - - - -POST-INSTALL - -Use opt/gl-select from ports to select the correct gl/glx -libraries and extensions like so: - - # gl-select use nvidia - - -POST-REMOVE - -Use opt/gl-select from ports to revert to the xorg gl/glx libraries -and extensions like so: - - # gl-select use xorg - - -When UPGRADING/DOWNGRADING the nvidia port (where the version changes), -use gl-select to revert to xorg and then re-select nvidia in order to -refresh the libGLcore and libGL symlinks, like so: - - # prt-get update nvidia - # gl-select use xorg; gl-select use nvidia - diff --git a/nvidia/pre-install b/nvidia/pre-install new file mode 100755 index 000000000..ffb223830 --- /dev/null +++ b/nvidia/pre-install @@ -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