You are not logged in.

#1 2016-02-11 00:03:05

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

Trying to run a game with optirun (Bridge=primus) gave the following error:

    primus: fatal: failed to load any of the libraries: /usr/lib/nvidia/libGL.so.1:/usr/lib32/nvidia/libGL.so.1

But, why was it looking in the /usr/lib/nvidia folder? Checking /etc/bumblebee/bumblebee.conf, it shows

    PrimusLibraryPath=/usr/lib/primus:/usr/lib32/primus

Since libGL.so.1 is also located in /usr/lib and /usr/lib32, I tried changing that line to

    PrimusLibraryPath=/usr/lib:/usr/lib32

Removing "primus" from the path worked! Why? What's wrong with libGL.so.1 located in the primus folder? Does Primus really need a special library other than the one directly located in /usr/lib?

Last edited by colinkeenan (2016-02-11 00:03:55)

Offline

#2 2016-02-11 12:23:25

The Loko
Member
From: Spain
Registered: 2014-07-23
Posts: 103

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

I have same issue since today's nvidia-utils mesa and mesa-libgl update. Bug maybe?

Offline

#3 2016-02-11 13:19:22

jaergenoth
Member
Registered: 2015-01-16
Posts: 85

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

Package "nvidia-utils-361.18-2" has, among others, a file "/usr/lib/nvidia/libGL.so" in it.
Package "nvidia-utils-361.28-3" only has a file "/usr/lib/nvidia/libEGL.so".

I don't know why it was removed though. A bug or something related to the GLVND stuff?

Edit:
Obviously there are other files too, but I was referring to this one particular folder.

Edit 2:
Well it seems my system wasn't completely up to date, even though I just updated a few hours ago.
64-bit programs work again.

Also, package "libglvnd" got installed, but the lib32 version failed to install due to conflicting files with lib32-mesa-libgl.

Last edited by jaergenoth (2016-02-11 13:31:05)

Offline

#4 2016-02-11 13:29:52

gim
Member
Registered: 2013-07-27
Posts: 35

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

Looks like the last PKGBUILD change should fix that: https://projects.archlinux.org/svntogit … b66585aa7a
Not sure though. I really don't understand what's up with that.

Last edited by gim (2016-02-11 13:33:23)

Offline

#5 2016-02-11 14:41:03

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

That last PKGBUILD did fix for 64 bit applications, but there needs to be an updated PKGBUILD for lib32-nvidia-utils.

Offline

#6 2016-02-11 15:36:06

gim
Member
Registered: 2013-07-27
Posts: 35

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

Now the game I want to launch reports this:

../../prog/engine2/drv/drv3d_GL3/linux_main.cpp, 511: error when creating of gl_context
Send this report to developers or try to fix causes and restart game

glxgears doesn't work too:

% primusrun glxgears -info
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  19
  Current serial number in output stream:  20

I'm going to downgrade then.

Offline

#7 2016-02-11 16:00:22

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

You may not have to downgrade. Did you try the solution I provided in the original post? So, did you edit /etc/bumblebee/bumblebee.conf and set PrimusLibraryPath=/usr/lib:/usr/lib32?

With the latest upgrade {lib32-libglvnd (0.0.0.20160210-2), lib32-nvidia-utils (361.28-2 -> 361.28-3), lib32-opencl-nvidia (361.28-2 -> 361.28-3)}, I no longer get the original error message when it tries to use the library in the nvidia folder, but 32-bit applications fail without explanation - just hang. Anyway, that's what steam did.

For me, PrimusLibraryPath=/usr/lib/nvidia:/usr/lib32 works perfectly. So, 64 bit works with the library in the nvidia folder, but 32 bit needs the library directly in /usr/lib32.

Offline

#8 2016-02-11 20:14:26

bernardogo
Member
Registered: 2015-10-26
Posts: 22

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

gim wrote:

Now the game I want to launch reports this:

../../prog/engine2/drv/drv3d_GL3/linux_main.cpp, 511: error when creating of gl_context
Send this report to developers or try to fix causes and restart game

glxgears doesn't work too:

% primusrun glxgears -info
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  19
  Current serial number in output stream:  20

I'm going to downgrade then.

It is happening for me too. Already did what OP said in the first post.

Offline

#9 2016-02-12 08:56:11

jaergenoth
Member
Registered: 2015-01-16
Posts: 85

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

Everything seems to work again. Native 64-bit and 32-bit programs too.

If your packages are older than these you should propably update:

lib32-libglvnd     0.0.0.20160210-2
lib32-mesa         11.1.2-1
lib32-mesa-libgl   11.1.2-1
lib32-nvidia-utils 361.28-3
libglvnd           0.0.0.20160210-2
mesa               11.1.2-1
mesa-libgl         11.1.2-1
nvidia-utils       361.28-4

Edit:
I only tested with glxspheres32 and glxspheres64. So your mileage may vary.

Last edited by jaergenoth (2016-02-12 08:58:51)

Offline

#10 2016-02-13 00:46:22

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

Yeah, everything's definitely not working again. I had to revert back to my original solution to get some 64 bit games going as well (XCOM Unknown). I have no idea where the good library in /usr/lib came from, but I'm glad I have it.

Last edited by colinkeenan (2016-02-13 00:46:44)

Offline

#11 2016-02-13 08:54:35

jaergenoth
Member
Registered: 2015-01-16
Posts: 85

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

Well I did some more tests and everything does indeed work.

Tried running XCOM: Enemy Unknown, Hand of Fate and Distance, all worked perfectly.

I got the packages from the official repos, except for bumblebee.

