Am Sat, 6 May 2017 12:55:24 +0200
schrieb tu...@posteo.de:

> On 05/06 12:28, Kai Krakow wrote:
> > Am Sat, 6 May 2017 04:18:57 +0200
> > schrieb tu...@posteo.de:
> >   
> > > On 05/05 09:17, Kai Krakow wrote:  
>  [...]  
>  [...]  
> > >  [...]  
> > >  [...]    
>  [...]  
> > >  [...]    
>  [...]  
> > >  [...]    
>  [...]  
> > >  [...]  
> > >  [...]  
> > >  [...]  
> > >  [...]    
>  [...]  
>  [...]  
> > > 
> > > Hi Kai,
> > > 
> > > 
> > > here the results:
> > > LD_PRELOAD=/usr/lib64/opengl/nvidia/lib/. FreeCAD       
> > > ERROR: ld.so: object '/usr/lib64/opengl/nvidia/lib/.' from
> > > LD_PRELOAD cannot be preloaded (cannot read file data): ignored.
> > > FreeCAD 0.16, Libs: 0.16RUnknown © Juergen Riegel, Werner Mayer,
> > > Yorik van Havre 2001-2015 #####                 ####  ###   ####  
> > >   #                    #      # #   #   # 
> > >   #     ##  #### ####  #     #   #  #   # 
> > >   ####  # # #  # #  #  #     #####  #   # 
> > >   #     #   #### ####  #    #     # #   # 
> > >   #     #   #    #     #    #     # #   #  ##  ##  ##
> > >   #     #   #### ####   ### #     # ####   ##  ##  ##
> > > 
> > > libGL error: No matching fbConfigs or visuals found
> > > libGL error: failed to load driver: swrast
> > > using visual class 4, id 2b
> > > [1]    17990 segmentation fault
> > > LD_PRELOAD=/usr/lib64/opengl/nvidia/lib/. FreeCAD  
> > 
> > This makes no sense... You have to give an .so file.
> >   
> >  >LD_PRELOAD=/usr/lib64/opengl/nvidia/lib/libGL.so FreeCAD  
> > > FreeCAD 0.16, Libs: 0.16RUnknown
> > > © Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2015
> > >   #####                 ####  ###   ####  
> > >   #                    #      # #   #   # 
> > >   #     ##  #### ####  #     #   #  #   # 
> > >   ####  # # #  # #  #  #     #####  #   # 
> > >   #     #   #### ####  #    #     # #   # 
> > >   #     #   #    #     #    #     # #   #  ##  ##  ##
> > >   #     #   #### ####   ### #     # ####   ##  ##  ##
> > > 
> > > using visual class 4, id 2b
> > > [1]    17552 segmentation fault
> > > LD_PRELOAD=/usr/lib64/opengl/nvidia/lib/libGL.so FreeCAD  
> > 
> > Okay, so this fixes the problem with the visual as I expected. But
> > now it's segfaulting.
> > 
> > Are you using an NVIDIA card with proprietary driver?
> > 
> > 
> > -- 
> > Regards,
> > Kai
> > 
> > Replies to list-only preferred.
> > 
> > 
> >   
> 
> Hi,
> 
> ...it runs now at least for root (called as user it crashes still).
> 
> I did the following:
> 
> 
> mv /usr/lib64/libGL.so  /usr/lib64/off.libGL.so 
> 
> for all libGL.so* in /usr/lib64/libGL.so*

You shouldn't shuffle those files around. They are controlled by the
package manager.

I think it's a bug of the software that it overwrites ld paths. With a
Gentoo standard configuration and eselect opengl switched to nvidia,
every software should find and load the nvidia opengl stuff first.

Could you show the output of

# lddtree $(which FreeCAD)

E.g., lddtree $(which kwin_x11) shows a line for me:

libGL.so.1 => /usr/lib64/opengl/nvidia/lib/libGL.so.1

which clearly says it's linking libGL.so.1 from nvidia first.

If a libGL line is missing for FreeCAD, it is dynamically loaded by the
application itself. Then it's a FreeCAD bug that should be fixed.

If it's loading from /usr/lib64/libGL* for you, then some paths and
configs are borked in your system.


> Addtionally I added 06nvidia to /etc/ld.so.config.d/. with this
> contents:
> /usr/lib64/opengl/nvidia/lib
> and did a ldconfig afterwards and reboot to release any filehandle.

I wonder why these paths are missing for you... My ld.so.conf has nvidia
paths right in the beginning (first two lines). It's actually made
from /etc/env.d/000opengl. There's nothing nvidia specific in the .d
directory.


> One question remains:
> It works for root but not for any other user.
> I (as user) am in the video group.
> 
> I checked the directory/file permissions of opencascade and they
> seem to be ok.

I don't think that modern kernels and desktop managers still use the
video group. It should be handled by ACLs. Please have a look at the
ACLs of the device nodes.

It all depends on your login manager and pam configuration. You should
check that if things don't work right. If you're using systemd, you are
using systemd-logind, otherwise you're probably using consolekit.

If you're not using either of those, the system would fall back to
standard unix group permissions. But I'm not sure if this works
correctly if you didn't configure the whole chain to work that way.


> I straced FreeCAD...but...I fear not to see anything suspicious
> because the output contains a lot of noise (much more as normally
> seen in such traces)...

You can use call filters to limit that to what you want to see. Also,
there's ltrace which could be interesting.


> The eselects show:
> >eselect opengl list  
> Available OpenGL implementations:
>   [1]   nvidia *
>   [2]   xorg-x11
> >eselect mesa list    
> i915 (Intel 915, 945)
> i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)
> r300 (Radeon R300-R500)
> r600 (Radeon R600-R700, Evergreen, Northern Islands)
> sw (Software renderer)
>   [1]   classic
>   [2]   gallium *
> 
> Why is nvidia not listed with the second command?

Afaik, it does not provide mesa drivers. That's probably why it cannot
find an "swrast" driver/visual then. Directly using nvidia OpenGL fixes
that, which is what you did now.

I think the bug with FreeCAD is, that it cannot properly handle
multiple opengl implementations which it tries to do itself. It should
be left to the system to correctly load the correct opengl
implementation.

I guess FreeCAD looks up visuals by loading libGL from /usr/lib, then it
loads libGL again using means provided by the system, which ends up
loading the nvidia implementation. But that does not provide swrast. I
can only guess why they did that. But I could also be totally wrong.


-- 
Regards,
Kai

Replies to list-only preferred.



Reply via email to