两台 PC 一样的 ubuntu14.04 操作系统+一样的 Nvidia 卡+一样 N 卡驱动,一台的渲染就是不走显卡

2019-01-31 16:41:41 +08:00
 gouchaoer2

我现在需要在浏览器里面实时渲染一个无人驾驶汽车的 3D 效果,如果不走 GPU 就会有锯齿效果差。。。然后 2 台 PC 其中一台渲染的时候除了系统的界面就是不走显卡,执行 nvidia-smi 结果如下:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.39                 Driver Version: 375.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  Graphics Device     Off  | 0000:01:00.0      On |                  N/A |
|  0%   39C    P8    15W / 250W |    147MiB / 11170MiB |     26%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0      1196    G   /usr/lib/xorg/Xorg                             144MiB |
+-----------------------------------------------------------------------------+

然后另一台正常的就可以走显卡,执行 nvidia-smi 结果为(其实这台之前也有不走显卡的情况,但是后来怎么正常的我不知道,一定有一个变量,这个变量是啥我不知道):

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.39                 Driver Version: 375.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  Graphics Device     Off  | 0000:01:00.0      On |                  N/A |
|  7%   48C    P2    53W / 250W |   1930MiB / 11169MiB |     23%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0      1461    G   /usr/lib/xorg/Xorg                             204MiB |
|    0      2031    G   compiz                                         204MiB |
|    0     20912    G   /opt/teamviewer/tv_bin/TeamViewer               17MiB |
|    0     24792    G   unity-control-center                             2MiB |
|    0     28100    G   /usr/lib/firefox/firefox                       749MiB |
|    0     28605    G   /usr/lib/firefox/firefox                       749MiB |
+-----------------------------------------------------------------------------+

问题来了,我怎么控制我的第一台 PC 让渲染程序走显卡呢?

1783 次点击
所在节点    程序员
9 条回复
gouchaoer2
2019-01-31 16:42:37 +08:00
这个状况我也不知道怎么搜,因为无法描述。。。
azh7138m
2019-01-31 16:45:46 +08:00
emmmm
俩机器互换一下硬盘看一下?
还有问题就是真 配置问题了(
wszbdyyy
2019-01-31 17:45:22 +08:00
两台电脑的 chrome 浏览器版本一样吗?貌似在新版的 chrome 里面将第三方的 nvida 驱动 nova 加入了黑名单,也就是不会用显卡进行渲染。
Cooky
2019-01-31 17:50:07 +08:00
打 glxinfo 看看区别?
看看两个机器有 xorg.conf 吗,有的话看看区别
lspci 看看两个显卡的 pci 地址和 xorg.conf 对得上吗
kokutou
2019-01-31 17:51:38 +08:00
台式机?
然后显示器线插在集显上了?
gouchaoer2
2019-01-31 19:10:40 +08:00
@kokutou 并没有。。。
@Cooky 正常的那台的 /etc/X11/xorg.conf 内容是:
```

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"

# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option "DPMS"
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection

```

不正常的那台为空
gouchaoer2
2019-01-31 19:16:43 +08:00
@Cooky glxinfo 的话正常的那台 glxinfo | less 可以查看到 display0 的 vendor 是 nvidia。。。不正常的那台没有这个命令,安装好了 mesa-utils 之后 glxinfo 显示 vendor 是 SGI。。。我觉得原因似乎呼之欲出了
realpg
2019-02-01 12:01:12 +08:00
如果其他配置一模一样
把好使的那台硬盘用 ghost 盘盘对拷到另外一个……
gouchaoer2
2019-03-06 10:36:21 +08:00
原因找到了,因为我安装了百度 apollo 的实时内核,这个实时内核修改替换了显卡驱动的一些东西,但是它的文档没有更新,我在安装 nvidia 的显卡驱动的时候需要带上参数--no-kernel-module 这个才行

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/532209

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX