代码: 全选
###########################################
### NVIDIA Driver 390.42 Install
###########################################
# Debian Depends:
sudo apt-get install dkms gcc make patch linux-headers-amd64
# openSUSE Depends:
sudo zypper install dkms gcc make patch binutils gtk3 kernel-default-devel libelf-devel
# Fedora Depends:
sudo dnf install dkms gcc make patch glibc-devel kernel-devel elfutils-libelf-devel pangox-compat selinux-policy-devel
# Arch Depends:
sudo pacman -S dkms gcc linux-headers
# Debian 32-bit Library Depends:
sudo dpkg --add-architecture i386
sudo apt-get install libglx-mesa0:i386
# openSUSE 32-bit Library Depends:
sudo zypper install Mesa-libGL1-32bit
# Fedora 32-bit Library Depends:
sudo dnf install mesa-libGL.i686
# Arch 32-bit Library Depends:
sudo pacman -S libglvnd lib32-libglvnd lib32-gcc-libs
# Debian
LIB=lib
LIB64=lib/x86_64-linux-gnu
LIB32=lib/i386-linux-gnu
# Fedora /openSUSE
LIB=lib64
LIB64=lib64
LIB32=lib
# ARCH
LIB=lib
LIB64=lib
LIB32=lib32
NV_NAME=NVIDIA-Linux-x86_64
NV_VER='390.42'
wget -c http://us.download.nvidia.com/XFree86/Linux-x86_64/$NV_VER/"$NV_NAME"-"$NV_VER".run
sh "$NV_NAME"-"$NV_VER".run -x
sudo /sbin/rmmod nvidia >/dev/null 2>&1
###########################################
### NVIDIA Driver 64-bit Library Install
###########################################
## Install library
cd "$NV_NAME"-"$NV_VER"
# X driver
sudo install -D -m755 nvidia_drv.so /usr/$LIB/xorg/modules/drivers/nvidia_drv.so
# GLX extension module for X
sudo install -D -m755 libglx.so.$NV_VER /usr/$LIB/nvidia/xorg/modules/extensions/libglx.so.$NV_VER
sudo ln -sf libglx.so.$NV_VER /usr/$LIB/nvidia/xorg/modules/extensions/libglx.so.1
sudo ln -sf libglx.so.1 /usr/$LIB/nvidia/xorg/modules/extensions/libglx.so
# OpenGL library
sudo install -D -m755 libGL.so.$NV_VER /usr/$LIB64/nvidia/libGL.so.$NV_VER
sudo ln -sf libGL.so.$NV_VER /usr/$LIB64/nvidia/libGL.so.1
sudo ln -sf libGL.so.1 /usr/$LIB64/nvidia/libGL.so
# OpenGL core library
sudo install -D -m755 libnvidia-glcore.so.$NV_VER /usr/$LIB64/libnvidia-glcore.so.$NV_VER
# EGL API
sudo install -D -m755 libEGL.so.$NV_VER /usr/$LIB64/nvidia/libEGL.so.$NV_VER
sudo ln -sf libEGL.so.$NV_VER /usr/$LIB64/nvidia/libEGL.so.1
sudo ln -sf libEGL.so.1 /usr/$LIB64/nvidia/libEGL.so
# OpenGL|ES 1.x API
sudo install -D -m755 libGLESv1_CM.so.$NV_VER /usr/$LIB64/nvidia/libGLESv1_CM.so.$NV_VER
sudo ln -sf libGLESv1_CM.so.$NV_VER /usr/$LIB64/nvidia/libGLESv1_CM.so.1
sudo ln -sf libGLESv1_CM.so.1 /usr/$LIB64/nvidia/libGLESv1_CM.so
# OpenGL|ES 2.x API
sudo install -D -m755 libGLESv2.so.$NV_VER /usr/$LIB64/nvidia/libGLESv2.so.$NV_VER
sudo ln -sf libGLESv2.so.$NV_VER /usr/$LIB64/nvidia/libGLESv2.so.2
sudo ln -sf libGLESv2.so.2 /usr/$LIB64/nvidia/libGLESv2.so
# OpenGL|ES core library
sudo install -D -m755 libnvidia-eglcore.so.$NV_VER /usr/$LIB64/libnvidia-eglcore.so.$NV_VER
# NVENC Video Encoding
sudo install -D -m755 libnvidia-encode.so.$NV_VER /usr/$LIB64/libnvidia-encode.so.$NV_VER
sudo ln -sf libnvidia-encode.so.$NV_VER /usr/$LIB64/libnvidia-encode.so.1
sudo ln -sf libnvidia-encode.so.1 /usr/$LIB64/libnvidia-encode.so
# NVIDIA OpenGL-based Framebuffer Capture
sudo install -D -m755 libnvidia-fbc.so.$NV_VER /usr/$LIB64/libnvidia-fbc.so.$NV_VER
# NVIDIA OpenGL-based Inband Frame Readback
sudo install -D -m755 libnvidia-ifr.so.$NV_VER /usr/$LIB64/libnvidia-ifr.so.$NV_VER
sudo ln -sf libnvidia-ifr.so.$NV_VER /usr/$LIB64/libnvidia-ifr.so.so.1
sudo ln -sf libnvidia-ifr.so.so.1 /usr/$LIB64/libnvidia-ifr.so.so
sudo install -D -m755 libnvidia-glsi.so.$NV_VER /usr/$LIB64/libnvidia-glsi.so.$NV_VER
# VDPAU
sudo install -D -m755 libvdpau_nvidia.so.$NV_VER /usr/$LIB64/vdpau/libvdpau_nvidia.so.$NV_VER
sudo ln -sf libvdpau_nvidia.so.$NV_VER /usr/$LIB64/vdpau/libvdpau_nvidia.so.1
sudo ln -sf libvdpau_nvidia.so.1 /usr/$LIB64/vdpau/libvdpau_nvidia.so
# CUDA
sudo install -D -m755 libcuda.so.$NV_VER /usr/$LIB64/libcuda.so.$NV_VER
sudo ln -sf libcuda.so.$NV_VER /usr/$LIB64/libcuda.so
sudo install -D -m755 libnvcuvid.so.$NV_VER /usr/$LIB64/libnvcuvid.so.$NV_VER
sudo ln -sf libnvcuvid.so.$NV_VER /usr/$LIB64/libnvcuvid.so.1
sudo ln -sf libnvcuvid.so.1 /usr/$LIB64/libnvcuvid.so
sudo install -D -m755 libnvidia-ptxjitcompiler.so.$NV_VER /usr/$LIB64/libnvidia-ptxjitcompiler.so.$NV_VER
# nvidia-tls library
sudo install -D -m755 tls/libnvidia-tls.so.$NV_VER /usr/$LIB64/libnvidia-tls.so.$NV_VER
sudo install -D -m755 libnvidia-ml.so.$NV_VER /usr/$LIB64/libnvidia-ml.so.$NV_VER
sudo ln -sf libnvidia-ml.so.$NV_VER /usr/$LIB64/libnvidia-ml.so
sudo install -D -m755 libnvidia-cfg.so.$NV_VER /usr/$LIB64/libnvidia-cfg.so.$NV_VER
sudo ln -sf libnvidia-cfg.so.$NV_VER /usr/$LIB64/libnvidia-cfg.so.1
sudo ln -sf libnvidia-cfg.so.1 /usr/$LIB64/libnvidia-cfg.so
# OpenCL
sudo install -D -m755 libOpenCL.so.1.0.0 /usr/$LIB64/nvidia/libOpenCL.so.1.0.0
sudo ln -sf libOpenCL.so.1.0.0 /usr/$LIB64/nvidia/libOpenCL.so
sudo install -D -m755 libnvidia-compiler.so.$NV_VER /usr/$LIB64/libnvidia-compiler.so.$NV_VER
sudo ln -sf libnvidia-compiler.so.$NV_VER /usr/$LIB64/libnvidia-compiler.so.1
sudo ln -sf libnvidia-compiler.so.1 /usr/$LIB64/libnvidia-compiler.so
sudo install -D -m755 libnvidia-opencl.so.$NV_VER /usr/$LIB64/libnvidia-opencl.so.$NV_VER
sudo ln -sf libnvidia-opencl.so.$NV_VER "/usr/$LIB64/libnvidia-opencl.so"
sudo install -D -m644 nvidia.icd "/etc/OpenCL/vendors/nvidia.icd"
# nvidia-wfb
sudo install -D -m755 libnvidia-wfb.so.$NV_VER /usr/$LIB/libnvidia-wfb.so.$NV_VER
# Link to libwfb.so
sudo ln -sf /usr/$LIB/xorg/modules/libwfb.so /usr/$LIB/nvidia/xorg/modules/libwfb.so
# NVIDIA OpenGL/GLX/EGL/GLES libraries
sudo install -D -m755 libEGL_nvidia.so.$NV_VER /usr/$LIB64/nvidia/libEGL_nvidia.so.$NV_VER
sudo ln -sf libEGL_nvidia.so.$NV_VER /usr/$LIB64/nvidia/libEGL_nvidia.so.0
sudo install -D -m755 libEGL.so.1.1.0 /usr/$LIB64/nvidia/libEGL.so.1.1.0
sudo install -D -m755 libGLdispatch.so.0 /usr/$LIB64/nvidia/libGLdispatch.so.0
sudo install -D -m755 libGLESv1_CM_nvidia.so.$NV_VER /usr/$LIB64/nvidia/libGLESv1_CM_nvidia.so.$NV_VER
sudo ln -sf libGLESv1_CM_nvidia.so.$NV_VER /usr/$LIB64/nvidia/libGLESv1_CM_nvidia.so.1
sudo install -D -m755 libGLESv2_nvidia.so.$NV_VER /usr/$LIB64/nvidia/libGLESv2_nvidia.so.$NV_VER
sudo ln -sf libGLESv2_nvidia.so.$NV_VER /usr/$LIB64/nvidia/libGLESv2_nvidia.so.2
sudo install -D -m755 libGL.so.1.7.0 /usr/$LIB64/nvidia/libGL.so.1.7.0
sudo install -D -m755 libGLX_nvidia.so.$NV_VER /usr/$LIB64/nvidia/libGLX_nvidia.so.$NV_VER
sudo ln -sf libGLX_nvidia.so.$NV_VER /usr/$LIB64/nvidia/libGLX_nvidia.so.0
sudo install -D -m755 libGLX.so.0 /usr/$LIB64/nvidia/libGLX.so.0
sudo install -D -m755 libOpenGL.so.0 /usr/$LIB64/nvidia/libOpenGL.so.0
sudo install -D -m755 libnvidia-egl-wayland.so.1.0.2 /usr/$LIB/libnvidia-egl-wayland.so.1.0.2
sudo install -D -m755 libnvidia-gtk2.so.$NV_VER /usr/$LIB/nvidia/libnvidia-gtk2.so.$NV_VER
sudo install -D -m755 libnvidia-gtk3.so.$NV_VER /usr/$LIB/nvidia/libnvidia-gtk3.so.$NV_VER
# NVIDIA FAT binary loader library
sudo install -D -m755 libnvidia-fatbinaryloader.so.$NV_VER /usr/$LIB64/libnvidia-fatbinaryloader.so.$NV_VER
# nvidia-settings
sudo install -D -m755 nvidia-settings /usr/bin/nvidia-settings
sudo install -D -m644 nvidia-settings.1.gz /usr/share/man/man1/nvidia-settings.1.gz
sudo install -D -m644 nvidia-settings.desktop /usr/share/applications/nvidia-settings.desktop
sudo install -D -m644 nvidia-settings.png /usr/share/pixmaps/nvidia-settings.png
sudo install -D -m644 nvidia-application-profiles-"$NV_VER"-key-documentation /usr/share/nvidia/nvidia-application-profiles-"$NV_VER"-key-documentation
sudo install -D -m644 nvidia-application-profiles-"$NV_VER"-rc /usr/share/nvidia/nvidia-application-profiles-"$NV_VER"-rc
sudo sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i "/usr/share/applications/nvidia-settings.desktop"
# nvidia-xconfig
sudo install -D -m755 nvidia-xconfig /usr/bin/nvidia-xconfig
sudo install -D -m644 nvidia-xconfig.1.gz /usr/share/man/man1/nvidia-xconfig.1.gz
# nvidia-smi
sudo install -D -m755 nvidia-smi /usr/bin/nvidia-smi
sudo install -D -m644 nvidia-smi.1.gz /usr/share/man/man1/nvidia-smi.1.gz
# nvidia-bug-report
sudo install -D -m755 nvidia-bug-report.sh /usr/bin/nvidia-bug-report.sh
# CUDA MPS
sudo install -D -m755 nvidia-cuda-mps-server /usr/bin/nvidia-cuda-mps-server
sudo install -D -m755 nvidia-cuda-mps-control /usr/bin/nvidia-cuda-mps-control
sudo install -D -m644 nvidia-cuda-mps-control.1.gz /usr/share/man/man1/nvidia-cuda-mps-control.1.gz
# kernel modules and create device nodes
sudo install -D -m755 nvidia-modprobe /usr/bin/nvidia-modprobe
sudo install -D -m644 nvidia-modprobe.1.gz /usr/share/man/man1/nvidia-modprobe.1.gz
# daemon to maintain persistent software state
sudo install -D -m755 nvidia-persistenced /usr/bin/nvidia-persistenced
sudo install -D -m644 nvidia-persistenced.1.gz /usr/share/man/man1/nvidia-persistenced.1.gz
sudo install -D -m644 nvidia-persistenced-init.tar.bz2 /usr/share/nvidia/nvidia-persistenced-init.tar.bz2
# nvidia-egl-common
sudo install -D -m644 10_nvidia.json /usr/share/glvnd/egl_vendor.d/10_nvidia.json
sudo install -D -m644 10_nvidia_wayland.json /usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json
# Documentation
sudo install -D -m644 LICENSE /usr/share/licenses/nvidia/LICENSE
sudo install -D -m644 README.txt /usr/share/doc/nvidia/README
sudo install -D -m644 NVIDIA_Changelog /usr/share/doc/nvidia/NVIDIA_Changelog
###########################################
### NVIDIA Driver 32-bit Library Install
###########################################
# OpenGL library
sudo install -D -m755 32/libGL.so.$NV_VER /usr/$LIB32/nvidia/libGL.so.$NV_VER
sudo ln -sf libGL.so.$NV_VER /usr/$LIB32/nvidia/libGL.so.1
sudo ln -sf libGL.so.1 /usr/$LIB32/nvidia/libGL.so
# OpenGL core library
sudo install -D -m755 32/libnvidia-glcore.so.$NV_VER /usr/$LIB32/libnvidia-glcore.so.$NV_VER
# EGL API
sudo install -D -m755 32/libEGL.so.$NV_VER /usr/$LIB32/nvidia/libEGL.so.$NV_VER
sudo ln -sf libEGL.so.$NV_VER /usr/$LIB32/nvidia/libEGL.so.1
sudo ln -sf libEGL.so.1 /usr/$LIB32/nvidia/libEGL.so
# OpenGL|ES 1.x API
sudo install -D -m755 32/libGLESv1_CM.so.$NV_VER /usr/$LIB32/nvidia/libGLESv1_CM.so.$NV_VER
sudo ln -sf libGLESv1_CM.so.$NV_VER /usr/$LIB32/nvidia/libGLESv1_CM.so.1
sudo ln -sf libGLESv1_CM.so.1 /usr/$LIB32/nvidia/libGLESv1_CM.so
# OpenGL|ES 2.x API
sudo install -D -m755 32/libGLESv2.so.$NV_VER /usr/$LIB32/nvidia/libGLESv2.so.$NV_VER
sudo ln -sf libGLESv2.so.$NV_VER /usr/$LIB32/nvidia/libGLESv2.so.2
sudo ln -sf libGLESv2.so.2 /usr/$LIB32/nvidia/libGLESv2.so
# OpenGL|ES core library
sudo install -D -m755 32/libnvidia-eglcore.so.$NV_VER /usr/$LIB32/libnvidia-eglcore.so.$NV_VER
# NVENC Video Encoding
sudo install -D -m755 32/libnvidia-encode.so.$NV_VER /usr/$LIB32/libnvidia-encode.so.$NV_VER
sudo ln -sf libnvidia-encode.so.$NV_VER /usr/$LIB32/libnvidia-encode.so.1
sudo ln -sf libnvidia-encode.so.1 /usr/$LIB32/libnvidia-encode.so
# NVIDIA OpenGL-based Framebuffer Capture
sudo install -D -m755 32/libnvidia-fbc.so.$NV_VER /usr/$LIB32/libnvidia-fbc.so.$NV_VER
# NVIDIA OpenGL-based Inband Frame Readback
sudo install -D -m755 32/libnvidia-ifr.so.$NV_VER /usr/$LIB32/libnvidia-ifr.so.$NV_VER
sudo ln -sf libnvidia-ifr.so.$NV_VER /usr/$LIB32/libnvidia-ifr.so.so.1
sudo ln -sf libnvidia-ifr.so.so.1 /usr/$LIB32/libnvidia-ifr.so.so
sudo install -D -m755 32/libnvidia-glsi.so.$NV_VER /usr/$LIB32/libnvidia-glsi.so.$NV_VER
# OpenCL
sudo install -D -m755 32/libOpenCL.so.1.0.0 /usr/$LIB32/nvidia/libOpenCL.so.1.0.0
sudo ln -sf libOpenCL.so.1.0.0 /usr/$LIB32/nvidia/libOpenCL.so
sudo install -D -m755 32/libnvidia-compiler.so.$NV_VER /usr/$LIB32/libnvidia-compiler.so.$NV_VER
sudo ln -sf libnvidia-compiler.so.$NV_VER /usr/$LIB32/libnvidia-compiler.so.1
sudo ln -sf libnvidia-compiler.so.1 /usr/$LIB32/libnvidia-compiler.so
sudo install -D -m755 32/libnvidia-opencl.so.$NV_VER /usr/$LIB32/libnvidia-opencl.so.$NV_VER
sudo ln -sf libnvidia-opencl.so.$NV_VER "/usr/$LIB32/libnvidia-opencl.so"
# CUDA
sudo install -D -m755 32/libcuda.so.$NV_VER /usr/$LIB32/libcuda.so.$NV_VER
sudo ln -sf libcuda.so.$NV_VER /usr/$LIB32/libcuda.so
sudo install -D -m755 32/libnvcuvid.so.$NV_VER /usr/$LIB32/libnvcuvid.so.$NV_VER
sudo ln -sf libnvcuvid.so.$NV_VER /usr/$LIB32/libnvcuvid.so.1
sudo ln -sf libnvcuvid.so.1 /usr/$LIB32/libnvcuvid.so
sudo install -D -m755 32/libnvidia-ptxjitcompiler.so.$NV_VER /usr/$LIB32/libnvidia-ptxjitcompiler.so.$NV_VER
# VDPAU
sudo install -D -m755 32/libvdpau_nvidia.so.$NV_VER /usr/$LIB32/vdpau/libvdpau_nvidia.so.$NV_VER
sudo ln -sf libvdpau_nvidia.so.$NV_VER /usr/$LIB32/vdpau/libvdpau_nvidia.so.1
sudo ln -sf libvdpau_nvidia.so.1 /usr/$LIB32/vdpau/libvdpau_nvidia.so
# nvidia-tls library
sudo install -D -m755 32/tls/libnvidia-tls.so.$NV_VER /usr/$LIB32/libnvidia-tls.so.$NV_VER
sudo install -D -m755 32/libnvidia-ml.so.$NV_VER /usr/$LIB32/libnvidia-ml.so.$NV_VER
sudo ln -sf libnvidia-ml.so.$NV_VER /usr/$LIB32/libnvidia-ml.so
# NVIDIA OpenGL/GLX/EGL/GLES libraries
sudo install -D -m755 32/libEGL_nvidia.so.$NV_VER /usr/$LIB32/nvidia/libEGL_nvidia.so.$NV_VER
sudo ln -sf libEGL_nvidia.so.$NV_VER /usr/$LIB32/nvidia/libEGL_nvidia.so.0
sudo install -D -m755 32/libEGL.so.1.1.0 /usr/$LIB32/nvidia/libEGL.so.1.1.0
sudo install -D -m755 32/libGLdispatch.so.0 /usr/$LIB32/nvidia/libGLdispatch.so.0
sudo install -D -m755 32/libGLESv1_CM_nvidia.so.$NV_VER /usr/$LIB32/nvidia/libGLESv1_CM_nvidia.so.$NV_VER
sudo ln -sf libGLESv1_CM_nvidia.so.$NV_VER /usr/$LIB32/nvidia/libGLESv1_CM_nvidia.so.1
sudo install -D -m755 32/libGLESv2_nvidia.so.$NV_VER /usr/$LIB32/nvidia/libGLESv2_nvidia.so.$NV_VER
sudo ln -sf libGLESv2_nvidia.so.$NV_VER /usr/$LIB32/nvidia/libGLESv2_nvidia.so.2
sudo install -D -m755 32/libGL.so.1.7.0 /usr/$LIB32/nvidia/libGL.so.1.7.0
sudo install -D -m755 32/libGLX_nvidia.so.$NV_VER /usr/$LIB32/nvidia/libGLX_nvidia.so.$NV_VER
sudo ln -sf libGLX_nvidia.so.$NV_VER /usr/$LIB32/nvidia/libGLX_nvidia.so.0
sudo install -D -m755 32/libGLX.so.0 /usr/$LIB32/nvidia/libGLX.so.0
sudo install -D -m755 32/libOpenGL.so.0 /usr/$LIB32/nvidia/libOpenGL.so.0
# NVIDIA FAT binary loader library
sudo install -D -m755 32/libnvidia-fatbinaryloader.so.$NV_VER /usr/$LIB32/libnvidia-fatbinaryloader.so.$NV_VER
sudo /sbin/ldconfig
############################################
### Install dkms sources
############################################
# Remove dkms sources
sudo rm -rf /usr/src/nvidia-$NV_VER
# patch dkms sources
cp LICENSE kernel/
cp README.txt kernel/
echo "nvidia.ko external" > kernel/Module.supported
cat > kernel/dkms.conf << EOF
# DKMS
PACKAGE_NAME="nvidia"
PACKAGE_VERSION=$NV_VER
BUILT_MODULE_NAME[0]=nvidia
DEST_MODULE_LOCATION[0]="/updates"
MAKE[0]="unset ARCH; IGNORE_CC_MISMATCH=1 env NV_VERBOSE=1 make \${parallel_jobs+-j\$parallel_jobs} modules KERNEL_UNAME=\${kernelver}"
CLEAN="make KERNEL_UNAME=\${kernelver} clean"
AUTOINSTALL=yes
BUILT_MODULE_NAME[1]="nvidia-modeset"
DEST_MODULE_LOCATION[1]="/updates"
BUILT_MODULE_NAME[2]="nvidia-drm"
DEST_MODULE_LOCATION[2]="/updates"
BUILT_MODULE_NAME[3]="nvidia-uvm"
DEST_MODULE_LOCATION[3]="/updates"
EOF
# copy dkms sources
sudo cp -R kernel /usr/src/nvidia-"$NV_VER"
# Install Kernel Modules
sudo /usr/sbin/dkms remove -m nvidia -v "$NV_VER" --all
sudo /usr/sbin/dkms build -m nvidia -v $NV_VER -k $(uname -r)
sudo /usr/sbin/dkms install -m nvidia -v $NV_VER -k $(uname -r)
sudo sh -c 'echo "blacklist nouveau" > /etc/modprobe.d/50-blacklist.conf'
# Debian
sudo update-initramfs -u
# Fedora /openSUSE
sudo dracut -f -v
代码: 全选
###########################################
### NVIDIA Driver 390.42 Remove
###########################################
# Debian
LIB=lib
LIB64=lib/x86_64-linux-gnu
LIB32=lib/i386-linux-gnu
# Fedora /openSUSE
LIB=lib64
LIB64=lib64
LIB32=lib
NV_VER='390.42'
## Remove all 64-bit library
sudo rm -f /usr/$LIB/xorg/modules/drivers/nvidia_drv.so
sudo rm -f /usr/$LIB/nvidia/xorg/modules/extensions/libglx.so.$NV_VER
sudo rm -f /usr/$LIB/nvidia/xorg/modules/extensions/libglx.so.1
sudo rm -f /usr/$LIB/nvidia/xorg/modules/extensions/libglx.so
sudo rm -f /usr/$LIB64/nvidia/libGL.so.$NV_VER
sudo rm -f /usr/$LIB64/nvidia/libGL.so.1
sudo rm -f /usr/$LIB64/nvidia/libGL.so
sudo rm -f /usr/$LIB64/libnvidia-glcore.so.$NV_VER
sudo rm -f /usr/$LIB64/nvidia/libEGL.so.$NV_VER
sudo rm -f /usr/$LIB64/nvidia/libEGL.so.1
sudo rm -f /usr/$LIB64/nvidia/libEGL.so
sudo rm -f /usr/$LIB64/nvidia/libGLESv1_CM.so.$NV_VER
sudo rm -f /usr/$LIB64/nvidia/libGLESv1_CM.so.1
sudo rm -f /usr/$LIB64/nvidia/libGLESv1_CM.so
sudo rm -f /usr/$LIB64/nvidia/libGLESv2.so.$NV_VER
sudo rm -f /usr/$LIB64/nvidia/libGLESv2.so.2
sudo rm -f /usr/$LIB64/nvidia/libGLESv2.so
sudo rm -f /usr/$LIB64/libnvidia-eglcore.so.$NV_VER
sudo rm -f /usr/$LIB64/libnvidia-encode.so.$NV_VER
sudo rm -f /usr/$LIB64/libnvidia-encode.so.1
sudo rm -f /usr/$LIB64/libnvidia-encode.so
sudo rm -f /usr/$LIB64/libnvidia-fbc.so.$NV_VER
sudo rm -f /usr/$LIB64/libnvidia-ifr.so.$NV_VER
sudo rm -f /usr/$LIB64/libnvidia-ifr.so.so.1
sudo rm -f /usr/$LIB64/libnvidia-ifr.so.so
sudo rm -f /usr/$LIB64/libnvidia-glsi.so.$NV_VER
sudo rm -f /usr/$LIB64/vdpau/libvdpau_nvidia.so.$NV_VER
sudo rm -f /usr/$LIB64/vdpau/libvdpau_nvidia.so.1
sudo rm -f /usr/$LIB64/vdpau/libvdpau_nvidia.so
sudo rm -f /usr/$LIB64/libcuda.so.$NV_VER
sudo rm -f /usr/$LIB64/libcuda.so
sudo rm -f /usr/$LIB64/libnvcuvid.so.$NV_VER
sudo rm -f /usr/$LIB64/libnvcuvid.so.1
sudo rm -f /usr/$LIB64/libnvcuvid.so
sudo rm -f /usr/$LIB64/libnvidia-tls.so.$NV_VER
sudo rm -f /usr/$LIB64/libnvidia-ml.so.$NV_VER
sudo rm -f /usr/$LIB64/libnvidia-ml.so
sudo rm -f /usr/$LIB64/libnvidia-cfg.so.$NV_VER
sudo rm -f /usr/$LIB64/libnvidia-cfg.so.1
sudo rm -f /usr/$LIB64/libnvidia-cfg.so
sudo rm -f /usr/$LIB64/nvidia/libOpenCL.so.1.0.0
sudo rm -f /usr/$LIB64/nvidia/libOpenCL.so
sudo rm -f /usr/$LIB64/libnvidia-compiler.so.$NV_VER
sudo rm -f /usr/$LIB64/libnvidia-compiler.so.1
sudo rm -f /usr/$LIB64/libnvidia-compiler.so
sudo rm -f /usr/$LIB64/libnvidia-opencl.so.$NV_VER
sudo rm -f /usr/$LIB64/libnvidia-opencl.so
sudo rm -f /usr/$LIB64/nvidia/libEGL_nvidia.so.$NV_VER
sudo rm -f /usr/$LIB64/nvidia/libEGL_nvidia.so.0
sudo rm -f /usr/$LIB64/nvidia/libEGL.so.1.1.0
sudo rm -f /usr/$LIB64/nvidia/libGLdispatch.so.0
sudo rm -f /usr/$LIB64/nvidia/libGLESv1_CM_nvidia.so.$NV_VER
sudo rm -f /usr/$LIB64/nvidia/libGLESv1_CM_nvidia.so.1
sudo rm -f /usr/$LIB64/nvidia/libGLESv2_nvidia.so.$NV_VER
sudo rm -f /usr/$LIB64/nvidia/libGLESv2_nvidia.so.2
sudo rm -f /usr/$LIB64/nvidia/libGL.so.1.7.0
sudo rm -f /usr/$LIB64/nvidia/libGLX_nvidia.so.$NV_VER
sudo rm -f /usr/$LIB64/nvidia/libGLX_nvidia.so.0
sudo rm -f /usr/$LIB64/nvidia/libGLX.so.0
sudo rm -f /usr/$LIB64/libnvidia-fatbinaryloader.so.$NV_VER
sudo rm -f /usr/$LIB64/libnvidia-ptxjitcompiler.so.$NV_VER
sudo rm -f /usr/$LIB64/nvidia/libOpenGL.so.0
sudo rm -f /usr/$LIB/libnvidia-egl-wayland.so.1.0.2
sudo rm -f /usr/$LIB/nvidia/libnvidia-gtk2.so.$NV_VER
sudo rm -f /usr/$LIB/nvidia/libnvidia-gtk3.so.$NV_VER
sudo rm -f /usr/$LIB/libnvidia-wfb.so.$NV_VER
sudo rm -f /usr/$LIB/nvidia/xorg/modules/libwfb.so
sudo rm -f /etc/OpenCL/vendors/nvidia.icd
sudo rm -f /usr/bin/nvidia-settings
sudo rm -f /usr/share/man/man1/nvidia-settings.1.gz
sudo rm -f /usr/share/applications/nvidia-settings.desktop
sudo rm -f /usr/share/pixmaps/nvidia-settings.png
sudo rm -f /usr/share/nvidia/nvidia-application-profiles-"$NV_VER"-key-documentation
sudo rm -f /usr/share/nvidia/nvidia-application-profiles-"$NV_VER"-rc
sudo rm -f /usr/bin/nvidia-xconfig
sudo rm -f /usr/share/man/man1/nvidia-xconfig.1.gz
sudo rm -f /usr/bin/nvidia-smi
sudo rm -f /usr/share/man/man1/nvidia-smi.1.gz
sudo rm -f /usr/bin/nvidia-bug-report.sh
sudo rm -f /usr/bin/nvidia-cuda-mps-server
sudo rm -f /usr/bin/nvidia-cuda-mps-control
sudo rm -f /usr/share/man/man1/nvidia-cuda-mps-control.1.gz
sudo rm -f /usr/bin/nvidia-modprobe
sudo rm -f /usr/share/man/man1/nvidia-modprobe.1.gz
sudo rm -f /usr/bin/nvidia-persistenced
sudo rm -f /usr/share/man/man1/nvidia-persistenced.1.gz
sudo rm -f /usr/share/nvidia/nvidia-persistenced-init.tar.bz2
sudo rm -f /usr/share/glvnd/egl_vendor.d/10_nvidia.json
sudo rm -f /usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json
sudo rm -f /usr/share/licenses/nvidia/LICENSE
sudo rm -f /usr/share/doc/nvidia/README
sudo rm -f /usr/share/doc/nvidia/NVIDIA_Changelog
## Remove all 32-bit library
sudo rm -f /usr/$LIB32/nvidia/libGL.so.$NV_VER
sudo rm -f /usr/$LIB32/nvidia/libGL.so.1
sudo rm -f /usr/$LIB32/nvidia/libGL.so
sudo rm -f /usr/$LIB32/libnvidia-glcore.so.$NV_VER
sudo rm -f /usr/$LIB32/nvidia/libEGL.so.$NV_VER
sudo rm -f /usr/$LIB32/nvidia/libEGL.so.1
sudo rm -f /usr/$LIB32/nvidia/libEGL.so
sudo rm -f /usr/$LIB32/nvidia/libGLESv1_CM.so.$NV_VER
sudo rm -f /usr/$LIB32/nvidia/libGLESv1_CM.so.1
sudo rm -f /usr/$LIB32/nvidia/libGLESv1_CM.so
sudo rm -f /usr/$LIB32/nvidia/libGLESv2.so.$NV_VER
sudo rm -f /usr/$LIB32/nvidia/libGLESv2.so.2
sudo rm -f /usr/$LIB32/nvidia/libGLESv2.so
sudo rm -f /usr/$LIB32/libnvidia-eglcore.so.$NV_VER
sudo rm -f /usr/$LIB32/libnvidia-encode.so.$NV_VER
sudo rm -f /usr/$LIB32/libnvidia-encode.so.1
sudo rm -f /usr/$LIB32/libnvidia-encode.so
sudo rm -f /usr/$LIB32/libnvidia-fbc.so.$NV_VER
sudo rm -f /usr/$LIB32/libnvidia-ifr.so.$NV_VER
sudo rm -f /usr/$LIB32/libnvidia-ifr.so.so.1
sudo rm -f /usr/$LIB32/libnvidia-ifr.so.so
sudo rm -f /usr/$LIB32/libnvidia-glsi.so.$NV_VER
sudo rm -f /usr/$LIB32/nvidia/libOpenCL.so.1.0.0
sudo rm -f /usr/$LIB32/nvidia/libOpenCL.so
sudo rm -f /usr/$LIB32/libnvidia-compiler.so.$NV_VER
sudo rm -f /usr/$LIB32/libnvidia-compiler.so.1
sudo rm -f /usr/$LIB32/libnvidia-compiler.so
sudo rm -f /usr/$LIB32/libnvidia-opencl.so.$NV_VER
sudo rm -f /usr/$LIB32/libnvidia-opencl.so
sudo rm -f /usr/$LIB32/libcuda.so.$NV_VER
sudo rm -f /usr/$LIB32/libcuda.so
sudo rm -f /usr/$LIB32/libnvcuvid.so.$NV_VER
sudo rm -f /usr/$LIB32/libnvcuvid.so.1
sudo rm -f /usr/$LIB32/libnvcuvid.so
sudo rm -f /usr/$LIB32/vdpau/libvdpau_nvidia.so.$NV_VER
sudo rm -f /usr/$LIB32/vdpau/libvdpau_nvidia.so.1
sudo rm -f /usr/$LIB32/vdpau/libvdpau_nvidia.so
sudo rm -f /usr/$LIB32/libnvidia-tls.so.$NV_VER
sudo rm -f /usr/$LIB32/libnvidia-ml.so.$NV_VER
sudo rm -f /usr/$LIB32/libnvidia-ml.so
sudo rm -f /usr/$LIB32/nvidia/libEGL_nvidia.so.$NV_VER
sudo rm -f /usr/$LIB32/nvidia/libEGL_nvidia.so.0
sudo rm -f /usr/$LIB32/nvidia/libEGL.so.1.1.0
sudo rm -f /usr/$LIB32/nvidia/libGLdispatch.so.0
sudo rm -f /usr/$LIB32/nvidia/libGLESv1_CM_nvidia.so.$NV_VER
sudo rm -f /usr/$LIB32/nvidia/libGLESv1_CM_nvidia.so.1
sudo rm -f /usr/$LIB32/nvidia/libGLESv2_nvidia.so.$NV_VER
sudo rm -f /usr/$LIB32/nvidia/libGLESv2_nvidia.so.2
sudo rm -f /usr/$LIB32/nvidia/libGL.so.1.7.0
sudo rm -f /usr/$LIB32/nvidia/libGLX_nvidia.so.$NV_VER
sudo rm -f /usr/$LIB32/nvidia/libGLX_nvidia.so.0
sudo rm -f /usr/$LIB32/nvidia/libGLX.so.0
sudo rm -f /usr/$LIB32/libnvidia-fatbinaryloader.so.$NV_VER
sudo rm -f /usr/$LIB32/libnvidia-ptxjitcompiler.so.$NV_VER
sudo rm -f /usr/$LIB32/nvidia/libOpenGL.so.0
sudo rm -r /usr/$LIB/nvidia
sudo rm -r /usr/$LIB64/nvidia
sudo rm -r /usr/$LIB32/nvidia
sudo rm -r /usr/share/licenses/nvidia
sudo rm -r /usr/share/doc/nvidia
sudo /sbin/ldconfig
## Remove kms
sudo /usr/sbin/dkms remove -m nvidia -v "$NV_VER" --all
sudo rm -r /usr/src/nvidia-"$NV_VER"
sudo rm -f /etc/modprobe.d/50-blacklist.conf
# Debian
sudo update-initramfs -u
# Fedora /openSUSE
sudo dracut -f -v