我现在需要在浏览器里面实时渲染一个无人驾驶汽车的 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 让渲染程序走显卡呢?
1 gouchaoer2 OP 这个状况我也不知道怎么搜,因为无法描述。。。 |
2 azh7138m 2019-01-31 16:45:46 +08:00 via Android emmmm 俩机器互换一下硬盘看一下? 还有问题就是真 配置问题了( |
3 wszbdyyy 2019-01-31 17:45:22 +08:00 两台电脑的 chrome 浏览器版本一样吗?貌似在新版的 chrome 里面将第三方的 nvida 驱动 nova 加入了黑名单,也就是不会用显卡进行渲染。 |
![]() | 4 Cooky 2019-01-31 17:50:07 +08:00 via Android 打 glxinfo 看看区别? 看看两个机器有 xorg.conf 吗,有的话看看区别 lspci 看看两个显卡的 pci 地址和 xorg.conf 对得上吗 |
![]() | 5 kokutou 2019-01-31 17:51:38 +08:00 via Android 台式机? 然后显示器线插在集显上了? |
6 gouchaoer2 OP @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 ``` 不正常的那台为空 |
7 gouchaoer2 OP @Cooky glxinfo 的话正常的那台 glxinfo | less 可以查看到 display0 的 vendor 是 nvidia。。。不正常的那台没有这个命令,安装好了 mesa-utils 之后 glxinfo 显示 vendor 是 SGI。。。我觉得原因似乎呼之欲出了 |
![]() | 8 realpg PRO 如果其他配置一模一样 把好使的那台硬盘用 ghost 盘盘对拷到另外一个…… |
9 gouchaoer2 OP 原因找到了,因为我安装了百度 apollo 的实时内核,这个实时内核修改替换了显卡驱动的一些东西,但是它的文档没有更新,我在安装 nvidia 的显卡驱动的时候需要带上参数--no-kernel-module 这个才行 |