我的系统已升级 18.04 > 18.10 > 19.04 > 19.10。此问题始于升级到 19.10。
AnyDesk 无法运行,出现以下错误:
GdkGLExt-WARNING **: 08:49:56.379: Window system doesn't support OpenGL.
Android Studio 无法运行模拟器,并出现以下错误:
8:51 AM Emulator: Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled ((null):0, (null))
8:51 AM Emulator: queryConfigs: Could not query GLX version!
8:51 AM Emulator: getGLES2ExtensionString: Could not find GLES 2.x config!
8:51 AM Emulator: Failed to obtain GLES 2.x extensions string!
8:51 AM Emulator: Could not initialize emulated framebuffer
8:51 AM Emulator: emulator: ERROR: OpenGLES emulation failed to initialize.
8:51 AM Emulator: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
Google Earth Pro 无法运行。它没有给出错误消息,但在长堆栈跟踪中,问题似乎从这里开始:
/usr/lib/x86_64-linux-gnu/libGLX.so.0(glXCreateContext+0x33)[0x7fc3af903883]
glxinfo 无法运行:
$ glxinfo
name of display: :0
Error: couldn't find RGB GLX visual or fbconfig
所以我得出结论,尽管这个系统看起来运行得很好,但我的 OpenGL 已经严重损坏了。
显卡:英特尔® 高清显卡 530 (Skylake GT2)
已安装的驱动程序:
$ dpkg -l | grep xorg-video
ii xserver-xorg-video-all 1:7.7+19ubuntu12 amd64 X.Org X server -- output driver metapackage
ii xserver-xorg-video-amdgpu 19.0.1-1ubuntu1 amd64 X.Org X server -- AMDGPU display driver
ii xserver-xorg-video-ati 1:19.0.1-1ubuntu1 amd64 X.Org X server -- AMD/ATI display driver wrapper
ii xserver-xorg-video-fbdev 1:0.5.0-1ubuntu1 amd64 X.Org X server -- fbdev display driver
ii xserver-xorg-video-intel 2:2.99.917+git20190815-1 amd64 X.Org X server -- Intel i8xx, i9xx display driver
ii xserver-xorg-video-nouveau 1:1.0.16-1 amd64 X.Org X server -- Nouveau display driver
ii xserver-xorg-video-nvidia-390 390.129-0ubuntu2 amd64 NVIDIA binary Xorg driver
ii xserver-xorg-video-qxl 0.1.5-2build2 amd64 X.Org X server -- QXL display driver
ii xserver-xorg-video-radeon 1:19.0.1-1ubuntu1 amd64 X.Org X server -- AMD/ATI Radeon display driver
ii xserver-xorg-video-vesa 1:2.4.0-2 amd64 X.Org X server -- VESA display driver
ii xserver-xorg-video-vmware 1:13.3.0-2build1 amd64 X.Org X server -- VMware display driver
有人能告诉我如何修复/解决这个问题吗?
答案1
好吧,经过几个小时的搜索和从各处收集信息后,我找到了解决方法。很多地方的线索都表明 nvidia 驱动程序可能是罪魁祸首。所以我这样做了:
# dpkg -l | grep nvidia
ii libnvidia-cfg1-390:amd64 390.129-0ubuntu2 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-390 390.129-0ubuntu2 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-390:amd64 390.129-0ubuntu2 amd64 NVIDIA libcompute package
ii libnvidia-compute-390:i386 390.129-0ubuntu2 i386 NVIDIA libcompute package
ii libnvidia-decode-390:amd64 390.129-0ubuntu2 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-390:i386 390.129-0ubuntu2 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-390:amd64 390.129-0ubuntu2 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-390:i386 390.129-0ubuntu2 i386 NVENC Video Encoding runtime library
ii libnvidia-fbc1-390:amd64 390.129-0ubuntu2 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-390:i386 390.129-0ubuntu2 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-390:amd64 390.129-0ubuntu2 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-390:i386 390.129-0ubuntu2 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-ifr1-390:amd64 390.129-0ubuntu2 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii libnvidia-ifr1-390:i386 390.129-0ubuntu2 i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii nvidia-compute-utils-390 390.129-0ubuntu2 amd64 NVIDIA compute utilities
ii nvidia-dkms-390 390.129-0ubuntu2 amd64 NVIDIA DKMS package
ii nvidia-driver-390 390.129-0ubuntu2 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-390 390.129-0ubuntu2 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-390 390.129-0ubuntu2 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.13 all Tools to enable NVIDIA's Prime
ii nvidia-settings 435.21-0ubuntu2 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-390 390.129-0ubuntu2 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-390 390.129-0ubuntu2 amd64 NVIDIA binary Xorg driver
好的,我有很多 nvidia。“metapackage”通常是一个很好的起点...
# apt purge nvidia-driver-390
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
dkms libnvidia-cfg1-390 libnvidia-common-390 libnvidia-compute-390 libnvidia-compute-390:i386 libnvidia-decode-390 libnvidia-decode-390:i386 libnvidia-encode-390 libnvidia-encode-390:i386
libnvidia-fbc1-390 libnvidia-fbc1-390:i386 libnvidia-gl-390 libnvidia-gl-390:i386 libnvidia-ifr1-390 libnvidia-ifr1-390:i386 libxnvctrl0 nvidia-compute-utils-390 nvidia-dkms-390
nvidia-kernel-common-390 nvidia-kernel-source-390 nvidia-prime nvidia-settings nvidia-utils-390 screen-resolution-extra xserver-xorg-video-nvidia-390
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
nvidia-driver-390*
果然,看来除掉那个也会除掉所有的非法占用者,所以,运行了那个命令。接下来是……
# apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
dkms libnvidia-cfg1-390 libnvidia-common-390 libnvidia-compute-390 libnvidia-compute-390:i386 libnvidia-decode-390 libnvidia-decode-390:i386 libnvidia-encode-390 libnvidia-encode-390:i386
libnvidia-fbc1-390 libnvidia-fbc1-390:i386 libnvidia-gl-390 libnvidia-gl-390:i386 libnvidia-ifr1-390 libnvidia-ifr1-390:i386 libxnvctrl0 nvidia-compute-utils-390 nvidia-dkms-390
nvidia-kernel-common-390 nvidia-kernel-source-390 nvidia-prime nvidia-settings nvidia-utils-390 screen-resolution-extra xserver-xorg-video-nvidia-390
0 upgraded, 0 newly installed, 25 to remove and 3 not upgraded.
After this operation, 366 MB disk space will be freed.
现在看看情况如何:
# dpkg -l | grep nvidia
rc libnvidia-compute-390:amd64 390.129-0ubuntu2 amd64 NVIDIA libcompute package
rc libnvidia-compute-390:i386 390.129-0ubuntu2 i386 NVIDIA libcompute package
rc nvidia-compute-utils-390 390.129-0ubuntu2 amd64 NVIDIA compute utilities
rc nvidia-dkms-390 390.129-0ubuntu2 amd64 NVIDIA DKMS package
rc nvidia-kernel-common-390 390.129-0ubuntu2 amd64 Shared files used with the kernel module
rc nvidia-prime 0.8.13 all Tools to enable NVIDIA's Prime
rc nvidia-settings 435.21-0ubuntu2 amd64 Tool for configuring the NVIDIA graphics driver
rc screen-resolution-extra 0.18 all Extension for the nvidia-settings control panel
一切几乎都消失了。
重启。耶!AnyDesk、Google Earth Pro 和 Android Studio Emulator 现在可以运行了。并glxinfo
输出了内容页面。
PS 请注意,在执行此操作时,我从终端会话中保存了上述所有内容,并将其存储在 ~/nvidia.txt 文件中,这样如果我的系统无法启动,我就可以进入控制台并手动重新安装所有内容。谢天谢地,我不需要这样做。
答案2
升级到 20.04 后出现同样的问题,清除 nvidia-331 和 nvidia-340 后 OpenGL 又可以关闭并运行了。系统已经经过多次升级,我想我应该有一天重新安装一次。