我正在尝试找出系统中当前正在使用哪个 Nvidia 驱动程序(以及如何将其切换到另一个版本或开源nouveau
驱动程序)。
modinfo
知道系统中安装了几个 nvidia 驱动程序(nvidia_173
和nvidia_331
),但lsmod
只是调用它nvidia
(并modinfo nvidia
失败):
$ modinfo nv
nvidia_173 nvidia_331 nvidiafb nvme nvram nv_tco
marsmorgana@marsmorgana:~$ modinfo nvidia_331
filename: /lib/modules/3.11.0-26-generic/updates/dkms/nvidia_331.ko
alias: char-major-195-*
version: 331.113
supported: external
license: NVIDIA
alias: pci:v000010DEd00000E00sv*sd*bc04sc80i00*
alias: pci:v000010DEd00000AA3sv*sd*bc0Bsc40i00*
alias: pci:v000010DEd*sv*sd*bc03sc02i00*
alias: pci:v000010DEd*sv*sd*bc03sc00i00*
depends: drm
vermagic: 3.11.0-26-generic SMP mod_unload modversions 686
parm: NVreg_Mobile:int
parm: NVreg_ResmanDebugLevel:int
parm: NVreg_RmLogonRC:int
parm: NVreg_ModifyDeviceFiles:int
parm: NVreg_DeviceFileUID:int
parm: NVreg_DeviceFileGID:int
parm: NVreg_DeviceFileMode:int
parm: NVreg_RemapLimit:int
parm: NVreg_UpdateMemoryTypes:int
parm: NVreg_InitializeSystemMemoryAllocations:int
parm: NVreg_UsePageAttributeTable:int
parm: NVreg_MapRegistersEarly:int
parm: NVreg_RegisterForACPIEvents:int
parm: NVreg_CheckPCIConfigSpace:int
parm: NVreg_EnablePCIeGen3:int
parm: NVreg_EnableMSI:int
parm: NVreg_MemoryPoolSize:int
parm: NVreg_RegistryDwords:charp
parm: NVreg_RmMsg:charp
parm: NVreg_AssignGpus:charp
marsmorgana@marsmorgana:~$ lsmod | fgrep nv
nvidia 9704581 42
drm 247722 2 nvidia
marsmorgana@marsmorgana:~$ modinfo nvidia
ERROR: modinfo: could not find module nvidia
marsmorgana@marsmorgana:~$
如何找出正在使用哪一个?
如何切换正在使用的那个?
回复:附加驱动程序
在 12.04 中,我既没有additional-drivers
标签update-manager
:
additional-drivers
菜单中也没有应用程序,也没有这样的程序(由 检查locate
),也没有这样的可安装包(由 检查apt-cache search
)。
(关于我想要检查和切换 nvidia 驱动程序的原因的题外解释)
因为我可能因为 nvidia 驱动程序而在 wine 下运行 SketchUp 时遇到问题,因为有报道。
离题更新:事实上,后来发现这是另一个已知的与 nvidia 无关的问题(请参阅“提示”)(通过“Sketchup 没有响应“),必须在 wine-1.7.31 中已修复;此版本或更高版本可在 Ubuntu Wine 存储库中找到Trusty 或更高版本,所以我需要从 12.04 (Precise) 升级到 Trusty 才能使用这些软件包。尽管如此,我的问题在这里是有意义的,与我的情况中的实际解决方案无关。
答案1
通过列出可用的驱动程序
% apt-cache search nvidia | grep -P '^nvidia-(driver-)?[0-9]+\s'
nvidia-304 - NVIDIA legacy binary driver - version 304.125
nvidia-310 - Transitional package for nvidia-310
nvidia-319 - Transitional package for nvidia-319
nvidia-346 - NVIDIA binary driver - version 346.59
nvidia-driver-390 - NVIDIA driver metapackage
nvidia-340 - NVIDIA binary driver - version 340.107
nvidia-driver-418 - Transitional package for nvidia-driver-430
nvidia-driver-430 - NVIDIA driver metapackage
nvidia-driver-435 - NVIDIA driver metapackage
并安装,例如
sudo apt-get install nvidia-driver-435
显示正在使用的驱动程序
nvidia-smi
Sat Sep 5 11:57:22 2015 +------------------------------------------------------+ | NVIDIA-SMI 340.76 Driver Version: 340.76 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce 9800 GT... Off | 0000:01:00.0 N/A | N/A | | 65% 52C P0 N/A / N/A | 271MiB / 1023MiB | N/A Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Compute processes: GPU Memory | | GPU PID Process name Usage | |=============================================================================| | 0 Not Supported | +-----------------------------------------------------------------------------+
nvidia-settings
nvidia-settings -q NvidiaDriverVersion
Attribute 'NvidiaDriverVersion' (sturm:1.0): 340.76 Attribute 'NvidiaDriverVersion' (sturm:1[gpu:0]): 340.76
cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 340.76 Thu Jan 22 12:11:08 PST 2015 GCC version: gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13)