Linux Nvidia Driver

From Leo's Notes
Last edited on 1 September 2022, at 06:12.

Manually Patching[edit | edit source]

On new kernels, the Nvidia driver will probably need to be patched even if it is the most recent driver.

To extract and apply a patch on the proprietary Nvidia drivers:

# ./nvidia.run -x
# cd NVIDIA-Linux-x86_64-375.66
# patch  -p1 -i ../linux-4.11.patch
## Run the installer like you normally would on the nvidia driver blob
# ./nvidia-installer

Looking at the advanced settings in the blob, there is a --apply-patch parameter which takes in a patch as well, but this only creates a custom .run file rather than applying the patch and then doing the install.


To make an updated version of the self-run .run file after applying the patch manually:

## Continuing from the steps above
# sh NVIDIA-Linux-x86_64-375.66/makeself.sh ./NVIDIA-Linux-x86_64-375.66 NVIDIA-Linux-x86_64-375.66.run "Patched for 4.11.0" ./nvidia-installer
Adding files to archive named "NVIDIA-Linux-x86_64-375.66.run"...
...
CRC: 3953819085
MD5: bbcb938a38cb7475bbbc55ff616d33cb

Self-extractible archive "NVIDIA-Linux-x86_64-375.66.run" successfully created.

If you get this error:

ERROR: this .run file is intended for the
Unknown-Unknown platform, but you appear to be
running on Linux-x86_64.  Aborting installation.

You need to edit the makeself.sh script so that the platform and architecture is "Linux" and "x86_64".

Silent Install[edit | edit source]

./nvidia.run \
--no-x-check \
--silent \
--no-nouveau-check \
--disable-nouveau \
--run-nvidia-xconfig \
--opengl-headers \
--install-libglvnd \
--dkms  -k `uname -r`

Patches[edit | edit source]