I'm using "bumblebee-git 3.2.1.r18.3c6f9c9-1" with this config:

[bumblebeed]
VirtualDisplay=:8
KeepUnusedXServer=false
ServerGroup=bumblebee
TurnCardOffAtExit=true
NoEcoModeOverride=false
Driver=nvidia
XorgConfDir=/etc/bumblebee/xorg.conf.d

[optirun]
Bridge=primus
VGLTransport=proxy
PrimusLibraryPath=/usr/lib/primus:/usr/lib32/primus
AllowFallbackToIGC=false

[driver-nvidia]
KernelDriver=nvidia
PMMethod=bbswitch
LibraryPath=/usr/lib/nvidia:/usr/lib32/nvidia
XorgModulePath=/usr/lib/nvidia/xorg/,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

Edit:
XCOM and Hand of Fate have 64-bit binaries, while Distance has 32-bit.
Tried running another 32-bit game (T.E.C. 3001), and it too worked.

Last edited by jaergenoth (2016-02-13 09:04:23)

Offline

#12 2016-02-13 16:40:42

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

Oh, of course, the solution is obvious. Just build bumblebee yourself and it will make the correct library. That's why the git version works for you, but the community version would work too. I know because I did it and set PrimusLibraryPath=/usr/lib/primus:/usr/lib32/primus, and everything works again.

I will try to figure out how to let the maintainer of bumblebee know it needs to be recompiled now.

Here's how to compile it yourself (can be done for any package).

As root:

pacman -S abs
mkdir /var/abs
abs community/bumblebee

As user in home directory:

mkdir abs
cp -r /var/abs/community/bumblebee abs
cd abs/bumblebee
makepkg -s
sudo pacman -U bum...(tab complete)

Offline

#13 2016-02-13 17:07:35

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

I opened this bug to hopefully get another package release put in the community repos, but I accidently forgot to enter the summary. Anyone know how I can edit the bug to enter a proper summary?

https://bugs.archlinux.org/task/48167

Offline

#14 2016-02-13 17:25:37

jaergenoth
Member
Registered: 2015-01-16
Posts: 85

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

Good that you got it working again, but I'm not sure building bumblebee was the thing that fixed it, as it doesn't install any libraries.

This is the git version, but the package in the repo is identical:

$ pacman -Ql bumblebee-git
bumblebee-git /etc/
bumblebee-git /etc/bash_completion.d/
bumblebee-git /etc/bash_completion.d/optirun
bumblebee-git /etc/bumblebee/
bumblebee-git /etc/bumblebee/bumblebee.conf
bumblebee-git /etc/bumblebee/xorg.conf.d/
bumblebee-git /etc/bumblebee/xorg.conf.d/10-dummy.conf
bumblebee-git /etc/bumblebee/xorg.conf.nouveau
bumblebee-git /etc/bumblebee/xorg.conf.nvidia
bumblebee-git /usr/
bumblebee-git /usr/bin/
bumblebee-git /usr/bin/bumblebee-bugreport
bumblebee-git /usr/bin/bumblebeed
bumblebee-git /usr/bin/optirun
bumblebee-git /usr/lib/
bumblebee-git /usr/lib/modprobe.d/
bumblebee-git /usr/lib/modprobe.d/bumblebee.conf
bumblebee-git /usr/lib/systemd/
bumblebee-git /usr/lib/systemd/system/
bumblebee-git /usr/lib/systemd/system/bumblebeed.service
bumblebee-git /usr/lib/udev/
bumblebee-git /usr/lib/udev/rules.d/
bumblebee-git /usr/lib/udev/rules.d/99-bumblebee-nvidia-dev.rules
bumblebee-git /usr/share/
bumblebee-git /usr/share/doc/
bumblebee-git /usr/share/doc/bumblebee/
bumblebee-git /usr/share/doc/bumblebee/README.markdown
bumblebee-git /usr/share/doc/bumblebee/RELEASE_NOTES_3_2_1
bumblebee-git /usr/share/man/
bumblebee-git /usr/share/man/man1/
bumblebee-git /usr/share/man/man1/bumblebeed.1.gz
bumblebee-git /usr/share/man/man1/optirun.1.gz

I think what caused all this was the move to glvnd (GL Vendor-Neutral Dispatch), which left a few packages messed up.
But that got sorted out and correct libraries found their way to correct places.

Last edited by jaergenoth (2016-02-13 17:37:17)

Offline

#15 2016-02-13 17:33:16

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

Well, maybe it has to be built against the existing libraries to work properly or something. I don't know, but really seems as though building it is what fixed it. I had intended to test just before and after rebuilding, but forgot to test just before. However, I tested last night and I don't see what could have changed between last night and this morning.

Offline

#16 2016-02-13 17:37:17

colinkeenan
Member
From: Kansas City, MO USA
Registered: 2013-06-13
Posts: 213
Website

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

Nevermind. I see what happened.  I did an upgrade this morning which did upgrade the relevant packages:

nvidia-utils (361.28-4 -> 361.28-5)
lib32-nvidia-utils (361.28-3 -> 361.28-4)

Offline

#17 2016-02-14 09:36:47

gim
Member
Registered: 2013-07-27
Posts: 35

Re: optirun (with primus bridge) fails with libGL.so.1 in /usr/lib/primus

I can confirm that everything is working again and I did not have to rebuild the Bumblebee package. `PrimusLibraryPath` variable has default value (when I tried to change it as OP said it didn't work for me by the way).

PrimusLibraryPath=/usr/lib/primus:/usr/lib32/primus

Offline

Board footer

Powered by FluxBB