明明已经正常安装nvidia驱动,但是关闭屏幕后(例如挂起,或者重新启动后),出现nvidia lost。nvidia无法启动X的问题。
1、使用dmesg可以查看到,使用nvidia-bug-report.sh进行得到日志
2、在当前文件夹下获取日志,nvidia-bug-report.log
[ 5.283] (II) LoadModule: "glxserver_nvidia"
[ 5.283] (WW) Warning, couldn't open module glxserver_nvidia
[ 5.283] (EE) NVIDIA: Failed to load module "glxserver_nvidia" (module does not exist, 0)
[ 5.283] (EE) NVIDIA(G0): Failed to initialize the GLX module; please check in your X
[ 5.283] (EE) NVIDIA(G0): log file that the GLX module has been loaded in your X
[ 5.283] (EE) NVIDIA(G0): server, and that the module is the NVIDIA GLX module. If
[ 5.283] (EE) NVIDIA(G0): you continue to encounter problems, Please try
[ 5.283] (EE) NVIDIA(G0): reinstalling the NVIDIA driver.
[ 5.283] (II) NVIDIA: The X server does not support PRIME Render Offload.
[ 6.109] (II) NVIDIA(G0): NVIDIA GPU NVIDIA GeForce MX350 (GP107-A) at PCI:5:0:0
[ 6.109] (II) NVIDIA(G0): (GPU-0)
3、查看当前xorg.conf文件,在路径/etc/X11下,打开查看
Section "Files"
#ModulePath "/usr/lib/nvidia/xorg"
ModulePath "/usr/lib/x86_64-linux-gnu/"
ModulePath "/usr/lib/xorg/modules"
EndSection
~
上面(注释的)"/usr/lib/nvidia/xorg",仔细查看下面没有nvidia_drv.so,libglx.so, libglxserver_nvidia.so库,仔细查看在/usr/lib/x86_64-linux-gnu/路径下,发现在里面。
4、如果使用*.run方式安装驱动后,可能整个根目录下都没有libglxserver_nvidia.so的库文件
可以将run文件见解压:
sudo *.run -x
解压详细见:
然后把相关依赖库拷贝到/usr/lib/x86_64-linux-gnu/路径下,例如想要拷贝libglxserver_nvidia.so.510.68.02,其依赖库为:
libnvidia-tls.so.510.68.02
libnvidia-glcore.so.510.68.02
上述三个库一起拷贝。
tips: 驱动也是正常安装,至于为什么文件丢失,不清楚。