In the /usr/share/doc/NVIDIA_GLX-1.0/README.txt documentation, Chapter 8. Common Problems, there is a Q&A that goes like this:
Q. I just upgraded my kernel, and now the NVIDIA kernel module will not load.
A. The kernel interface layer of the NVIDIA kernel module must be compiled
specifically for the configuration and version of your kernel. If you
upgrade your kernel, then the simplest solution is to reinstall the driver.
ADVANCED: You can install the NVIDIA kernel module for a non running kernel
(for example: in the situation where you just built and installed a new
kernel, but have not rebooted yet) with a command line such as this:
# sh NVIDIA-Linux-x86_64-375.39.run --kernel-name='KERNEL_NAME'
Where 'KERNEL_NAME' is what 'uname -r' would report if the target kernel
were running.
My question is:
In this scenario, can the command sudo sh NVIDIA-Linux-x86_64-375.39.run --kernel-name=‘KERNEL_NAME’ be executed from a X-window terminal as is? Or, must it be executed in tty1 after doing sudo systemctl stop lightdm.service?