amonakov / primus

Low-overhead client-side GPU offloading
ISC License
216 stars 20 forks source link

primusrun won't work again #66

Closed donfuz14 closed 11 years ago

donfuz14 commented 11 years ago

Hello,

I'd a running primusrun on my notebook but since last updates (as far as i know there was also a kernel update in it) it won't work again. When I start any program with optirun it will work fine.

my graphic card: Nvidia GTX 670M driver: nvidia-experimental-310 os: Ubuntu 12.04

commandline: donfuz@medion:~$ primusrun glxspheres Polygons in scene: 62464 Visual ID of window: 0xaf Context is Indirect OpenGL Renderer: GeForce GTX 670M/PCIe/SSE2 primus: fatal: failed to acquire direct rendering context for readback thread ^C donfuz@medion:~$

syslog : Feb 28 10:59:10 medion acpid: client 6829[0:1002] has disconnected Feb 28 10:59:10 medion acpid: client 6829[0:1002] has disconnected Feb 28 10:59:10 medion acpid: client connected from 9870[0:1002] Feb 28 10:59:10 medion acpid: 1 client rule loaded Feb 28 10:59:10 medion kernel: [ 1652.656619] NVRM: GPU at 0000:01:00: GPU-888aa1e6-d479-5566-dcb0-820b9e52185f Feb 28 10:59:10 medion acpid: client connected from 9870[0:1002] Feb 28 10:59:10 medion acpid: 1 client rule loaded Feb 28 10:59:12 medion bumblebeed[1407]: Could not read data! Error: Connection reset by peer

btw I don't want to uninstall the upgrade, because I think it should have to work (in thoughts of following updates)

I've already reinstalled primus and mesa. If you need any other information plz let me know.

thx in advance

amonakov commented 11 years ago

Please show output of ls -l /usr/lib/nvidia-current.

donfuz14 commented 11 years ago

here the content of /usr/lib/nvidia-current/

