英伟达显卡

英伟达显卡

我在 Linux Mint 上使用 NvidiaGraphicCard 时遇到问题。所以首先我下载了​​ Linux 的 cuda 库。驱动程序来自cudaNVIDIA-Linux-x86_64-352.39.run全部都已安装,但我有这个:当然

$glxgears
Xlib:  extension "GLX" missing on display ":0.0".
Error: couldn't get an RGB, Double-buffered visual

来自 CUDA 的 DeviceQuery:

 deviceQuery
    ./deviceQuery Starting...

     CUDA Device Query (Runtime API) version (CUDART static linking)

    Detected 1 CUDA Capable device(s)

    Device 0: "GeForce GTX 960M"
      CUDA Driver Version / Runtime Version          7.5 / 7.5
      CUDA Capability Major/Minor version number:    5.0
      Total amount of global memory:                 2048 MBytes (2147352576 bytes)
      ( 5) Multiprocessors, (128) CUDA Cores/MP:     640 CUDA Cores
      GPU Max Clock rate:                            1176 MHz (1.18 GHz)
      Memory Clock rate:                             2505 Mhz
      Memory Bus Width:                              128-bit
      L2 Cache Size:                                 2097152 bytes
      Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
      Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
      Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 2048 layers
      Total amount of constant memory:               65536 bytes
      Total amount of shared memory per block:       49152 bytes
      Total number of registers available per block: 65536
      Warp size:                                     32
      Maximum number of threads per multiprocessor:  2048
      Maximum number of threads per block:           1024
      Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
      Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
      Maximum memory pitch:                          2147483647 bytes
      Texture alignment:                             512 bytes
      Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
      Run time limit on kernels:                     No
      Integrated GPU sharing Host Memory:            No
      Support host page-locked memory mapping:       Yes
      Alignment requirement for Surfaces:            Yes
      Device has ECC support:                        Disabled
      Device supports Unified Addressing (UVA):      Yes
      Device PCI Domain ID / Bus ID / location ID:   0 / 1 / 0
      Compute Mode:
         < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

    deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 7.5, CUDA Runtime Version = 7.5, NumDevs = 1, Device0 = GeForce GTX 960M
    Result = PASS

英伟达-SMI:

Mon Oct 12 15:07:58 2015       
+------------------------------------------------------+                       
| NVIDIA-SMI 352.39     Driver Version: 352.39         |                       
|-------------------------------+----------------------+----------------------+
| 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 GTX 960M    Off  | 0000:01:00.0     Off |                  N/A |
| N/A   42C    P0    N/A /  N/A |      7MiB /  2047MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

lspci

filip@filip-laptop /usr/local/cuda-7.5/samples/1_Utilities/deviceQuery $ lspci -vnn | grep VGA -A 12
00:02.0 VGA compatible controller [0300]: Intel Corporation Broadwell-U Integrated Graphics [8086:1612] (rev 0a) (prog-if 00 [VGA controller])
    Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:1138]
    Flags: bus master, fast devsel, latency 0, IRQ 46
    Memory at a1000000 (64-bit, non-prefetchable) [size=16M]
    Memory at b0000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 5000 [size=64]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: <access denied>
    Kernel driver in use: i915

00:03.0 Audio device [0403]: Intel Corporation Broadwell-U Audio Controller [8086:160c] (rev 0a)
    Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:1138]
    Flags: bus master, fast devsel, latency 0, IRQ 50

Nvidia 设置:

You do not appear to be usin NVIDIA X driver....

跑步sudo nvidia-xconfig不起作用。

那么有什么建议吗?

答案1

由于您使用的是非常新的 GPU 硬件,建议使用最新的稳定驱动程序。
从专有 GPU 驱动程序 PPA 安装支持 GTX960 的最新稳定 NVIDIA 驱动程序。
在安装新驱动程序之前,请先卸载之前安装的所有 NVIDIA 相关软件。

打开终端并执行:

sudo apt-get purge nvidia*  
sudo reboot

现在,通过执行以下命令从 NVIDIA 短期分支安装最新的当前稳定的 NVIDIA 驱动程序(因为您的笔记本电脑具有混合图形解决方案,请安装 NVIDIA Optimus 支持):

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-355 nvidia-prime
sudo reboot  

要在 intel 和 nvidia 显卡之间切换 - 打开NVIDIA X 服务器设置->主要简介

答案2

安装CUDA后我也遇到同样的问题。我首先省略了 CUDA NVIDIA 驱动程序安装,然后在其他方法中我安装了该驱动程序,但这些驱动程序都不起作用。

如果我安装 nvidia_355,OpenGL 可以工作,但 CUDA 不能。另一方面,如果我从 CUDA 安装驱动程序,OpenGL 将无法工作,而 CUDA 可以。

...

相关内容