Nvidia cuda repository, 615.71.10 driver and 7.3.0 kernel

Hi all
For those using the cuda repository, the open driver isn’t building with the new kernel (7.3.0) without a small patch, following is what I did;

Make sure patch is installed zypper in patch

Edit the dkms config file vi /usr/src/nvidia-615.71.10/dkms.conf and add the “PRE_BUILD=”

PACKAGE_NAME="nvidia"
PACKAGE_VERSION="615.71.10"
AUTOINSTALL="yes"
==>> PRE_BUILD="nvidia-fix-script kernel-open/nvidia"
....

Create the script to apply the patch vi /usr/src/nvidia-615.71.10/nvidia-fix-script and add the following content;

#/usr/bin/sh
echo "Downloading patch..."
wget https://patch-diff.githubusercontent.com/raw/NVIDIA/open-gpu-kernel-modules/pull/1330.patch
echo "Applying 1330.patch..."
patch -p1 < 1330.patch

Make script executable chmod 0755 /usr/src/nvidia-615.71.10/nvidia-fix-script

Check all ok with dkms install -m nvidia -v 615.71.10

Open another terminal and tail the build log tail -f /var/lib/dkms/nvidia/615.71.10/build/make.log

If all ok, ctrl+c to exit the tail command and reboot system…