Asked and Answered
Download the patch and do the following. My notes:
Run nvidia install in one window
./NVIDIA-Linux-x86_64-340.107.run
Let it expand to produce a /tmp/self#### directory
In another window
cd /tmp/selfgz####/NVIDIA-Linux-x86_64-340.107
patch -p0 -l < /var/tmp/nv_patch_340.107_linux_kernel_5.0
patching file kernel/Makefile
patching file kernel/conftest.sh
patching file kernel/nv-drm.c
patching file kernel/nv-time.h
patching file kernel/os-interface.c
patching file kernel/uvm/Makefile
patching file kernel/uvm/nvidia_uvm_linux.h
patching file kernel/uvm/nvidia_uvm_lite.c
Hunk #1 succeeded at 2008 (offset -11 lines).
Hunk #2 succeeded at 2040 (offset -11 lines).
cd /
Go back to first window and continue the install
reboot
From the nvidia-installer.log
…deleted
ld -r -m elf_x86_64 -T /usr/src/kernels/3.10.0-1062.1.1.el7.x86_64/scripts/module-common.lds --build-id -o /tmp/selfgz6649/NVIDIA-Linux-x86_64-340.107/kernel/uvm/nvidia-uvm.ko /tmp/selfgz6649/NVIDIA-Linux-x86_64-340.107/kernel/uvm/nvidia-uvm.o /tmp/selfgz6649/NVIDIA-Linux-x86_64-340.107/kernel/uvm/nvidia-uvm.mod.o
make[1]: Leaving directory `/usr/src/kernels/3.10.0-1062.1.1.el7.x86_64’
NVIDIA: left KBUILD.
→ done.
→ Kernel module compilation complete.
→ Unable to determine if Secure Boot is enabled: No such file or directory
→ Kernel messages:
[ 8155.054693] usb 1-1.1: new low-speed USB device number 28 using ehci-pci
[ 8155.145915] usb 1-1.1: New USB device found, idVendor=046d, idProduct=c077, bcdDevice=72.00
[ 8155.146140] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 8155.146357] usb 1-1.1: Product: USB Optical Mouse
[ 8155.146471] usb 1-1.1: Manufacturer: Logitech
[ 8155.149271] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input156
[ 8155.149940] hid-generic 0003:046D:C077.0096: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:1a.0-1.1/input0
[ 8208.641869] usb 1-1.1: USB disconnect, device number 28
[ 8210.099152] usb 1-1.1: new low-speed USB device number 29 using ehci-pci
[ 8210.188499] usb 1-1.1: New USB device found, idVendor=046d, idProduct=c077, bcdDevice=72.00
[ 8210.188669] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 8210.188836] usb 1-1.1: Product: USB Optical Mouse
[ 8210.188921] usb 1-1.1: Manufacturer: Logitech
[ 8210.190990] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input157
[ 8210.191378] hid-generic 0003:046D:C077.0097: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:1a.0-1.1/input0
[ 8224.184164] nvidia: loading out-of-tree module taints kernel.
[ 8224.184169] nvidia: module license ‘NVIDIA’ taints kernel.
[ 8224.184170] Disabling lock debugging due to kernel taint
[ 8224.201210] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[ 8224.221122] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=io+mem
[ 8224.221320] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:01:00.0 on minor 0
[ 8224.221333] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 340.107 Thu May 24 21:54:01 PDT 2018
[ 8224.222593] nvidia_uvm: Loaded the UVM driver, major device number 241
[ 8224.224526] nvidia_uvm: Unregistered the UVM driver
[ 8224.226506] [drm] Module unloaded
→ Installing both new and classic TLS OpenGL libraries.
→ Installing classic TLS 32bit OpenGL libraries.
→ Install NVIDIA’s 32-bit compatibility libraries? (Answer: Yes)
→ Parsing log file:
→ done.
→ Validating previous installation:
ERROR: File ‘/usr/lib64/xorg/modules/extensions/libglx.so’ is not a symbolic link.
→ done.
WARNING: Your driver installation has been altered since it was initially installed; this may happen, for example, if you have since installed the NVIDIA driver through a mechanism other than nvidia-installer (such as your distribution’s native package management system). nvidia-installer will attempt to uninstall as best it can. Please see the file ‘/var/log/nvidia-installer.log’ for details.
→ Uninstalling NVIDIA Accelerated Graphics Driver for Linux-x86_64 (1.0-340107 (340.107)):
→ done.
→ Uninstallation of existing driver: NVIDIA Accelerated Graphics Driver for Linux-x86_64 (340.107) is complete.
→ nvidia-installer will install the libvdpau and libvdpau_trace libraries that were included with this installer package. These libraries are available separately through the libvdpau project and will be removed from the NVIDIA Linux driver installer package in the future, so it is recommended that VDPAU users install libvdpau separately, e.g. by using packages available from their distributions, or by building from the sources available at:
http://people.freedesktop.org/~aplattner/vdpau
→ Searching for conflicting X files:
→ done.
→ Searching for conflicting OpenGL files:
→ done.
→ Installing ‘NVIDIA Accelerated Graphics Driver for Linux-x86_64’ (340.107):
executing: ‘/usr/sbin/ldconfig’…
executing: '/usr/sbin/depmod -aq '…
→ done.
→ Driver file installation is complete.
→ Running post-install sanity check:
→ done.
→ Post-install sanity check passed.
→ Shared memory test passed.
→ Running runtime sanity check:
→ done.
→ Runtime sanity check passed.
→ Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver will be used when you restart X? Any pre-existing X configuration file will be backed up. (Answer: No)
→ Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86_64 (version: 340.107) is now complete. Please update your XF86Config or xorg.conf file as appropriate; see the file /usr/share/doc/NVIDIA_GLX-1.0/README.txt for detail