Bumblebee 运行良好。但 primus 却给我带来了问题。
vblank_mode=0 primusrun glxspheres
primus: fatal: failed to load any of the libraries: /usr/lib/nvidia-304/libGL.so.1:/usr/lib32/nvidia-304/libGL.so.1
libnvidia-tls.so.304.88: cannot open shared object file: No such file or directory
/usr/lib32/nvidia-304/libGL.so.1: wrong ELF class: ELFCLASS32
我已将 bumblebee.conf 中的桥接模式更改为 primus,但无济于事
ls -la /usr/lib/nvidia*
/usr/lib/nvidia:
total 32
drwxr-xr-x 2 root root 4096 Apr 24 10:03 .
drwxr-xr-x 176 root root 24576 Apr 26 03:50 ..
-rwxr-xr-x 1 root root 120 Jun 29 2012 pre-install
/usr/lib/nvidia-304:
total 84392
drwxr-xr-x 6 root root 4096 Apr 25 16:33 .
drwxr-xr-x 176 root root 24576 Apr 26 03:50 ..
-rw-r--r-- 1 root root 0 Apr 10 09:21 alt_ld.so.conf
drwxr-xr-x 2 root root 4096 Apr 25 16:32 bin
-rw-r--r-- 1 root root 42 Apr 10 09:22 ld.so.conf
lrwxrwxrwx 1 root root 17 Apr 10 09:21 libcuda.so -> libcuda.so.304.88
lrwxrwxrwx 1 root root 17 Apr 10 09:21 libcuda.so.1 -> libcuda.so.304.88
-rw-r--r-- 1 root root 10219344 Apr 10 09:22 libcuda.so.304.88
lrwxrwxrwx 1 root root 10 Apr 10 09:21 libGL.so -> libGL.so.1
lrwxrwxrwx 1 root root 15 Apr 10 09:21 libGL.so.1 -> libGL.so.304.88
-rw-r--r-- 1 root root 1076560 Apr 10 09:22 libGL.so.304.88
lrwxrwxrwx 1 root root 15 Apr 10 09:21 libnvcuvid.so -> libnvcuvid.so.1
lrwxrwxrwx 1 root root 20 Apr 10 09:21 libnvcuvid.so.1 -> libnvcuvid.so.304.88
-rw-r--r-- 1 root root 2196224 Apr 10 09:22 libnvcuvid.so.304.88
lrwxrwxrwx 1 root root 18 Apr 10 09:21 libnvidia-cfg.so -> libnvidia-cfg.so.1
lrwxrwxrwx 1 root root 23 Apr 10 09:21 libnvidia-cfg.so.1 -> libnvidia-cfg.so.304.88
-rw-r--r-- 1 root root 144864 Apr 10 09:22 libnvidia-cfg.so.304.88
lrwxrwxrwx 1 root root 23 Apr 10 09:21 libnvidia-compiler.so -> libnvidia-compiler.so.1
lrwxrwxrwx 1 root root 28 Apr 10 09:21 libnvidia-compiler.so.1 -> libnvidia-compiler.so.304.88
-rw-r--r-- 1 root root 27730224 Apr 10 09:22 libnvidia-compiler.so.304.88
-rw-r--r-- 1 root root 35454032 Apr 10 09:22 libnvidia-glcore.so.304.88
lrwxrwxrwx 1 root root 17 Apr 10 09:21 libnvidia-ml.so -> libnvidia-ml.so.1
lrwxrwxrwx 1 root root 22 Apr 10 09:21 libnvidia-ml.so.1 -> libnvidia-ml.so.304.88
-rw-r--r-- 1 root root 394280 Apr 10 09:22 libnvidia-ml.so.304.88
lrwxrwxrwx 1 root root 26 Apr 25 16:33 libnvidia-opencl.so.1 -> libnvidia-opencl.so.304.88
-rw-r--r-- 1 root root 8628320 Apr 10 09:22 libnvidia-opencl.so.304.88
-rw-r--r-- 1 root root 11704 Apr 10 09:22 libnvidia-tls.so.304.88
lrwxrwxrwx 1 root root 23 Apr 25 16:33 libnvidia-wfb.so.1 -> libnvidia-wfb.so.304.88
-rw-r--r-- 1 root root 295272 Apr 10 09:22 libnvidia-wfb.so.304.88
lrwxrwxrwx 1 root root 14 Apr 10 09:21 libOpenCL.so -> libOpenCL.so.1
lrwxrwxrwx 1 root root 16 Apr 10 09:21 libOpenCL.so.1 -> libOpenCL.so.1.0
lrwxrwxrwx 1 root root 18 Apr 10 09:21 libOpenCL.so.1.0 -> libOpenCL.so.1.0.0
-rw-r--r-- 1 root root 21296 Apr 10 09:22 libOpenCL.so.1.0.0
lrwxrwxrwx 1 root root 23 Apr 10 09:21 libXvMCNVIDIA_dynamic.so.1 -> libXvMCNVIDIA.so.304.88
lrwxrwxrwx 1 root root 23 Apr 10 09:21 libXvMCNVIDIA.so -> libXvMCNVIDIA.so.304.88
lrwxrwxrwx 1 root root 23 Apr 10 09:21 libXvMCNVIDIA.so.1 -> libXvMCNVIDIA.so.304.88
-rw-r--r-- 1 root root 167000 Apr 10 09:22 libXvMCNVIDIA.so.304.88
drwxr-xr-x 2 root root 4096 Apr 25 16:32 tls
drwxr-xr-x 2 root root 4096 Apr 25 16:32 vdpau
drwxr-xr-x 2 root root 4096 Apr 25 16:32 xorg
-rw-r--r-- 1 root root 27 Apr 10 09:22 XvMCConfig
/usr/lib/nvidia-settings-304:
total 72
drwxr-xr-x 6 root root 4096 Apr 25 16:32 .
drwxr-xr-x 176 root root 24576 Apr 26 03:50 ..
drwxr-xr-x 2 root root 4096 Apr 25 16:32 bin
drwxr-xr-x 3 root root 4096 Apr 25 16:32 include
-rw-r--r-- 1 root root 29 Apr 10 09:20 ld.so.conf
-rw-r--r-- 1 root root 23062 Apr 10 09:20 libXNVCtrl.a
drwxr-xr-x 3 root root 4096 Apr 25 16:32 share
drwxr-xr-x 4 root root 4096 Apr 25 16:32 usr
答案1
昨天我在 IRC 上与 Amonakov(primus 的开发人员之一)聊过这个问题。他告诉我,这是目前 Ubuntu PPA 中提供的 primus 版本中出现的问题。正如 Mr Double Xxx 所建议的,解决办法是改为使用optirun -b primus
。它与 是不同的命令primusrun
,但作用相同。该-b
选项代表桥你用。
要用于vblank_mode=0
基准测试目的,只需运行
vblank_mode=0 optirun -b primus
这很可能很快就会更新。
更新:
在 Ubuntu 的 primus 最新版本中,该命令primusrun
再次完全发挥作用。
答案2
使用新的 Primus 后端,您还必须安装 Primus:
sudo apt-get install primus
64 位:您还需要安装“primus-libs-ia32:i386”(请注意,如果您使用 Primus PPA,则需要安装的包是“primus-lib:i386”):
sudo apt-get install primus-libs-ia32:i386
您需要使用以下命令运行 primus
vblank_mode=0 optirun -b primus glxspheres
如果您正在运行 Firefox,则忽略 Firefox 错误...
如果桥接是自动的,你可以查看差异
x@Ubuntu:~$ optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce GT 525M/PCIe/SSE2
95.059492 frames/sec - 106.086393 Mpixels/sec
106.950557 frames/sec - 110.888809 Mpixels/sec
119.763802 frames/sec - 116.459279 Mpixels/sec
x@Ubuntu:~$ vblank_mode=0 optirun -b primus glxspheres
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Polygons in scene: 62464
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce GT 525M/PCIe/SSE2
225.607877 frames/sec - 251.778391 Mpixels/sec
232.861565 frames/sec - 244.446537 Mpixels/sec
答案3
最新版本的 primus 和 bumblebee 已解决问题。