-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
primus breaks on fedora with mesa-13.0.3-6 #193
Comments
The: "/usr/lib64/libGL.so.1: undefined symbol: _glapi_tls_Current" error is weird, what does: rpm -qf /usr/lib64/libGL.so.1 say ? And does: ldd -r /usr/lib64/libGL.so.1 give the same error ? On my system with libglvnd-0.2.999-7.gitdc16f8c.fc25 and mesa-libGL-13.0.3-6.fc25.x86_64 this gives: [hans@shalem master]$ rpm -qf /usr/lib64/libGL.so.1 Notice that ldd -r does not give the error you are seeing. I've a feeling you've somehow overwritten your libGL.so.1 with one from a different source. |
Hi. Here is the output from those commands. [gsgatlin@y470c ~]$ rpm -qf /usr/lib64/libGL.so.1 |
Hi,
On 02-02-17 15:47, gsgatlin wrote:
Hi. Here is the output from those commands.
***@***.*** ~]$ rpm -qf /usr/lib64/libGL.so.1
libglvnd-glx-0.2.999-7.gitdc16f8c.fc25.x86_64
***@***.*** ~]$ ldd -r /usr/lib64/libGL.so.1
linux-vdso.so.1 (0x00007fff04dbb000)
libGLX.so.0 => /lib64/libGLX.so.0 (0x00007f481ce61000)
libX11.so.6 => /lib64/libX11.so.6 (0x00007f481cb22000)
libXext.so.6 => /lib64/libXext.so.6 (0x00007f481c910000)
libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00007f481c65a000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f481c456000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f481c236000)
libc.so.6 => /lib64/libc.so.6 (0x00007f481be70000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f481bc48000)
/lib64/ld-linux-x86-64.so.2 (0x000055b3fb143000)
libXau.so.6 => /lib64/libXau.so.6 (0x00007f481ba44000)
Hmm, so you're not getting the error here, that is weird...
I wonder what primus is doing causing this, I bet it is
playing LD_LIBRARY_PATH tricks ...
Regards,
Hans
|
Hello. Here is what the "primusrun" script looks like. https://paste.fedoraproject.org/543062/14860483/ There is some manipulation of LD_LIBRARY_PATH |
Hi,
On 02-02-17 16:15, gsgatlin wrote:
Hello. Here is what the "primusrun" script looks like.
https://paste.fedoraproject.org/543062/14860483/
There is some manipulation of LD_LIBRARY_PATH
Can you try commenting out the line setting the
LD_LIBRARY_PATH, that should no longer be necessary on
a glvnd enabled system.
Regards,
Hans
|
Hi,
On 02-02-17 16:15, gsgatlin wrote:
Hello. Here is what the "primusrun" script looks like.
https://paste.fedoraproject.org/543062/14860483/
There is some manipulation of LD_LIBRARY_PATH
Or maybe uncomment the line about mesa-drivers:
# Mesa drivers need a few symbols to be visible
# export PRIMUS_LOAD_GLOBAL=${PRIMUS_LOAD_GLOBAL:-'libglapi.so.0'}
So try uncommenting the second line.
Can someone give me (or point me to) a quick overview of how
primus is supposed to work and what all the library paths
being added to LD_LIBRARY_PATH contain (and what the
purpose of the libraries overriden this way is) ?
Regards,
Hans
|
Hello, could this be what you needed for overview? https://github.com/amonakov/primus/blob/master/technotes.md Will try to uncomment the lines and test once I can get back to my office. Cheers. |
Hi,
On 02-02-17 16:23, gsgatlin wrote:
Hello,
could this be what you needed for overview?
https://github.com/amonakov/primus/blob/master/technotes.md
Ugh, from that doc:
* simplicity/minimalism:
* only GLX functions are overridden
So it is overriding libGLX with its own custom implementation,
yeah that is likely going to wreck havoc with libglvnd's libGL
as that needs extra data passed by libglvnd's libGLX to figure
out which libGL backend (e.g. mesa or nvidia's) to use.
So this is definitely something into which the primus developers
will need to look into. It may not be hard to fix this, but
I don't even know where to begin.
Regards,
Hans
|
If I comment the export LD_LIBRARY_PATH line it opens a window but it uses the wrong opengl. (INTEL) If I comment out PRIMUS_libGL it segfaults. But thanks a lot for taking a deep look into this. Perhaps some others will have some ideas. Cheers. |
Hi,
On 06-02-17 03:18, gsgatlin wrote:
check out
https://www.reddit.com/r/Fedora/comments/5sakeg/workaround_bumblebeenvidia_libglvnd/
Great, can someone document this at:
https://fedoraproject.org/wiki/Bumblebee
Please ?
Regards,
Hans
|
Well, I need to test it and see if the primusrun script could be altered to work using his workaround. If it works would need to see if the "optirun" program could also be changed to work somehow. That will be harder since its written in C I think. |
But I will try to update the wiki one way or the other. |
Did not seem to work for me. https://paste.fedoraproject.org/549972/48640003/ Oh well. Still open to any and all suggestions. Do not want to have to switch distros eventually. |
Alright. I did more experimentation. The trick is that __GLVND_DISALLOW_PATCHING=1 needs to be set AND the nvidia shim must be rebuilt/recompiled AFTER libglvnd has been added by mesa. This could be accomplished by running bumblebee-nvidia --force by hand as root. Or by waiting until the next kernel upgrade. So that information will need to be added to the wiki. Things that need to be done. patch primusrun in the primus rpm to include this variable. (It must be exported) try to see if this can be set within "optirun" using the setenv() syscall. I will be pretty busy today in meetings but hopefully it can be fixed later in the week. |
I must have done something wrong in my earlier testing. oh well. In any event, I have fixed bumblebee and primus rpms. all ready to go. But I also need to update the bumblebee-nvidia driver package. (Both types) because it needs a new argument to the installer to work. The new arg is: --no-install-libglvnd So I will work on that this afternoon. One I test it a bit more I will update all three today and update the wiki. @jwrdegoede do you know if they are planning to add libglvnd to rhel 6 or rhel 7 distros? Thanks. |
Ok. Pushed new primus, bumblebee, and bumblebee-nvidia rpms to my third party yum repositories. updated wiki page with: https://fedoraproject.org/wiki/Bumblebee#mesa-13.0.3-6_and_libglvnd_issues Will try to do pull requests next week in this project and the bumblebee project in case it can help other bumblebee users on some other distros. Sorry there was not time this week to deal with that. |
Hi,
On 10-02-17 17:42, gsgatlin wrote:
I must have done something wrong in my earlier testing. oh well.
In any event, I have fixed bumblebee and primus rpms. all ready to go. But I also need to update the bumblebee-nvidia driver package. (Both types) because it needs a new argument to the installer to work. The new arg is:
--no-install-libglvnd
So I will work on that this afternoon. One I test it a bit more I will update all three today and update the wiki.
@jwrdegoede <https://github.com/jwrdegoede> do you know if they are planning to add libglvnd to rhel 6 or rhel 7 distros? Thanks.
I expect libglvnd to be added to RHEL-7.4, but no promises.
Regards,
Hans
|
Hi,
On 10-02-17 23:55, gsgatlin wrote:
Ok. Pushed new primus, bumblebee, and bumblebee-nvidia rpms to my third party yum repositories.
updated wiki page with:
https://fedoraproject.org/wiki/Bumblebee#mesa-13.0.3-6_and_libglvnd_issues
Will try to do pull requests next week in this project and the bumblebee project in case it can help other bumblebee users on some other distros. Sorry there was not time this week to deal with that.
Great many thanks for taking care of this.
Regards,
Hans
|
@gsgatlin Thanks for your continued great work on Bumblebee stuff. Could you please list modifications you’ve made to your packages to make it work? ArchLinux is going to enable libglvnd too, so it would be nice to have them there too. ;) |
Hey, sorry for delay @ArchangeGabriel . had to work on training today. Hopefully can work on pull request tomorrow. (If that's appropriate) so here are some links to some patches and log files. this patch is for primus: https://paste.fedoraproject.org/557353/14870220/ this patch is for bumblebee: https://paste.fedoraproject.org/557355/14870221/ also, for my wrapper for the nvidia-installer program the following changes were needed: If I did not at least add "--no-install-libglvnd" it did not work with this error in the log: https://paste.fedoraproject.org/557358/14870221/ So I added: on machines with libglvnd rpm installed just to be extra paranoid. So if I were to do pull request once I clean up my account on github.com is there are certain branch I should use? (I seem to recall seeing that somewhere) for primusrun changes and bumblebee changes in optirun.c? Not sure how you will deal with the drivers package on arch since there is an official one for the arch distro unlike fedora which has several nvidia drivers packages including mine which is just for bumblebee. Thanks, |
Actually, the regular arch linux nvidia package may just work. I think the environmental variable is the more important piece of it. |
For Bumblebee, just do a PR against the develop branch. But please change the comment to a more generic one like this: |
@SolarAquarion opened a PR at Bumblebee-Project/Bumblebee#845 with the envvar change, but the explanation (commit message and comment) are not clear to me. Can someone have a look? |
Just a heads up for people still having issues on fedora loading the driver after the libglvnd update. I had to add a selinux policy to make it work (of course after I had ran bumblebee-nvidia --force). ausearch -c 'modprobe' --raw | audit2allow -M my-modprobe after that, it worked just fine. |
I noticed the SELinux problem on Fedora 25, too. But in addition, Steam suddenly crashes with "Fatal Error. Failed to load steamui.so" and adding LD_PRELOAD works: LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1' primusrun steam Steam works fine by itself without primusrun. |
This should be fixed in It can be dnf updated beginning now. I updated the selinux security policy so modules should load now. Thanks for the heads up about the problem. Not sure about steam but I did test "minecraft" and I get 60fps and everything seems to work ok for me. |
Thank you @gsgatlin , your work is truly appreciated! |
Running bumblebee-nvidia-375.39-2 now, but the steam problem still persist. Other applications work fine with primusrun. |
@hevanaa Do you know if the steam problem is caused by selinux changes or by libglvnd addition? Perhaps you can try "permissive" or "disabled" in /etc/selinux/config after a reboot to see if it affects steam? |
Same behavior with SELinux turned off. Steam can't find libraries when started with primusrun. And works fine when started with just "steam". I tried this: ... (here the Fatal error dialog appears) I can't see anything wrong with libstdc++ on this system. Sounds like an ABI problem to me. |
@hevanaa Can you run steam normally but add primusrun to the launch options of some of your higher end games via: https://support.steampowered.com/kb_article.php?ref=6316-GJKC-7437 Or does that fail also? |
@gsgatlin Yes, this works fine. |
Hello.
Nvidia has created a new library called libglvnd https://github.com/NVIDIA/libglvnd
The purpose is "This is a work-in-progress implementation of the vendor-neutral dispatch layer for arbitrating OpenGL API calls between multiple vendors on a per-screen basis, as described by Andy Ritger's OpenGL ABI proposal"
Fedora is adding this to all fedora 25 machines in a few days. Mesa has been redone to support this new library.
It looks like they have implemented it in 4 patches to "mesa." I can post the patches if its important?
With these changes "VirtualGL" bridge continues to work but "primus" bridge no longer works.
Here is the output from command line:
https://paste.fedoraproject.org/541783/14858971/
(primusrun also does not work)
Does anyone have any clues on how to get around that? I have opened:
https://bugzilla.redhat.com/show_bug.cgi?id=1418103
Here are some logs: (Can't really see anything in them)
/var/log/messages
first run working with 13.0.3-5
https://paste.fedoraproject.org/541695/58843511/
second run failing with 13.0.3-6
https://paste.fedoraproject.org/541707/14858848/
/var/log/Xorg.8.log
first run working with 13.0.3-5
https://paste.fedoraproject.org/541709/88496314/
second run failing with 13.0.3-6
https://paste.fedoraproject.org/541712/85885065/
I'm sorry I don't have any ideas on how to fix this. I did notice
/usr/lib64/libGL.so.1: undefined symbol: _glapi_tls_Current
in the output on the commanbd line.
Please let me know if I can provide any further information or be of any help with this issue. Thanks.
The text was updated successfully, but these errors were encountered: