天天看点

ubuntu driver简要及报错解决ubuntu driver

ubuntu driver

Nouveau

干掉Nouveau安装Linux Nvidia显卡驱动

概述

Nouveau是由第三方为NVIDIA显卡开发的一个开源3D驱动,也没能得到NVIDIA的认可与支持。

让Linux更容易的应对各种复杂的NVIDIA显卡环境,让用户安装完系统即可进入桌面并且有不错的显示效果。

很多Linux发行版默认集成了Nouveau驱动,在遇到NVIDIA显卡时默认安装。

户在安装NVIDIA官方私有驱动的时候Nouveau又成为了阻碍,不干掉Nouveau安装时总是报错。有些系统安装N卡驱动的时候会提示“ERROR: The Nouveau kernel driver is currently in use by your system. This driver is incompatible with the NVIDIA driver……”之类的错误。

llvmpipe(LLVM)

https://en.wikipedia.org/wiki/Mesa_(computer_graphics)

表示没装驱动的意思,使用集显

LLVMpipe 是 Mesa 中的 Gallium3D 图形驱动程序,它在 CPU 上完成所有渲染,以在 Linux 上提供软件加速回退,也可用于 OpenGL/图形驱动程序调试。LLVMpipe 使用 LLVM 来提供比 Softpipe 驱动程序更好的性能。

xorg

维基百科

What is the X server?

相关命令

查看显卡:

查看系统正在使用的显卡驱动和显卡:

sudo apt install mesa-utils
glxinfo -B
           

查看驱动的推荐版本:

sudo ubuntu-drivers devices
           

卸载显卡驱动:(先切到bash才能执行)

sudo apt-get --purge remove nvidia*
sudo apt autoremove
           

安装ubuntu驱动(自动安装recommended的那个):

sudo ubuntu-drivers autoinstall
           

查看内核版本:

cat /proc/version
# 或者
uname -r
           

报错

NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and runnin

g.

可能的原因:

一种是内核版本和显卡驱动版本不匹配,可以卸载后安装推荐的版本

一种是依赖问题

然后下载第一个依赖一般就可以了

此时,

NVIDIA-SMI

Driver

版本(

nvidia-smi

)也都更新到了对应的新版本

Failed to initialize NVML: Driver/library version mismatch

依赖不匹配,有时候重启就可以

或者:

sudo apt autoremove
sudo apt update
sudo apt upgrade