LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-02-2013, 05:34 PM   #1
natharran
Member
 
Registered: Jul 2012
Location: Czech Republic
Distribution: Slackware64 14.1
Posts: 34

Rep: Reputation: Disabled
Question Primusrun (bumblebee) not working (Slackware64 14.0)


Hi guys,

I need help with making primus work, it isn't willing to cooperate.

I downloaded the bumblebee SlackBuid as instructed at docs.slackware.com and made it all work according to the guide. It ran without problems. The guide, however, doesn't mention the primus package, so I read a bit about it and decided to try it. VirtualGL, libjpeg-turbo and primus are compiled as 32-compat and I use nvidia proprietary driver. I had several issues with undetectable libraries but solved it by editing the /usr/bin/primusrun script (uncommenting specific lines and correcting some paths). So it now looks like this:
Code:
#!/bin/bash

# Readback-display synchronization method
# 0: no sync, 1: D lags behind one frame, 2: fully synced
# export PRIMUS_SYNC=${PRIMUS_SYNC:-2}

# Verbosity level
# 0: only errors, 1: warnings (default), 2: profiling
# export PRIMUS_VERBOSE=${PRIMUS_VERBOSE:-1}

# Secondary display
# export PRIMUS_DISPLAY=${PRIMUS_DISPLAY:-:8}

# "Accelerating" libGL
# $LIB will be interpreted by the dynamic linker
export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/$LIB/libGL.so.1'}

# "Displaying" libGL
export PRIMUS_libGLd=${PRIMUS_libGLd:-'/usr/$LIB/libGL.so.1'}

# Directory containing primus libGL
PRIMUS_libGL=${PRIMUS_libGL:-/usr/lib64/primus:/usr/lib/primus}

# On some distributions, e.g. on Gentoo, libnvidia-tls.so is not available
# in default search paths.  Add its path manually after the primus library
PRIMUS_libGL=${PRIMUS_libGL}:/usr/lib64:/usr/lib

# Mesa drivers need a few symbols to be visible
export PRIMUS_LOAD_GLOBAL=${PRIMUS_LOAD_GLOBAL:-'libglapi.so.0'}

# Need functions from primus libGL to take precedence
export LD_LIBRARY_PATH=${PRIMUS_libGL}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

# And go!
exec "$@"
But one error doesn't go away. When I run
Code:
primusrun <anything>
I just get this:
Code:
primus: fatal: failed to load PRIMUS_LOAD_GLOBAL
Even after uncommenting the PRIMUS_LOAD_GLOBAL line in the script. I tried to modify it in several ways:
Code:
export PRIMUS_LOAD_GLOBAL=${PRIMUS_LOAD_GLOBAL:-'/usr/lib/libglapi.so.0'}
export PRIMUS_LOAD_GLOBAL=${PRIMUS_LOAD_GLOBAL:-/usr/lib/libglapi.so.0}
export PRIMUS_LOAD_GLOBAL=${PRIMUS_LOAD_GLOBAL}:/usr/lib/libglapi.so.0
export PRIMUS_LOAD_GLOBAL=${PRIMUS_LOAD_GLOBAL:-'/usr/$LIB/libglapi.so.0'}
I even tried to appoint the libglapi manually before running the script
Code:
export PRIMUS_LOAD_GLOBAL=/usr/lib/libglapi.so.0
and
Code:
export PRIMUS_LOAD_GLOBAL=/usr/lib
leaving the original PRIMUS_LOAD_GLOBAL in the script unchanged. Nothing I write there works (and before you ask, yes, the libglapi.so.0 IS there ).

Most of the problems with primusrun I was able to google were just dealing with undetectable libraries by manually setting variables in bash (which is odd, one would say that doing this by uncommenting lines in the script is better solution than export 6 variables every time you want to run it), but I wasn't able to find any solution to this particular error (a few threads at various forums mention it, but don't provide useful advices).

Any help will be much appreciated.
 
Old 03-04-2013, 07:07 PM   #2
natharran
Member
 
Registered: Jul 2012
Location: Czech Republic
Distribution: Slackware64 14.1
Posts: 34

Original Poster
Rep: Reputation: Disabled
Well I finally found the cause.

The problem really was in libglapi library. I installed a rebuilt mesa-compat32 package with libglapi enabled from Alien Bob but it didn't occur to me that this only adds 32bit library to my system. I tried to run several 32bit apps with primusrun and the error didn't occur (there was another one, though, see below). Just then I noticed that there's no such library in /usr/lib64 so I rebuild mesa 64bit with
Code:
--enable-shared-glapi
passed to configure script as Alien Bob instructed at his blog and "hurray", it dies at a different point.

Code:
primusrun glxspheres

Polygons in scene: 62464
Xlib:  extension "GLX" missing on display ":0".
ERROR (593): Could not obtain RGB visual with requested properties
The web is full of reports of this issue with some adapters but so far I wasn't able to find a solution. Will post it here if I actually make it work some day.

-natharran
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microphone not working on Slackware64 14 shaylocomotive Slackware 4 11-20-2012 05:41 PM
LXer: Get HDMI Working With Nvidia Optimus On Ubuntu By Using Bumblebee And Synergy LXer Syndicated Linux News 0 08-21-2012 09:00 PM
Slackware64-Current + Bumblebee nvidia proprietary driver not found (but exists) TommyC7 Slackware 2 08-16-2012 04:21 AM
[SOLVED] slackpkg upgrade-all is not working in slackware64-current foobarz Slackware 1 08-13-2012 02:55 PM
Nvidia driver not working on my Slackware64 current bdahz Slackware 11 05-09-2011 04:37 AM


All times are GMT -5. The time now is 09:28 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration