LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Badly installed nvidia-driver (Problem with symlinks) (https://www.linuxquestions.org/questions/slackware-14/badly-installed-nvidia-driver-problem-with-symlinks-4175601682/)

ramlinx 03-13-2017 03:10 PM

Badly installed nvidia-driver (Problem with symlinks)
 
Hello,
I'm new to Slackware Linux. I installed Slackware64 14.2 yesterday on my PC. I usually don't write on forums, so I hope it's the correct place to post this question.
I have an nvidia graphics card and so I installed the proprietary drivers from Slackbuilds.org (nvidia-driver and nvidia-kernel). But after rebooting, my desktop environment didn't start correctly. It seems like the symlinks are being resetted wrongly by ldconfig (executed on boot by /etc/rc.d/rc.M) If I then rerun the installation skript (nvidia-switch --install), I can start my desktop environment.

Code:

/sbin/ldconfig (this command is in the start script /etc/rc.d/rc.M)

lrwxrwxrwx 1 root root 19 Mär 13 18:37 /usr/lib64/libGL.so.1 -> libGL.so.1.2.0-xorg*
-rwxr-xr-x 1 root root 646 Mär 12 19:03 /usr/lib64/libGL.la*
lrwxrwxrwx 1 root root 26 Mär 13 18:37 /usr/lib64/libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.1.0-xorg*
lrwxrwxrwx 1 root root 23 Mär 13 18:37 /usr/lib64/libGLESv2.so.2 -> libGLESv2.so.2.0.0-xorg*
lrwxrwxrwx 1 root root 20 Mär 13 18:37 /usr/lib64/libEGL.so.1 -> libEGL.so.1.0.0-xorg*
-rwxr-xr-x 1 root root 187376 Apr 15  2016 /usr/lib64/xorg/modules/libwfb.so*
lrwxrwxrwx 1 root root 16 Mär 13 18:30 /usr/lib64/xorg/modules/extensions/libglx.so -> libglx.so.375.39*

nvidia-switch --remove (from the slackbuild.org nvidia-driver package)
nvidia-switch --install

lrwxrwxrwx 1 root root 14 Mär 13 18:46 /usr/lib64/libGL.so.1 -> libGL.so.1.0.0*
-rwxr-xr-x 1 root root 646 Mär 12 19:03 /usr/lib64/libGL.la*
lrwxrwxrwx 1 root root 24 Mär 13 18:46 /usr/lib64/libGLESv1_CM.so.1 -> libGLESv1_CM.so.1-nvidia*
lrwxrwxrwx 1 root root 21 Mär 13 18:46 /usr/lib64/libGLESv2.so.2 -> libGLESv2.so.2-nvidia*
lrwxrwxrwx 1 root root 18 Mär 13 18:46 /usr/lib64/libEGL.so.1 -> libEGL.so.1-nvidia*
-rwxr-xr-x 1 root root 187376 Apr 15  2016 /usr/lib64/xorg/modules/libwfb.so*
/usr/lib64/xorg/modules/extensions/libglx.so -> libglx.so.375.39*

Did I missed something installing the driver? How can i prevent ldconfig from changing the symlins?
Thanks for helping

RadicalDreamer 03-14-2017 02:10 AM

The libraries may get mixed up between open source and blob if you make a mistake with removing nvidia in that setup from my experience. I prefer to use the long lived branch nvidia .run installer file if it works. http://www.nvidia.com/object/unix.html
Save the .run file because some updates will require a reinstall.

ramlinx 03-14-2017 10:44 AM

Yes, with the nvidia .run installer it worked perfectly. Thanks

TracyTiger 03-14-2017 12:51 PM

Welcome to the forum.

You should use "Thread Tools" at the top of the original post to mark this thread as SOLVED.

kingbeowulf 04-01-2017 06:14 PM

Just noticed this thread. This was reported on the SBo mailing list and to me directly, as maintainer, and I will be posting a fix this weekend. This ldconfig issue took me by surprise due to Nvidia's naming scheme for the GLVND versions of the drivers.

Spike8605 04-05-2017 04:04 PM

same problem here
 
Hi to all, I have the same problem with nvidia drivers libs conflicting with mesa ones...
I'd like to ask if it is safe to just removepkg mesa (& mesa-compat-32)

I've lost a bit of time to figure out what the problem was exactly, since I usually use the web as last resort.
Initially I though that nvidia-switch was just taking fool of me every boot, then I've noticed it was indeed ldconfig's fault.

so, what will happen if I remove mesa?

do nvidia drivers or openGL in general rely on something that is NOT whitin nvidia packages?

will this prevent ldconfig from bothering my nvidia libraries?

thanks in advance if someone has the answer

Richard Cranium 04-05-2017 08:48 PM

I would not do that.

The README to the nvidia slackbuilds states that you should run "nvidia-switch --remove" prior to installing the package. You can be a lazy scut (which I fully admit that I have been) and not do it; that works most of the time. When it doesn't work, it's pretty painful to fix the resulting issues (as I have found out more than once, which tells you how lazy of a scut I am).

Spike8605 04-06-2017 02:17 AM

Quote:

Originally Posted by Richard Cranium (Post 5693185)
I would not do that.

The README to the nvidia slackbuilds states that you should run "nvidia-switch --remove" prior to installing the package. You can be a lazy scut (which I fully admit that I have been) and not do it; that works most of the time. When it doesn't work, it's pretty painful to fix the resulting issues (as I have found out more than once, which tells you how lazy of a scut I am).


Hi,

how it's possible to do nvidia-switch --remove before actually installing nvidia-driver? probably i'm not understanding something

I think you're right, maybe removing mesa would be too extreme.... mv *.-xorg somewhere else will maybe work?
will ldconfig complain upon boot?

last questions, is there a way to tell ldconfig HOW to handle that bounch of library? like blacklisting them or something along those lines?

ponce 04-06-2017 02:23 AM

hi Spike8605, welcome to LQ.

this has already been fixed by kingbeowulf a few days ago and will go in at the next public update

https://slackbuilds.org/cgit/slackbu...804a941628dc51

Spike8605 04-06-2017 03:29 AM

Quote:

Originally Posted by ponce (Post 5693265)
hi Spike8605, welcome to LQ.

this has already been fixed by kingbeowulf a few days ago and will go in at the next public update

https://slackbuilds.org/cgit/slackbu...804a941628dc51

Thanks!

as far as I can understand, according to this patch, nvidia-switch will move files not to *-xorg but to xorg-* so that alphabetically they came after *-nvidia and therefore ldconf will keep the link as per-install right?

so I can safetly move those xorg files somewhere else until the update is committed to the slackbuild site?

also, do you know when the patch will be avaible in slackbuild 14.2 site?

thanks again

ponce 04-06-2017 03:41 AM

Quote:

Originally Posted by Spike8605 (Post 5693285)
as far as I can understand, according to this patch, nvidia-switch will move files not to *-xorg but to xorg-* so that alphabetically they came after *-nvidia and therefore ldconf will keep the link as per-install right?

so I can safetly move those xorg files somewhere else until the update is committed to the slackbuild site?

you can just apply the patch linked and build/install the new nvidia-driver package (you might want to execute "nvidia-switch --remove", "removepkg nvidia-driver" and reinstall mesa first).

Quote:

also, do you know when the patch will be avaible in slackbuild 14.2 site?
usually the git branches are merged by Willy or Dave (willysr and 55020 here) in the weekend.

Spike8605 04-06-2017 04:08 AM

Quote:

Originally Posted by ponce (Post 5693287)
you can just apply the patch linked and build/install the new nvidia-driver package (you might want to execute "nvidia-switch --remove", "removepkg nvidia-driver" and reinstall mesa first).


usually the git branches are merged by Willy or Dave (willysr and 55020 here) in the weekend.

Thanks again for the quick answers I'll look forward for the merge then!

in the meanwhile, since I like to break and then fix things, I'll move the files manually before boot and see what will break (if anything at all) :D

Kind Regards

kingbeowulf 04-08-2017 06:45 PM

As a reminder, the nvidia-driver libs only conflict with a few Mesa and Xorg libs. Also, mesa contains a number of libs and files utilized by ANY GPU driver you may install, so you can't just remove it. Given how the driver packages from Nvidia are organized, it is tedious to not only keep track of the libs but also which ones conflict with Xorg and Mesa.

In a worse case scenario, if you forget to 'nvidia-switch --remove' before 'removepkg nvidia-driver', just remove any dangling 'xorg' labelled files. Then you simply need to reinstall the original mesa, mesa-compat32 (if installed) and xorg-server packages from the your Slackware tree.

This also applies to the Nvidia provided binary installer: they just move the lib conflicts to /var/lib/nvidia.

I've added an option to nvidia-switch to assist in this process. To remove SBo nvidia-driver and fully restore the original packages. Simply put a copy of:
Quote:

mesa-11.2.2-$ARCH-1.txz
mesa-compat32-11.2.2-$ARCH-1compat32.txz
xorg-server-1.18.3-$ARCH-2.txz
into /root/Slackware and then:
Code:

nvidia-switch --remove
nvidia-switch --restore
removepkg nvidia-driver
removepkg nvidia-kernel

Normally, if there are no errors in my original SBo script ;-) just 'nvidia-switch --remove' before removepkg is all that is needed - besides a perusal of the README of course.

Simple. Piece of cake.

spike86 04-11-2017 05:05 PM

Hello again and sorry for the delay, I was enjoying Slack so much that I forgot about this thread :D

Quote:

Originally Posted by kingbeowulf (Post 5694516)
[...]Then you simply need to reinstall the original mesa, mesa-compat32 (if installed) and xorg-server packages from the your Slackware tree.

ahah already found out (the hard way, as usual :D ) and thrown in nouveau too, just to be on the safe side!


Quote:

Normally, if there are no errors in my original SBo script ;-) just 'nvidia-switch --remove' before removepkg is all that is needed - besides a perusal of the README of course.

Simple. Piece of cake.
I know, after moving out of the way the *-xorg files (without removing them) everything worked as expected

I already like a lot the way the Slackbuilds system (and Slack in general) work!

Thanks again for the hints and the slackbuild fix, I will update the drivers as soon as I will feel the need (if ain't broke... ;) )

*now let's go back to remove that cursed pulseaudio thingie..... :D

Bye!


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