You are not logged in.

#1 2014-01-18 20:42:55

Yochai
Member
Registered: 2010-10-20
Posts: 33

Primusrun fails to load library

Hey,

Wanted to try nouveau and after working for a long time with the nvidia driver I've installed it.
Now I can't use primusrun:

primusrun glxspheres64
primus: fatal: failed to load any of the libraries: /usr/$LIB/nvidia/libGL.so.1
/usr/$LIB/nvidia/libGL.so.1: cannot open shared object file: No such file or directory

while using optirun works.

optirun glxspheres64                                                                                                                                                                   
Polygons in scene: 62464                                                                                                                                                                                  
Visual ID of window: 0x21                                                                                                                                                                                 
Context is Direct                                                                                                                                                                                         
OpenGL Renderer: Gallium 0.4 on NVC1                                                                                                                                                                      
98.528009 frames/sec - 109.957258 Mpixels/sec                                                                                                                                                             
98.923407 frames/sec - 110.398522 Mpixels/sec                                                                                                                                                             
99.526122 frames/sec - 111.071153 Mpixels/sec

Any ideas on what might cause it or how can I fix it ?

Offline

#2 2014-01-18 20:52:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Primusrun fails to load library

primus provides /usr/lib/primus/libGL.so.1 while nvidia-utils provide /usr/lib/nvidia/libGL.so.1.
Are you using primus from the official repos? Did you reboot after installing nouveau?

Offline

#3 2014-01-18 20:54:30

Yochai
Member
Registered: 2010-10-20
Posts: 33

Re: Primusrun fails to load library

Yes to both questions.
I'm using the official build and I've tried to reboot once it didn't work.

There is no /usr/lib/nvidia folder but /usr/lib/primus/libGL.so.1 is there.

Last edited by Yochai (2014-01-18 21:19:31)

Offline

#4 2014-01-22 18:39:04

Yochai
Member
Registered: 2010-10-20
Posts: 33

Re: Primusrun fails to load library

Any chance someone can help with that ? the issue is still unsolved.

Offline

#5 2014-01-22 20:55:33

jeli
Member
Registered: 2014-01-22
Posts: 5

Re: Primusrun fails to load library

Yochai wrote:
primus: fatal: failed to load any of the libraries: /usr/$LIB/nvidia/libGL.so.1
Yochai wrote:

There is no /usr/lib/nvidia folder

primus says it can't find an nvidia library, and you confirmed you don't have an nvidia library.

I don't know if this will actually work, but you can try linking your libGL.so.1 library into the nvidia folder it is expecting

mkdir /usr/lib/nvidia
ln -s /usr/lib/primus/libGL.so.1 /usr/lib/nvidia/libGL.so.1

Jesse

Offline

#6 2014-01-24 07:55:44

amonakov
Member
Registered: 2012-09-30
Posts: 32

Re: Primusrun fails to load library

Ew, no, jeli's "advice" is bad. The real library is required, not a substitute, and definitely not primus' library itself.

It's unclear why primus is looking for nvidia library in nouveau case; did you modify /usr/bin/primusrun or /etc/bumblebee/bumblebee.conf?  In any case, primus may break with nouveau in other ways.  On Arch, you should try DRI_PRIME offloading with Nouveau rather than primus or virtualgl.

Offline

#7 2014-01-24 23:57:02

Yochai
Member
Registered: 2010-10-20
Posts: 33

Re: Primusrun fails to load library

amonakov, I've changed bumblebee.conf to pick nouveau, that's all. I've tried to remove the packages and all config files and reinstall them just to be sure.

Offloading as shown in the wiki seems very inconvenient, bumblebee turns the gpu off and on as needed to save battery.
Even though, I tried to test it:

cat /proc/acpi/bbswitch 
0000:01:00.0 ON

I ran this after I made sure the gpu is on:

xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x46 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 3 outputs: 4 associated providers: 0 name:Intel

Offline

#8 2014-01-25 08:31:11

amonakov
Member
Registered: 2012-09-30
Posts: 32

Re: Primusrun fails to load library

The wiki may be out of date on that: since kernel 3.12, Nouveau driver is capable of dynamically powering down the GPU as well.

To test PRIME offloading, un-blacklist nouveau, disable bumblebee service, and restart X.  Nouveau should show up in xrandr providers, but GPU should be powered down by default. bbswitch should not be loaded.

For primus to pick the correct library, you probably need to add LibraryPath=/usr/$LIB in driver-nouveau section in /etc/bumblebee/bumblebee.conf.

Offline

#9 2014-01-25 12:13:41

Yochai
Member
Registered: 2010-10-20
Posts: 33

Re: Primusrun fails to load library

I've tried adding LibraryPath=/usr/lib/primus:/usr/lib32/primus and (different attempts) LibraryPath=/usr/$LIB/primus, both didn't work. so I added XorgModulePath=/usr/lib/xorg/modules and it still doesn't work. Now instead of getting an error message nothing happens, the command just hangs in the terminal and there is visual feedback.

Then I've disabled bumblebee and restarted kdm, made sure that the nvidia gpu is running with nouveau (Kernel driver in use: nouveau), and tried xrandr --listproviders again. Still got only the Intel card in the results.

Offline

#10 2014-01-25 19:14:26

Yochai
Member
Registered: 2010-10-20
Posts: 33

Re: Primusrun fails to load library

It seems to be an issue with current builds, I've tried to install git bumblebee, nouveau and primus. It found the library but crashed (well, git version).

Offline

Board footer

Powered by FluxBB