donfuz@medion:~$ ls -l /usr/lib/nvidia-current/ insgesamt 78744 -rw-r--r-- 1 root root 0 Nov 7 04:54 alt_ld.so.conf drwxr-xr-x 2 root root 4096 Nov 12 21:27 bin -rw-r--r-- 1 root root 24 Nov 7 04:55 ld.so.conf lrwxrwxrwx 1 root root 17 Nov 7 04:54 libcuda.so -> libcuda.so.304.64 lrwxrwxrwx 1 root root 17 Nov 7 04:54 libcuda.so.1 -> libcuda.so.304.64 -rw-r--r-- 1 root root 9872972 Nov 7 04:55 libcuda.so.304.64 lrwxrwxrwx 1 root root 10 Nov 7 04:54 libGL.so -> libGL.so.1 lrwxrwxrwx 1 root root 15 Nov 7 04:54 libGL.so.1 -> libGL.so.304.64 -rw-r--r-- 1 root root 833028 Nov 7 04:55 libGL.so.304.64 lrwxrwxrwx 1 root root 15 Nov 7 04:54 libnvcuvid.so -> libnvcuvid.so.1 lrwxrwxrwx 1 root root 20 Nov 7 04:54 libnvcuvid.so.1 -> libnvcuvid.so.304.64 -rw-r--r-- 1 root root 2240868 Nov 7 04:55 libnvcuvid.so.304.64 lrwxrwxrwx 1 root root 18 Nov 7 04:54 libnvidia-cfg.so -> libnvidia-cfg.so.1 lrwxrwxrwx 1 root root 23 Nov 7 04:54 libnvidia-cfg.so.1 -> libnvidia-cfg.so.304.64 -rw-r--r-- 1 root root 136392 Nov 7 04:55 libnvidia-cfg.so.304.64 lrwxrwxrwx 1 root root 23 Nov 7 04:54 libnvidia-compiler.so -> libnvidia-compiler.so.1 lrwxrwxrwx 1 root root 28 Nov 7 04:54 libnvidia-compiler.so.1 -> libnvidia-compiler.so.304.64 -rw-r--r-- 1 root root 28116588 Nov 7 04:55 libnvidia-compiler.so.304.64 -rw-r--r-- 1 root root 30350068 Nov 7 04:55 libnvidia-glcore.so.304.64 lrwxrwxrwx 1 root root 17 Nov 7 04:54 libnvidia-ml.so -> libnvidia-ml.so.1 lrwxrwxrwx 1 root root 22 Nov 7 04:54 libnvidia-ml.so.1 -> libnvidia-ml.so.304.64 -rw-r--r-- 1 root root 388128 Nov 7 04:55 libnvidia-ml.so.304.64 lrwxrwxrwx 1 root root 26 Aug 21 2012 libnvidia-opencl.so.1 -> libnvidia-opencl.so.304.37 -rw-r--r-- 1 root root 8170676 Nov 7 04:55 libnvidia-opencl.so.304.64 -rw-r--r-- 1 root root 10060 Nov 7 04:55 libnvidia-tls.so.304.64 lrwxrwxrwx 1 root root 23 Aug 21 2012 libnvidia-wfb.so.1 -> libnvidia-wfb.so.304.37 -rw-r--r-- 1 root root 264840 Nov 7 04:55 libnvidia-wfb.so.304.64 lrwxrwxrwx 1 root root 14 Nov 7 04:54 libOpenCL.so -> libOpenCL.so.1 lrwxrwxrwx 1 root root 16 Nov 7 04:54 libOpenCL.so.1 -> libOpenCL.so.1.0 lrwxrwxrwx 1 root root 18 Nov 7 04:54 libOpenCL.so.1.0 -> libOpenCL.so.1.0.0 -rw-r--r-- 1 root root 16232 Nov 7 04:55 libOpenCL.so.1.0.0 lrwxrwxrwx 1 root root 23 Nov 7 04:54 libXvMCNVIDIA_dynamic.so.1 -> libXvMCNVIDIA.so.304.64 lrwxrwxrwx 1 root root 23 Nov 7 04:54 libXvMCNVIDIA.so -> libXvMCNVIDIA.so.304.64 lrwxrwxrwx 1 root root 23 Nov 7 04:54 libXvMCNVIDIA.so.1 -> libXvMCNVIDIA.so.304.64 -rw-r--r-- 1 root root 188276 Nov 7 04:55 libXvMCNVIDIA.so.304.64 drwxr-xr-x 2 root root 4096 Nov 12 21:27 tls drwxr-xr-x 2 root root 4096 Nov 12 21:27 vdpau drwxr-xr-x 2 root root 4096 Nov 12 21:27 xorg -rw-r--r-- 1 root root 27 Nov 7 04:55 XvMCConfig

amonakov commented 11 years ago

@ArchangeGabriel, looks like Ubuntu's nvidia-experimental-310 does not conflict with nvidia-current? What are they smoking? How does optirun behave in this case?

@donfuz14, you can use optirun -b primus, or edit /etc/bumblebee/bumblebee.conf (opton Bridge), or edit /usr/bin/primusrun to point to nvidia-experimental libraries instead of nvidia-current. For now primusrun does not get library paths from the daemon.

donfuz14 commented 11 years ago

thx for help ;)

i tried optirun -b primus .. but there is no option -b

in the bumblebee.conf is already nvidia-experimental configured

in /usr/bin/primusrun i changed following:

... export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/lib/nvidia-experimental-310/libGL.so.1'} ... /usr/lib*/nvidia-experimental-310|'') # nvidia is used by default

