├── version.in ├── meson.build ├── .gitmodules ├── Readme_nvml.txt ├── nvml_setup.sh ├── .github └── workflows │ └── artifacts.yml ├── bottles_setup.sh ├── proton_setup.sh ├── LICENSE ├── setup_nvlibs.sh ├── package-release.sh └── README.md /version.in: -------------------------------------------------------------------------------- 1 | @VCS_TAG@ 2 | -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | project('nvidia-libs', ['c'], version: 'v0.9.0', license: 'mixed') 2 | 3 | nvlibs_version = vcs_tag( 4 | command: ['git', 'describe', '--always', '--tags', '--long', '--dirty=+'], 5 | input: 'version.in', 6 | output: 'version') 7 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "dxvk-nvapi"] 2 | path = dxvk-nvapi 3 | url = https://github.com/SveSop/dxvk-nvapi.git 4 | [submodule "wine-nvoptix"] 5 | path = wine-nvoptix 6 | url = https://github.com/SveSop/wine-nvoptix.git 7 | [submodule "wine-nvml"] 8 | path = wine-nvml 9 | url = https://github.com/SveSop/wine-nvml.git 10 | [submodule "nvcuda"] 11 | path = nvcuda 12 | url = https://github.com/SveSop/nvcuda.git 13 | [submodule "nvenc"] 14 | path = nvenc 15 | url = https://github.com/SveSop/nvenc.git 16 | -------------------------------------------------------------------------------- /Readme_nvml.txt: -------------------------------------------------------------------------------- 1 | WINE-NVML 2 | 3 | Due to upstream changes, nvml lib can no longer be symlinked to the prefix. 4 | See: https://github.com/Saancreed/wine-nvml/blob/master/README.md 5 | 6 | You can use nvml_setup.sh script incuded to install nvml into your 7 | wine binary folders. Using a custom wine install is recommended for this 8 | as using system wine install requires root access and file placements MAY 9 | differ from various distros. 10 | 11 | You can use WINEDLLPATH env variable with wine. 12 | eg. WINEDLLPATH='/home/my-user/nvidia-libs/x64/wine' 13 | 14 | When using >= wine-10, this will make the PE version (nvml.dll) install into 15 | the WINEPREFIX. With older versions of wine, this needs manual copy/symlink 16 | to the WINEPREFIX. 17 | 18 | Only 64bit NVML is provided. 19 | -------------------------------------------------------------------------------- /nvml_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nvlibs_dir="$(dirname "$(readlink -fm "$0")")" 4 | arch='x86_64' 5 | bits='x64' 6 | 7 | if [ ! -f "$nvlibs_dir/$bits/wine/$arch-unix/nvml.so" ]; then 8 | echo "Files not found in $nvlibs_dir/$bits/wine/$arch-unix" >&2 9 | exit 1 10 | fi 11 | 12 | if [ -z "$WINE_BIN" ]; then 13 | echo -ne "WINE_BIN is not set!\n" 14 | echo -ne "Example: WINE_BIN='/home/user/winebinaries/wine-staging/'\n" 15 | echo -ne "OBS. Installing to system wine install is not recommended.\n" 16 | echo -ne "Better use custom wine binary.\n" 17 | exit 1 18 | fi 19 | 20 | if [[ -d "$WINE_BIN/lib/wine/$arch-windows" ]]; then 21 | lib="lib/wine" 22 | elif [[ -d "$WINE_BIN/lib64/wine/$arch-windows" ]]; then 23 | lib="lib64/wine" 24 | fi 25 | 26 | if [ ! -f "$WINE_BIN/$lib/$arch-windows/dxgi.dll" ]; then 27 | echo -ne "Wine binaries not found in $WINE_BIN! Wine not installed or wrong path!\n" >&2 28 | exit 1 29 | fi 30 | 31 | function win_install { 32 | cp -f "$nvlibs_dir/$bits/wine/$arch-windows/$1" "$WINE_BIN/$lib/$arch-windows/" 33 | } 34 | 35 | function install { 36 | cp -f "$nvlibs_dir/$bits/wine/$arch-unix/$1" "$WINE_BIN/$lib/$arch-unix/" 37 | } 38 | 39 | win_install nvml.dll 40 | install nvml.so 41 | 42 | echo -ne "All done - NVML copied to $WINE_BIN\n" 43 | echo -ne "You need to run wineboot -u with a wineprefix to use nvml!\n" 44 | -------------------------------------------------------------------------------- /.github/workflows/artifacts.yml: -------------------------------------------------------------------------------- 1 | name: Artifacts (Package) 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | tags: [ v* ] 7 | pull_request: 8 | branches: [ master ] 9 | workflow_dispatch: 10 | 11 | jobs: 12 | build-artifacts: 13 | runs-on: ubuntu-24.04 14 | 15 | steps: 16 | - name: Checkout code 17 | uses: actions/checkout@v4 18 | with: 19 | submodules: recursive 20 | fetch-depth: 0 21 | 22 | - name: Prepare environment (none-tag) 23 | if: github.ref_type != 'tag' 24 | run: | 25 | export VERSION="${GITHUB_REF##*/}-${GITHUB_SHA##*/}" 26 | echo "VERSION=${VERSION}" >> $GITHUB_ENV 27 | echo "ARTIFACT=build/nvidia-libs-${VERSION}" >> $GITHUB_ENV 28 | 29 | - name: Prepare environment (tag) 30 | if: github.ref_type == 'tag' 31 | run: | 32 | export VERSION=$(git describe --always --tags --dirty=+) 33 | echo "VERSION=${VERSION}" >> $GITHUB_ENV 34 | echo "ARTIFACT=build/nvidia-libs-${VERSION}" >> $GITHUB_ENV 35 | 36 | - name: Setup problem matcher 37 | uses: Joshua-Ashton/gcc-problem-matcher@v3 38 | 39 | - name: Build 40 | uses: SveSop/ubuntu-mingw-github-action@v2 41 | with: 42 | command: | 43 | ./package-release.sh "${{ env.VERSION }}" build 44 | 45 | - name: Upload artifacts 46 | uses: actions/upload-artifact@v4 47 | with: 48 | name: nvidia-libs-${{ env.VERSION }} 49 | path: ${{ env.ARTIFACT }} 50 | if-no-files-found: error 51 | -------------------------------------------------------------------------------- /bottles_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nvlibs_dir="$(dirname "$(readlink -fm "$0")")" 4 | bottles_dir="$HOME/.var/app/com.usebottles.bottles/data/bottles/bottles" 5 | win='drive_c/windows/system32' 6 | lib='x64' 7 | 8 | if [ ! -f "$nvlibs_dir/$lib/nvcuda.dll" ]; then 9 | echo "Files not found in $nvlibs_dir/$lib" >&2 10 | exit 1 11 | fi 12 | 13 | if [ -z "$1" ]; then 14 | echo -ne "BOTTLE is not set!\n" 15 | echo -ne "This is a list of your available bottles:\n" 16 | echo -ne "\n=========================================\n" 17 | ls -1 $bottles_dir 18 | echo -ne "=========================================\n\n" 19 | echo -ne "Specify your bottle. Eg: ./bottles-install.sh MyBottle\n" 20 | exit 1 21 | fi 22 | 23 | if [ ! -f "$bottles_dir/$1/$win/dxgi.dll" ]; then 24 | echo -ne "Windows files not found in $bottles_dir\$1! check bottle installation\n" >&2 25 | exit 1 26 | else 27 | BOTTLE="$1" 28 | fi 29 | 30 | function install { 31 | cp -f "$nvlibs_dir/$lib/$1" "$bottles_dir/$BOTTLE/$win/" 32 | } 33 | 34 | fun=install 35 | $fun nvcuda.dll 36 | $fun nvcuvid.dll 37 | $fun nvencodeapi64.dll 38 | $fun nvoptix.dll 39 | $fun nvofapi64.dll 40 | 41 | lib='x32' 42 | if [ -f "$nvlibs_dir/$lib/nvcuda.dll" ]; then 43 | win='drive_c/windows/syswow64' 44 | $fun nvcuda.dll 45 | $fun nvcuvid.dll 46 | $fun nvencodeapi.dll 47 | fi 48 | 49 | echo -ne "All done - NVIDIA libraries copied to $BOTTLE\n" 50 | 51 | echo -ne "Do you want to add the experimental version of nvapi to Bottles? (Y/N):\n" 52 | read -n 1 -r response 53 | echo 54 | if [[ "$response" =~ ^[Yy]$ ]]; then 55 | lib='x64' 56 | nvapi_ver="dxvk-nvapi-$(cat version | grep DXVK | cut -d' ' -f2- | tr -d '\"')" 57 | nvapi_dir="$HOME/.var/app/com.usebottles.bottles/data/bottles/nvapi/$nvapi_ver" 58 | if [ -f "$nvapi_dir/$lib/nvapi64.dll" ]; then 59 | echo -ne "Already installed! Skipping\n" >&2 60 | else 61 | echo -ne "Adding NVAPI to:\n $nvapi_dir\n\n" 62 | mkdir -p "$nvapi_dir/$lib" 63 | cp -f "$nvlibs_dir/$lib/nvapi64.dll" "$nvapi_dir/$lib" 64 | cp -f "$nvlibs_dir/$lib/nvofapi64.dll" "$nvapi_dir/$lib" 65 | cp -f "$nvlibs_dir/bin/nvapi64-tests.exe" "$nvapi_dir/$lib" 66 | cp -f "$nvlibs_dir/bin/nvofapi64-tests.exe" "$nvapi_dir/$lib" 67 | lib='x32' 68 | mkdir -p "$nvapi_dir/$lib" 69 | cp -f "$nvlibs_dir/$lib/nvapi.dll" "$nvapi_dir/$lib" 70 | echo -ne "To use the custom nvapi version you need to select:\n $nvapi_ver\nAs your nvapi version in bottles settings!\n\n" 71 | fi 72 | else 73 | echo -ne "Skipping experimental version of nvapi\n\n" 74 | fi 75 | 76 | echo -ne "Remeber! You need to run this script every time you upgrade the nvidia-libs package\n" 77 | echo -ne "and probably should if you upgrade/change your runner\n" 78 | -------------------------------------------------------------------------------- /proton_setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nvlibs_dir="$(dirname "$(readlink -fm "$0")")" 4 | lib='lib/wine' 5 | arch='i386' 6 | 7 | if [ ! -f "$nvlibs_dir/x32/nvcuda.dll" ]; then 8 | echo "Files not found in $nvlibs_dir" >&2 9 | exit 1 10 | fi 11 | 12 | if [ -z "$PROTON_LIBS" ]; then 13 | echo -ne "PROTON_LIBS is not set!\n" 14 | echo -ne "Example: PROTON_LIBS='$HOME/.steam/steam/steamapps/common/Proton - Experimental'\n" 15 | exit 1 16 | else 17 | PROTON_LIBS="$(readlink -fm "$PROTON_LIBS")" 18 | fi 19 | 20 | if [ ! -f "$PROTON_LIBS/files/$lib/$arch-windows/dxgi.dll" ]; then 21 | echo -ne "Proton files not found in $PROTON_LIBS! Proton not installed or wrong path!\n" >&2 22 | exit 1 23 | fi 24 | 25 | # proton 10/Experimental support 26 | if [ -d "$PROTON_LIBS/files/$lib/nvapi/$arch-windows" ]; then 27 | cp -f "$nvlibs_dir/x32/nvapi.dll" "$PROTON_LIBS/files/$lib/nvapi/$arch-windows" 28 | else 29 | cp -f "$nvlibs_dir/x32/nvapi.dll" "$PROTON_LIBS/files/$lib/nvapi" 30 | fi 31 | cp -f "$nvlibs_dir/x32/nvcuda.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvcuda.dll" 32 | cp -f "$nvlibs_dir/x32/nvcuvid.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvcuvid.dll" 33 | cp -f "$nvlibs_dir/x32/nvencodeapi.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvencodeapi.dll" 34 | ln -sfr "$PROTON_LIBS/files/$lib/$arch-windows/nvcuvid.dll" "$PROTON_LIBS/files/share/default_pfx/drive_c/windows/syswow64/nvcuvid.dll" 35 | ln -sfr "$PROTON_LIBS/files/$lib/$arch-windows/nvencodeapi.dll" "$PROTON_LIBS/files/share/default_pfx/drive_c/windows/syswow64/nvencodeapi.dll" 36 | 37 | arch='x86_64' 38 | 39 | # proton 10/Experimental support 40 | if [ -d "$PROTON_LIBS/files/lib64/wine" ]; then 41 | lib='lib64/wine' 42 | elif [ -d "$PROTON_LIBS/files/lib/wine" ]; then 43 | lib='lib/wine' 44 | else 45 | echo -ne "Proton files not found in $PROTON_LIBS! Proton not installed or wrong path!\n" >&2 46 | exit 1 47 | fi 48 | 49 | if [ -d "$PROTON_LIBS/files/$lib/nvapi/$arch-windows" ]; then 50 | 51 | cp -f "$nvlibs_dir/x64/nvapi64.dll" "$PROTON_LIBS/files/$lib/nvapi/$arch-windows" 52 | cp -f "$nvlibs_dir/x64/nvofapi64.dll" "$PROTON_LIBS/files/$lib/nvapi/$arch-windows" 53 | else 54 | cp -f "$nvlibs_dir/x64/nvapi64.dll" "$PROTON_LIBS/files/$lib/nvapi" 55 | cp -f "$nvlibs_dir/x64/nvofapi64.dll" "$PROTON_LIBS/files/$lib/nvapi" 56 | fi 57 | cp -f "$nvlibs_dir/x64/nvcuda.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvcuda.dll" 58 | cp -f "$nvlibs_dir/x64/nvcuvid.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvcuvid.dll" 59 | cp -f "$nvlibs_dir/x64/nvencodeapi64.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvencodeapi64.dll" 60 | cp -f "$nvlibs_dir/x64/nvoptix.dll" "$PROTON_LIBS/files/$lib/$arch-windows/nvoptix.dll" 61 | 62 | ln -sfr "$PROTON_LIBS/files/$lib/$arch-windows/nvcuvid.dll" "$PROTON_LIBS/files/share/default_pfx/drive_c/windows/system32/nvcuvid.dll" 63 | ln -sfr "$PROTON_LIBS/files/$lib/$arch-windows/nvencodeapi64.dll" "$PROTON_LIBS/files/share/default_pfx/drive_c/windows/system32/nvencodeapi64.dll" 64 | ln -sfr "$PROTON_LIBS/files/$lib/$arch-windows/nvoptix.dll" "$PROTON_LIBS/files/share/default_pfx/drive_c/windows/system32/nvoptix.dll" 65 | 66 | echo -n "Do you want to install 64-bit NVML files to proton? (This can break games like Portal RTX!) (Y/N): " 67 | read -n 1 -r response 68 | echo 69 | if [[ "$response" =~ ^[Yy]$ ]]; then 70 | echo -ne "Copying 64-bit NVML files..." 71 | cp -f "$nvlibs_dir/x64/wine/$arch-unix/nvml.so" "$PROTON_LIBS/files/$lib/$arch-unix" 72 | cp -f "$nvlibs_dir/x64/wine/$arch-windows/nvml.dll" "$PROTON_LIBS/files/$lib/$arch-windows" 73 | ln -sfr "$PROTON_LIBS/files/$lib/$arch-windows/nvml.dll" "$PROTON_LIBS/files/share/default_pfx/drive_c/windows/system32/nvml.dll" 74 | echo -ne "NVML Copied successfully\n" 75 | else 76 | echo -ne "Skipping NVML files\n" 77 | fi 78 | 79 | echo -ne "All done - Files dropped in $PROTON_LIBS\n" 80 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Wine Staging license 2 | ==================== 3 | 4 | **Note:** Some files in this repository are provided under a different license. 5 | Please check the list of exceptions below. Unless stated otherwise all files 6 | are part of **Wine Staging** and are licensed under the terms of the 7 | [LGPLv2.1](#gnu-lgpl-version-21), to stay compatible with Wine: 8 | 9 | ``` 10 | Copyright (C) 2014-2017 the Wine Staging project authors. 11 | Copyright (C) 2018 Alistair Leslie-Hughes 12 | 13 | Wine Staging is free software; you can redistribute it and/or 14 | modify it under the terms of the GNU Lesser General Public 15 | License as published by the Free Software Foundation; either 16 | version 2.1 of the License, or (at your option) any later version. 17 | 18 | This program is distributed in the hope that it will be useful, 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | Lesser General Public License for more details. 22 | 23 | A copy of the GNU Lesser General Public License is included below. 24 | If you did not receive this copy, write to the Free Software Foundation, 25 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 26 | ``` 27 | 28 | ### Exceptions 29 | 30 | The following files are not part of Wine Staging and provided under a 31 | different license. These files are not linked to the rest of the project in 32 | any way and are simply installed for end-user convenience. 33 | 34 | * `dxvk-nvapi - Subproject` 35 | 36 | MIT License 37 | 38 | Copyright (c) 2020 Jens Peters 39 | 40 | Permission is hereby granted, free of charge, to any person obtaining a copy 41 | of this software and associated documentation files (the "Software"), to deal 42 | in the Software without restriction, including without limitation the rights 43 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 44 | copies of the Software, and to permit persons to whom the Software is 45 | furnished to do so, subject to the following conditions: 46 | 47 | The above copyright notice and this permission notice shall be included in all 48 | copies or substantial portions of the Software. 49 | 50 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 51 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 52 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 53 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 54 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 55 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 56 | SOFTWARE. 57 | 58 | * `nvml - nVidia Management Library header - nvml.h` 59 | * `nvapi header - nvapi.h` 60 | 61 | Copyright 1993-2020 NVIDIA Corporation. All rights reserved. 62 | 63 | NOTICE TO USER: 64 | 65 | This source code is subject to NVIDIA ownership rights under U.S. and 66 | international Copyright laws. Users and possessors of this source code 67 | are hereby granted a nonexclusive, royalty-free license to use this code 68 | in individual and commercial software. 69 | 70 | NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE 71 | CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR 72 | IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH 73 | REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF 74 | MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. 75 | IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, 76 | OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 77 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 78 | OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE 79 | OR PERFORMANCE OF THIS SOURCE CODE. 80 | 81 | U.S. Government End Users. This source code is a "commercial item" as 82 | that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of 83 | "commercial computer software" and "commercial computer software 84 | documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) 85 | and is provided to the U.S. Government only as a commercial end item. 86 | Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through 87 | 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the 88 | source code with only those rights set forth herein. 89 | 90 | Any use of this source code in individual and commercial software must 91 | include, in the user documentation and internal comments to the code, 92 | the above Disclaimer and U.S. Government End Users Notice. 93 | 94 | -------------------------------------------------------------------------------- /setup_nvlibs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | nvlibs_dir="$(dirname "$(readlink -fm "$0")")" 4 | lib='x64' 5 | 6 | if [ ! -f "$nvlibs_dir/$lib/nvcuda.dll" ]; then 7 | echo "Files not found in $nvlibs_dir/$lib" >&2 8 | exit 1 9 | fi 10 | 11 | if [ -z "$WINEPREFIX" ]; then 12 | echo -ne "WINEPREFIX is not set! This may create a wineprefix in the default distro folder)\nContinue? (Y/N)\n" 13 | old_stty_cfg=$(stty -g) 14 | stty raw -echo ; answer=$(head -c 1) ; stty $old_stty_cfg 15 | if echo "$answer" |grep -iq "^y" ;then 16 | wineboot -u 17 | else 18 | exit 1 19 | fi 20 | else 21 | if ! [ -f "$WINEPREFIX/system.reg" ]; then 22 | echo -ne "WINEPREFIX does not point to an existing wine installation.\nProceeding will create a new one in $WINEPREFIX\nContinue? (Y/N)\n" 23 | old_stty_cfg=$(stty -g) 24 | stty raw -echo ; answer=$(head -c 1) ; stty $old_stty_cfg 25 | if echo "$answer" |grep -iq "^y" ;then 26 | wineboot -u 27 | else 28 | exit 1 29 | fi 30 | fi 31 | fi 32 | 33 | wine_path="$(which wine 2>/dev/null)" 34 | wine64_path="$(which wine64 2>/dev/null)" 35 | 36 | if [ -n "$wine_path" ] && [ -n "$wine64_path" ] && [ "$(dirname "$wine_path")" != "$(dirname "$wine64_path")" ]; then 37 | echo "Multiple Wine installations detected:" 38 | echo "1) $wine_path" 39 | echo "2) $wine64_path" 40 | 41 | while true; do 42 | read -p "Select the Wine binary to use (1 or 2): " choice 43 | case "$choice" in 44 | 1) wine="wine"; break ;; 45 | 2) wine="wine64"; break ;; 46 | *) echo "Invalid choice. Please enter 1 or 2." ;; 47 | esac 48 | done 49 | else 50 | if [ -n "$wine_path" ]; then 51 | wine="wine" 52 | fi 53 | if [ -n "$wine64_path" ]; then 54 | wine="wine64" 55 | fi 56 | fi 57 | 58 | winever=$($wine --version | grep wine) 59 | if [ -z "$winever" ]; then 60 | echo "$wine: Not a wine executable. Check your $wine." >&2 61 | exit 1 62 | fi 63 | echo "Using: $winever" 64 | 65 | win64=true 66 | win32=true 67 | 68 | win64_sys_path="$($wine cmd /c '%SystemRoot%\system32\winepath.exe -u C:\windows\system32' 2>/dev/null)" 69 | win64_sys_path="${win64_sys_path/$'\r'/}" 70 | 71 | [ -z "$win64_sys_path" ] && win64=false 72 | 73 | if grep --quiet -e '#arch=win32' "${WINEPREFIX:-$HOME/.wine}/system.reg"; then 74 | win32_sys_path=$win64_sys_path 75 | win64=false 76 | win32=true 77 | else 78 | win32_sys_path="$($wine cmd /c '%SystemRoot%\syswow64\winepath.exe -u C:\windows\system32' 2>/dev/null)" 79 | win32_sys_path="${win32_sys_path/$'\r'/}" 80 | 81 | [ -z "$win32_sys_path" ] && win32=false 82 | fi 83 | 84 | if [ -z "$win32_sys_path" ] && [ -z "$win64_sys_path" ]; then 85 | echo 'Failed to resolve C:\windows\system32.' >&2 86 | exit 1 87 | fi 88 | 89 | function removeOverride { 90 | echo " Removing override... " 91 | $wine reg delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v "$1" /f > /dev/null 2>&1 92 | if [ $? -ne 0 ]; then 93 | echo " Override does not exist for $1, trying next..." 94 | exit=2 95 | fi 96 | local dll="$sys_path/$1.dll" 97 | echo " Removing symlink... " 98 | if [ -h "$dll" ]; then 99 | out=$(rm "$dll" 2>&1) 100 | if [ $? -ne 0 ]; then 101 | echo -e "$out" 102 | exit=2 103 | fi 104 | else 105 | echo -e "'$dll' is not a link or doesn't exist." 106 | exit=2 107 | fi 108 | } 109 | 110 | function createOverride { 111 | echo " Creating DLL override... " 112 | $wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v "$1" /d native /f >/dev/null 2>&1 113 | if [ $? -ne 0 ]; then 114 | echo -e " Failed to create override" 115 | exit 1 116 | fi 117 | echo " Creating symlink to $1.dll... " 118 | ln -sf "$nvlibs_dir/$lib/$1.dll" "$sys_path/$1.dll" 119 | if [ $? -ne 0 ]; then 120 | echo -e " Failed to create override" 121 | exit 1 122 | fi 123 | } 124 | 125 | case "$1" in 126 | uninstall) 127 | fun=removeOverride 128 | ;; 129 | install) 130 | fun=createOverride 131 | ;; 132 | *) 133 | echo "Unrecognized option: $1" 134 | echo "Usage: $0 [install|uninstall]" 135 | exit 1 136 | ;; 137 | esac 138 | 139 | if [ $win32 = "true" ]; then 140 | lib='x32' 141 | sys_path="$win32_sys_path" 142 | 143 | if [ -f "$nvlibs_dir/$lib/nvcuda.dll" ]; then 144 | echo '[1/4] 32 bit nvcuda :' 145 | $fun nvcuda 146 | echo '[2/4] 32 bit nvcuvid :' 147 | $fun nvcuvid 148 | echo '[3/4] 32 bit nvencodeapi :' 149 | $fun nvencodeapi 150 | fi 151 | echo '[4/4] 32 bit nvapi :' 152 | $fun nvapi 153 | fi 154 | 155 | if [ $win64 = "true" ]; then 156 | lib='x64' 157 | sys_path="$win64_sys_path" 158 | 159 | echo '[1/6] 64 bit nvcuda :' 160 | $fun nvcuda 161 | echo '[2/6] 64 bit nvoptix :' 162 | $fun nvoptix 163 | echo '[3/6] 64 bit nvcuvid :' 164 | $fun nvcuvid 165 | echo '[4/6] 64 bit nvencodeapi64 :' 166 | $fun nvencodeapi64 167 | echo '[5/6] 64 bit nvapi64 :' 168 | $fun nvapi64 169 | echo '[6/6] 64 bit nvofapi64 :' 170 | $fun nvofapi64 171 | fi 172 | 173 | if [ "$fun" = removeOverride ]; then 174 | echo "Rebooting prefix!" 175 | wineboot -u 176 | echo "All done!" 177 | else 178 | echo "Symlinks created in $WINEPREFIX. Do NOT remove this source folder!" 179 | echo "OBS! NVML is NOT enabled by default. See Readme_nvml.txt for info or run nvml_setup.sh" 180 | echo "You need to REMOVE old overrides if older version of nvml have been used in $WINEPREFIX" 181 | fi 182 | -------------------------------------------------------------------------------- /package-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | shopt -s extglob 6 | 7 | if [ -z "$1" ] || [ -z "$2" ]; then 8 | echo "Usage: $0 release destdir [--no32]" 9 | exit 1 10 | fi 11 | 12 | git submodule update --init --recursive 13 | 14 | VERSION="$1" 15 | NVLIBS_SRC_DIR=$(dirname "$(readlink -f "$0")") 16 | NVLIBS_BUILD_DIR=$(realpath "$2")"/nvidia-libs-$VERSION" 17 | 18 | if [ -e "$NVLIBS_BUILD_DIR" ]; then 19 | echo "Build directory $NVLIBS_BUILD_DIR already exists" 20 | exit 1 21 | fi 22 | 23 | shift 2 24 | 25 | opt_no_32=0 26 | 27 | while [ $# -gt 0 ]; do 28 | case "$1" in 29 | "--no32") 30 | opt_no_32=1 31 | ;; 32 | *) 33 | echo "Unrecognized option: $1" >&2 34 | exit 1 35 | esac 36 | shift 37 | done 38 | 39 | # Make version file 40 | 41 | meson --prefix "$NVLIBS_BUILD_DIR" \ 42 | --strip \ 43 | "$NVLIBS_BUILD_DIR/build" 44 | 45 | cd "$NVLIBS_BUILD_DIR/build" 46 | ninja 47 | 48 | cp "$NVLIBS_BUILD_DIR/build/version" "$NVLIBS_BUILD_DIR/version" 49 | rm -R "$NVLIBS_BUILD_DIR/build" 50 | 51 | # Build NVCUDA 52 | 53 | NVCUDA_SRC_DIR=$NVLIBS_SRC_DIR"/nvcuda" 54 | 55 | function build_arch { 56 | cd "$NVCUDA_SRC_DIR" 57 | 58 | meson --cross-file "$NVCUDA_SRC_DIR/build-wine$1.txt" \ 59 | --buildtype release \ 60 | --prefix "$NVLIBS_BUILD_DIR" \ 61 | --libdir "x$1" \ 62 | --strip \ 63 | "$NVLIBS_BUILD_DIR/build.$1" 64 | 65 | cd "$NVLIBS_BUILD_DIR/build.$1" 66 | ninja install 67 | 68 | rm -R "$NVLIBS_BUILD_DIR/build.$1" 69 | } 70 | 71 | build_arch 64 72 | if [ $opt_no_32 -eq 0 ]; then 73 | build_arch 32 74 | fi 75 | 76 | # Build cuda tests executable 77 | 78 | export WINEARCH="win64" 79 | 80 | cd "$NVCUDA_SRC_DIR" 81 | meson --cross-file "$NVCUDA_SRC_DIR/tests/build-win64.txt" \ 82 | --buildtype release \ 83 | --prefix "$NVLIBS_BUILD_DIR" \ 84 | --libdir bin \ 85 | --strip \ 86 | "$NVLIBS_BUILD_DIR/build.tests" \ 87 | 88 | cd "$NVLIBS_BUILD_DIR/build.tests" 89 | ninja install 90 | 91 | rm -R "$NVLIBS_BUILD_DIR/build.tests" 92 | 93 | # Build NVENC 94 | 95 | NVENC_SRC_DIR=$NVLIBS_SRC_DIR"/nvenc" 96 | 97 | function build_arch { 98 | cd "$NVENC_SRC_DIR" 99 | 100 | meson --cross-file "$NVENC_SRC_DIR/build-wine$1.txt" \ 101 | --buildtype release \ 102 | --prefix "$NVLIBS_BUILD_DIR" \ 103 | --libdir "x$1" \ 104 | --strip \ 105 | "$NVLIBS_BUILD_DIR/build.$1" 106 | 107 | cd "$NVLIBS_BUILD_DIR/build.$1" 108 | ninja install 109 | 110 | rm -R "$NVLIBS_BUILD_DIR/build.$1" 111 | } 112 | 113 | build_arch 64 114 | if [ $opt_no_32 -eq 0 ]; then 115 | build_arch 32 116 | fi 117 | 118 | # Build wine-nvoptix 119 | 120 | NVOPTIX_SRC_DIR=$NVLIBS_SRC_DIR"/wine-nvoptix" 121 | cd $NVOPTIX_SRC_DIR 122 | 123 | meson --cross-file "$NVOPTIX_SRC_DIR/build-wine64.txt" \ 124 | --buildtype release \ 125 | --prefix "$NVLIBS_BUILD_DIR" \ 126 | --libdir x64 \ 127 | --strip \ 128 | "$NVLIBS_BUILD_DIR/build" 129 | 130 | cd "$NVLIBS_BUILD_DIR/build" 131 | ninja install 132 | 133 | rm -R "$NVLIBS_BUILD_DIR/build" 134 | 135 | # Build wine-nvml 136 | 137 | NVML_SRC_DIR=$NVLIBS_SRC_DIR"/wine-nvml" 138 | cd $NVML_SRC_DIR"/src" 139 | ./make_nvml 140 | 141 | function build_arch { 142 | cd $NVML_SRC_DIR 143 | meson --cross-file "$NVML_SRC_DIR/cross-mingw$1.txt" \ 144 | --buildtype release \ 145 | --prefix "$NVLIBS_BUILD_DIR" \ 146 | --libdir "x$1" \ 147 | --strip \ 148 | "$NVLIBS_BUILD_DIR/build.mingw$1" 149 | 150 | cd "$NVLIBS_BUILD_DIR/build.mingw$1" 151 | ninja install 152 | 153 | cd $NVML_SRC_DIR 154 | meson --cross-file "$NVML_SRC_DIR/cross-wine$1.txt" \ 155 | --buildtype release \ 156 | --prefix "$NVLIBS_BUILD_DIR" \ 157 | --libdir "x$1" \ 158 | --strip \ 159 | "$NVLIBS_BUILD_DIR/build.wine$1" 160 | 161 | cd "$NVLIBS_BUILD_DIR/build.wine$1" 162 | ninja install 163 | 164 | rm -R "$NVLIBS_BUILD_DIR/build.mingw$1" 165 | rm -R "$NVLIBS_BUILD_DIR/build.wine$1" 166 | } 167 | 168 | build_arch 64 169 | 170 | # Build dxvk-nvapi 171 | 172 | NVAPI_SRC_DIR=$NVLIBS_SRC_DIR"/dxvk-nvapi" 173 | 174 | crossfile="build-win" 175 | 176 | cd $NVAPI_SRC_DIR 177 | 178 | function prepare { 179 | python3 validate-methods.py \ 180 | src/nvapi.cpp \ 181 | src/nvapi_sys.cpp \ 182 | src/nvapi_disp.cpp \ 183 | src/nvapi_mosaic.cpp \ 184 | src/nvapi_ngx.cpp \ 185 | src/nvapi_drs.cpp \ 186 | src/nvapi_gpu.cpp \ 187 | src/nvapi_d3d.cpp \ 188 | src/nvapi_d3d11.cpp \ 189 | src/nvapi_d3d12.cpp \ 190 | src/nvapi_vulkan.cpp \ 191 | src/nvapi_interface.cpp \ 192 | src/nvapi_interface_private.h \ 193 | external/nvapi/nvapi_interface.h 194 | } 195 | 196 | function build_arch { 197 | cd "$NVAPI_SRC_DIR" 198 | 199 | # remove generated files, because otherwise the existing 200 | # files get into the build instead of the generated ones 201 | rm -f version.h config.h 202 | 203 | meson --cross-file "$NVAPI_SRC_DIR/$crossfile$1.txt" \ 204 | --buildtype release \ 205 | --prefix "$NVLIBS_BUILD_DIR" \ 206 | --strip \ 207 | --bindir "x$1" \ 208 | --libdir "x$1" \ 209 | -Denable_tests=true \ 210 | "$NVLIBS_BUILD_DIR/build.$1" 211 | 212 | cd "$NVLIBS_BUILD_DIR/build.$1" 213 | ninja install 214 | 215 | cp version.h "$NVAPI_SRC_DIR" 216 | cp config.h "$NVAPI_SRC_DIR" 217 | rm -R "$NVLIBS_BUILD_DIR/build.$1" 218 | } 219 | 220 | prepare 221 | build_arch 64 222 | build_arch 32 223 | 224 | # Save the DXVK-NVAPI version to nvidia libs versionfile 225 | cat "$NVAPI_SRC_DIR"/version.h | grep DXVK | cut -d' ' -f2- >> "$NVLIBS_BUILD_DIR"/version 226 | 227 | # Build Vulkan reflex layer 228 | cd "$NVAPI_SRC_DIR" 229 | rm -f "$NVAPI_SRC_DIR"/layer/{version,config}.h 230 | 231 | meson setup \ 232 | --buildtype "release" \ 233 | --prefix "$NVLIBS_BUILD_DIR/layer" \ 234 | --libdir '' \ 235 | --strip \ 236 | -Dabsolute_library_path=false \ 237 | -Dlibrary_path_prefix=./ \ 238 | -Dmanifest_install_dir=. \ 239 | "$NVLIBS_BUILD_DIR/build.layer" \ 240 | "$NVAPI_SRC_DIR/layer" 241 | 242 | cd "$NVLIBS_BUILD_DIR/build.layer" 243 | ninja install 244 | 245 | rm -R "$NVLIBS_BUILD_DIR/build.layer" 246 | 247 | # Copy installscripts and README 248 | cp $NVLIBS_SRC_DIR/*.sh "$NVLIBS_BUILD_DIR/" 249 | rm $NVLIBS_BUILD_DIR/package-release.sh 250 | chmod +x $NVLIBS_BUILD_DIR/*.sh 251 | cp "$NVLIBS_SRC_DIR/Readme_nvml.txt" "$NVLIBS_BUILD_DIR/Readme_nvml.txt" 252 | cp "$NVLIBS_SRC_DIR/README.md" "$NVLIBS_BUILD_DIR/README.md" 253 | 254 | # Move test 255 | mkdir -p "$NVLIBS_BUILD_DIR/bin" 256 | mv "$NVLIBS_BUILD_DIR/x64/nvapi64-tests.exe" "$NVLIBS_BUILD_DIR/bin/" 257 | mv "$NVLIBS_BUILD_DIR/x64/nvofapi64-tests.exe" "$NVLIBS_BUILD_DIR/bin/" 258 | 259 | # cleanup 260 | cd $NVLIBS_BUILD_DIR 261 | find . -name \*.a -type f -delete 262 | find . -name "*.dll.so" -type f -exec bash -c 'mv "$0" "${0%.so}"' {} \; 263 | echo "Done building!" 264 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NVIDIA Libs 2 | 3 | Release: 0.9.0 4 | Recommended nVidia proprietary driver branch 580+ for best compatibility with OptiX and CUDA. 5 | 6 | ## Important info: 7 | This will be the last release which includes 32bit library support. From release v1.0.0 and onward 8 | the only library included will be 32bit nvapi.dll. 32bit versions of nvcuda, nvcuvid, nvencodeapi 9 | and nvml will all be removed and not built, and the installscripts will be updated for this. 10 | 11 | This release will be branched and saved for backward compatibility, but will not receive further 12 | updates. (No reasonable 32bit game/app has been made in years anyway). 13 | 14 | ## Support: 15 | CUDA SDK up to 13.0 should now mostly be supported. There can still be missing functions 16 | Up to OptiX ABI 105 (SDK 9.0.0) should be supported. Additional logging: `WINEDEBUG=+nvoptix` 17 | 18 | Older drivers that does not support CUDA SDK 10 and older may also fail/crash. Report any crashes with 19 | logs on the issue page. However these are highly outdated drivers in general and will probably not 20 | see too much attention in that regard. 21 | 22 | Create logs typically with: `WINEDEBUG=-all,+nvcuda,+nvml wine ./yourapp.exe > yourapp.log 2>&1` 23 | If you suspect errors with video encoding/decoding (NVENC), you can create a log like this: 24 | `WINEDEBUG=-all,+nvcuvid,+nvencodeapi wine ./yourapp.exe > yourapp.log 2>&1` 25 | Also see notes about DXVK-NVAPI below for additional logging. 26 | 27 | Library contains: 28 | nvapi (dxvk-nvapi + additions - [https://github.com/SveSop/dxvk-nvapi/tree/experimental](https://github.com/SveSop/dxvk-nvapi/tree/experimental)) 29 | nvcuda (wine-staging + development - [https://github.com/SveSop/nvcuda](https://github.com/SveSop/nvcuda)) 30 | nvcuvid/nvencodeapi (wine-staging + development - [https://github.com/SveSop/nvenc](https://github.com/SveSop/nvenc)) 31 | nvml (wine-nvml - [https://github.com/Saancreed/wine-nvml](https://github.com/Saancreed/wine-nvml)) 32 | nvoptix (wine-nvoptix - [https://github.com/SveSop/wine-nvoptix](https://github.com/SveSop/wine-nvoptix)) 33 | 34 | ## Build requirements: 35 | - [WINE] (version >= 10.0) [https://www.winehq.org/](https://www.winehq.org/) 36 | - [Meson] (version >= 0.61) [http://mesonbuild.com/](http://mesonbuild.com/) 37 | - [NINJA] [https://ninja-build.org/](https://ninja-build.org/) 38 | - [MINGW] (version >= 10.0) [https://www.mingw-w64.org/](https://www.mingw-w64.org/) 39 | - [GCC/G++] (version >= 12.0) [https://gcc.gnu.org/](https://gcc.gnu.org/) 40 | 41 | ## How to build 42 | 43 | ./package-release.sh name destdir [--no32] 44 | The `--no32` build option only build 64-bit version of nvcuda/nvenc/nvml, but still 45 | maintain the 32-bit version of nvapi.dll. 46 | 47 | ## How to install 48 | 49 | ### Wineprefix 50 | You can install symlinks and dll-overrides to the libraries in your wineprefix like this: 51 | `WINEPREFIX=/your/wine/prefix ./setup_nvlibs.sh install` 52 | 53 | To uninstall: 54 | `WINEPREFIX=/your/wine/prefix ./setup_nvlibs.sh uninstall` 55 | 56 | ### DXVK-NVAPI 57 | Check out README file usage of DXVK-NVAPI. 58 | [https://github.com/SveSop/dxvk-nvapi/blob/master/README.md](https://github.com/SveSop/dxvk-nvapi/blob/master/README.md) 59 | Typical log level usage: 60 | `DXVK_NVAPI_LOG_LEVEL=none` (Default) No output. 61 | `DXVK_NVAPI_LOG_LEVEL=info` Informational output of function calls. 62 | `DXVK_NVAPI_LOG_LEVEL=trace` Detailed debug information. 63 | 64 | For misbehaving games that do not work too well with DLSS or otherwise do not work with 65 | the detected architecture, you can override detected architecture like this: 66 | `DXVK_NVAPI_GPU_ARCH=` with one of the following options: 67 | 68 | `GK100` (Kepler) 69 | `GM200` (Maxwell) 70 | `GP100` (Pascal) 71 | `GV100` (Volta) 72 | `TU100` (Turing) 73 | `GA100` (Ampere) 74 | `AD100` (Ada) 75 | `GB200` (Blackwell) 76 | 77 | Known games that may need override: 78 | Monster Hunter World : `DXVK_NVAPI_GPU_ARCH=GP100` 79 | War Thunder : `DXVK_NVAPI_GPU_ARCH=GP100` 80 | Ghost of Tsushima : `DXVK_NVAPI_GPU_ARCH=GA100` 81 | 82 | ### Vulkan Reflex Layer 83 | This includes the Vulkan Reflex layer in /layer subfolder. 84 | Read about usage here: 85 | [https://github.com/jp7677/dxvk-nvapi#vulkan-reflex-layer](https://github.com/jp7677/dxvk-nvapi#vulkan-reflex-layer) 86 | 87 | ### DXVK-NVAPI DLSS Settings 88 | Various DLSS settings has been added to dxvk-nvapi. You can read more about various settings here: 89 | [https://github.com/jp7677/dxvk-nvapi/wiki/Passing-driver-settings](https://github.com/jp7677/dxvk-nvapi/wiki/Passing-driver-settings) 90 | 91 | ### WINE-NVML 92 | In order to use DXVK-NVAPI (NvAPI) with some extra GPU information (temps and the likes) 93 | you need to copy the NVML binaries to your wine binaries folder. You can do this by 94 | running the included `nvml_setup.sh` script. 95 | See the Readme_nvml.txt file. 96 | 97 | ### Tests 98 | You can run tests of your adapter and functions by running the test case file: 99 | `WINEPREFIX=/your/wine/prefix wine bin/nvapi64-tests.exe` 100 | and you can run some small CUDA tests to verify your CUDA adapter like this: 101 | `WINEPREFIX=/your/wine/prefix wine bin/cudatest.exe` 102 | 103 | PS. You must install said libraryfile in your WINEPREFIX (see above) 104 | 105 | ### Bottles 106 | Added a script that will install the libraries in a bottle. 107 | This assumes you are using bottles installed via `FlatPak`. 108 | 109 | Run `./bottles-install.sh` for a list of your available bottles, and use it like this: 110 | `./bottles-install.sh YourBottle` to install the libraries in the `YourBottle` bottle. 111 | 112 | You will want to run the script ever time you upgrade `nvidia-libs` binaries, and possibly 113 | if you change/update your runner. Eg. switching from Caffe-9.7 to Caffe-9.8. 114 | 115 | ## 32-Bit 116 | The 32-bit versions of `nvcuda.dll`, `nvencodeapi.dll`, `nvcuvid.dll` and `nvml.dll` all requires 117 | that the 32-bit driver libraries are installed. Depending on distro these can have separate 118 | packages that needs to be installed with the driver. 119 | Be aware that NVIDIA 50 series cards does NOT support 32bit CUDA. 120 | 121 | ## Proton 122 | You can drop-in the libraries in Proton10 - Experimental or GE-Proton-10 or newer like this: 123 | `PROTON_LIBS='$HOME/.steam/compatibilitytools.d/Proton-10.25-GE' ./proton_setup.sh` 124 | 125 | This will replace or add the libs to Proton for use with games. 126 | The installscript is no longer compatible with older Proton-6.3 or Proton-GE-6/7 versions. 127 | 128 | OBS! 129 | You can add: 130 | `"DXVK_ENABLE_NVAPI": "1",` 131 | `"PROTON_ENABLE_NVAPI": "1",` 132 | to your user_settings.py script in the proton folder eg: 133 | `PROTON_LIBS='$HOME/.steam/compatibilitytools.d/GE-Proton-8.27/user_settings.py'` 134 | 135 | Or you can run the game with `PROTON_ENABLE_NVAPI=1 DXVK_ENABLE_NVAPI=1 %command%` 136 | 137 | Some additional tweaks may be required depending on game used and version of Proton. 138 | It is HIGHLY RECOMMENDED that you re-create the game-prefix after installing the nvidia-libs 139 | package, to make sure they are used in the new prefix. The game prefixes are typically located 140 | in `$HOME/.steam/steam/steamapps/compatdata/XXXXXXX` where XXXXXXX is the steam AppID. 141 | 142 | ## OpticalFlow usage 143 | OpticalFlow for use with DLSS seems to have been discontinued with NVIDIA DLSS4. 144 | 145 | If OpticalFlow is required for some app or program, there is a archived version that can be 146 | used in the `nvofapi-workaround` branch if needed. This will however build an old version 147 | of nvapi & friends, and will (for now) not be updated. 148 | 149 | ## DAZ Studio 150 | 151 | In case you do NOT use nvml (wine-nvml) library to emulate nvml.dll, DAZ Studio MAY 152 | show 2 "adapters" for rendering. Choose the one that show your GPU name, and NOT the other. 153 | 154 | NVML can be installed by using the `setup_nvml.sh` script included in the package and for 155 | DAZ Studio it is recommended. 156 | 157 | ## Quirks 158 | Some older SDK samples may require specifying LD_LIBRARY_PATH to the system folder 159 | where libcuda.so.1 and other libnvidia-xxx.so libraries reside. This varies depending 160 | on distro. Ubuntu typicall uses `/lib/x86-64-linux-gnu/` for 64-bit and 161 | `/lib/i386-linux-gnu/` for 32-bit. 162 | 163 | In cases where virtual or emulated hardware is used for nvcuda, wine may have issues getting 164 | the correct PCI ID from wine to obtain LUID from the cuDeviceGetLuid function. In those cases 165 | you can use a env variable to override this and generate a fake LUID like this: 166 | `CUDA_FAKE_LUID=1` 167 | Keep in mind that this should ONLY be used in the cases where the call to cuDeviceGetLuid 168 | fails, as this can introduce issues with apps using LUID from the CUDA adapter. 169 | 170 | SDK 13+ needs to use the file `nvcudart_hybrid64.dll`. This is a file included in the 171 | windows version of the NVIDIA driver, and must be extracted from the driver archive. I cannot 172 | provide the binary here. 173 | 174 | ## Info 175 | 176 | Loads of reference info here: 177 | 178 | [NVIDIA NvAPI](https://docs.nvidia.com/gameworks/content/gameworkslibrary/coresdk/nvapi/annotated.html) 179 | [NVIDIA OPTIX](https://developer.nvidia.com/optix) 180 | 181 | Tool to check various GPU options: 182 | [http://www.ozone3d.net/gpu_caps_viewer/](http://www.ozone3d.net/gpu_caps_viewer/) 183 | --------------------------------------------------------------------------------