now i see following message: donfuz@medion:~$ primusrun glxspheres primus: fatal: failed to load any of the libraries: /usr/lib/nvidia-experimental-310/libGL.so.1 libnvidia-tls.so.310.14: cannot open shared object file: No such file or directory donfuz@medion:~$ ls -l /usr/lib/nvidia-experimental-310/ insgesamt 79184 -rw-r--r-- 1 root root 0 Jän 29 14:56 alt_ld.so.conf drwxr-xr-x 2 root root 4096 Feb 3 16:16 bin -rw-r--r-- 1 root root 33 Jän 29 14:56 ld.so.conf lrwxrwxrwx 1 root root 17 Jän 29 14:56 libcuda.so -> libcuda.so.310.14 lrwxrwxrwx 1 root root 17 Jän 29 14:56 libcuda.so.1 -> libcuda.so.310.14 -rw-r--r-- 1 root root 10010340 Jän 29 14:57 libcuda.so.310.14 lrwxrwxrwx 1 root root 10 Jän 29 14:56 libGL.so -> libGL.so.1 lrwxrwxrwx 1 root root 15 Jän 29 14:56 libGL.so.1 -> libGL.so.310.14 -rw-r--r-- 1 root root 850820 Jän 29 14:57 libGL.so.310.14 lrwxrwxrwx 1 root root 15 Jän 29 14:56 libnvcuvid.so -> libnvcuvid.so.1 lrwxrwxrwx 1 root root 20 Jän 29 14:56 libnvcuvid.so.1 -> libnvcuvid.so.310.14 -rw-r--r-- 1 root root 2498788 Jän 29 14:57 libnvcuvid.so.310.14 lrwxrwxrwx 1 root root 18 Jän 29 14:56 libnvidia-cfg.so -> libnvidia-cfg.so.1 lrwxrwxrwx 1 root root 23 Jän 29 14:56 libnvidia-cfg.so.1 -> libnvidia-cfg.so.310.14 -rw-r--r-- 1 root root 144584 Jän 29 14:57 libnvidia-cfg.so.310.14 lrwxrwxrwx 1 root root 23 Jän 29 14:56 libnvidia-compiler.so -> libnvidia-compiler.so.1 lrwxrwxrwx 1 root root 28 Jän 29 14:56 libnvidia-compiler.so.1 -> libnvidia-compiler.so.310.14 -rw-r--r-- 1 root root 28116588 Jän 29 14:57 libnvidia-compiler.so.310.14 -rw-r--r-- 1 root root 121884 Jän 29 14:57 libnvidia-encode.so.310.14 -rw-r--r-- 1 root root 30470068 Jän 29 14:57 libnvidia-glcore.so.310.14 lrwxrwxrwx 1 root root 17 Jän 29 14:56 libnvidia-ml.so -> libnvidia-ml.so.1 lrwxrwxrwx 1 root root 22 Jän 29 14:56 libnvidia-ml.so.1 -> libnvidia-ml.so.310.14 -rw-r--r-- 1 root root 387776 Jän 29 14:57 libnvidia-ml.so.310.14 -rw-r--r-- 1 root root 8154292 Jän 29 14:57 libnvidia-opencl.so.310.14 -rw-r--r-- 1 root root 10092 Jän 29 14:57 libnvidia-tls.so.310.14 -rw-r--r-- 1 root root 264840 Jän 29 14:57 libnvidia-wfb.so.310.14 lrwxrwxrwx 1 root root 14 Jän 29 14:56 libOpenCL.so -> libOpenCL.so.1 lrwxrwxrwx 1 root root 16 Jän 29 14:56 libOpenCL.so.1 -> libOpenCL.so.1.0 lrwxrwxrwx 1 root root 18 Jän 29 14:56 libOpenCL.so.1.0 -> libOpenCL.so.1.0.0 -rw-r--r-- 1 root root 16232 Jän 29 14:57 libOpenCL.so.1.0.0 drwxr-xr-x 2 root root 4096 Feb 3 16:16 tls drwxr-xr-x 2 root root 4096 Feb 3 16:16 vdpau drwxr-xr-x 2 root root 4096 Feb 3 16:16 xorg

can i do something else ?

karolherbst commented 11 years ago

you need bumblebee-3.1 for the "-b" option

ArchangeGabriel commented 11 years ago

You need /usr/lib*/nvidia-experimental-310* instead of usr/lib*/nvidia-experimental-310.

@amonakov: Why did they do that... Isn't it enough hard with so many flavors for developers? Anyway, optirun looks for paths in the form of /usr/lib/nvidia*/libGL.so, and take the first one returned (and hopefully, Lekensteyn considered the case multiple ones could be found, else the daemon would have crashed on start in such cases...). So nvidia-current comes before nvidia-experimental-310, and that's the result. So a solution for here is just to uninstall nvidia-current.

donfuz14 commented 11 years ago

thx a lot ArchangeGabriel it worked like charm :D What a damn * can do gg

ArchangeGabriel commented 11 years ago

You may close this issue if everything is working.

ArchangeGabriel commented 11 years ago

@amonakov Could you close this one?

amonakov commented 11 years ago

It's a reminder to think about implementing reading library path from the daemon.