SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Using: nvidia-installer ncurses v6 user interface
-> Detected 8 CPUs online; setting concurrency level to 8.
-> Installing NVIDIA driver version 450.57.
-> Running distribution scripts
executing: '/usr/lib/nvidia/pre-install'...
grep: /etc/sysconfig/kernel: No such file or directory
-> done.
-> The distribution-provided pre-install script completed successfully. If this is the first time you have run the installer, this script may have helped disable Nouveau, but a reboot may be required first. Would you like to continue, or would you prefer to abort installation to reboot the system? (Answer: Continue installation)
-> Performing CC sanity check with CC="/usr/bin/cc".
-> Performing CC check.
ERROR: Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the 'kernel-source' or 'kernel-devel' RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the '--kernel-source-path' command line option.
ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
I do not understand :"ERROR: Unable to find the kernel source tree for the currently running kernel."
Guessing you downloaded the Nvidia installer instead of using Suse's guide. You don't say and that massive wall of text is hard to read. Please use code tags next time.
My advice is to use the OpenSuse guide to Installing NVIDIA drivers and forget the one from Nvidia. With the one form Nvidia, you are going to have install the kernel headers, source and some dev tools because it needs to build. a module for your kernel. Far easier to use the driver Suse provides:
Guessing you downloaded the Nvidia installer instead of using Suse's guide. You don't say and that massive wall of text is hard to read. Please use code tags next time.
My advice is to use the OpenSuse guide to Installing NVIDIA drivers and forget the one from Nvidia. With the one form Nvidia, you are going to have install the kernel headers, source and some dev tools because it needs to build. a module for your kernel. Far easier to use the driver Suse provides:
The "massive wall" was the output of two commands: lspci and the nvidia loader. Sorry if you got info overload, lol. I went to the URL you mentioned, found nothing immediately useful. I was trying to do it the way it's has been used on Slackware, I was under the impression that Suse was a Slackware derivative, my mistake. But I'm suspicious of the nouveau driver, it doesn't recognize my graphics card.
Suse is in no way Slackware other than being called "Linux". May have been 20 years ago, but not now.
I wasn't overwhelmed by info, it's common courtesy to use code tags so the code itself is inside a scrollable box; makes the post easier to read.
I would follow the advice in Suse's wiki - I have used it many times when I had OpenSuse Leap and an Nvidia card and it always worked for me.I had a GTX 1050Ti and it worked fine.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800
Rep:
Quote:
Originally Posted by rdx
I do not understand :"ERROR: Unable to find the kernel source tree for the currently running kernel."
If you're going to use the driver obtained from nVidia, be aware that the nVidia installer compiles the nvidia module against the kernel header files. If you haven't installed those yet, you'll see the error message you showed above.
If you're like me and have what nVidia considers a "legacy" card, I think you need to follow this process:
Go into YaST and into the "Software->Software Management" dialog.
Tab over to the "Search Phrase" field and enter "kernel".
Press Enter.
Then tab over to the package listing (upper right pane) and scroll down until you see the package "kernel-source".
If it doesn't show an "i" (meaning "installed"), press the space bar until you see "+" (meaning "add").
Then press "tab" repeatedly until you get to the "Accept" option. Press "Enter" and wait until the kernel source installation finishes.
Once the kernel sources have been installed, exit YaST and retry the nvidia installer command you used.
Note: Occasionally, a kernel update will require that you re-run the nvidia installation process to recompile their driver against the new kernel. You won't have to re-install the kernel sources once you have them installed---the normal OpenSUSE update process will keep them in sync with any updated kernel.
Just a small remark, assuming that "new openSuse Leap" translates to LEAP 15.2: currently I'm facing similar problems. I've had to freshly install it on one of my spare ssd since I couldn't upgrade LEAP 15.0 because of a load of unresolved dependencies (another story). But then, I couldn't add the 32-bit version of wine 5.0 (which I install from source) since it doesn't find the 32-bit opengl libraries, although I installed all the additional libraries through YaST (Mesa, libgl, libglu, etc). The only progress I have made so far is to figure out that the nvidia repository SuSE offers does not seem to have them. I have also fumbled the thing so far as to be able to call the nvidia installers, of which I have tried NVIDIA-Linux-x86-375.20.run which I had previously installed under 15.0 (did not work, don't recall what the problem was), NVIDIA-Linux-x86_64-440.64.run and NVIDIA-Linux-x86_64-450.57.run which finish without error when asked to install the 32 bit libraries. But still, wine 32 bit insists on not to finding opengl.
This whole process of ./configure and adding the missing components through YaST worked flawlessly under 15.0, but it doesn't seem to under 15.2. Out of clues now.
P.S. although I'm not sure if that is SuSE's fault, assuming that I'd consider switching to another distribution which still supports a 32 bit subsystem sufficently (and hopefully, continues to that in the future), which one would that be?
Guessing you downloaded the Nvidia installer instead of using Suse's guide. You don't say and that massive wall of text is hard to read. Please use code tags next time.
My advice is to use the OpenSuse guide to Installing NVIDIA drivers and forget the one from Nvidia. With the one form Nvidia, you are going to have install the kernel headers, source and some dev tools because it needs to build. a module for your kernel. Far easier to use the driver Suse provides:
+1 for using the repository of nvidia drivers rather than download and install(.run method).
When I upgraded from 15.0 to 15.1, I kept the repository enabled and was able to do a dist upgrade seamlessly . (I dont recommend it, but I'll do it again while upgrading to 15.2. Full story on opensuse forum, if anyone cares)
As mentioned by others before, installing the kernel sources will do the trick. While you're at it, also install dkms. Then, when the NVidia installer asks if it should build dkms modules say yes. This way you won't have to reinstall the NVidia module with every kernel update.
Far as I'm concerned that works great. Last time I checked, the pre-built NVidia kernel module is rather old, so that's why I use the most recent version from NVidia.
I am facing a similar problem to that of previous posts. I am trying to update the OS of my workstation at work with the latest Leap 15.2. This machine is already working without problems on Leap 42.3, with cuda toolkit 8.0, and with Nvidia driver 418.74, both of which were installed by the command line method (cuda cannot be installed from repositories, afaik). Now, I have installed Leap 15.2 on a new disk, making sure that the kernel sources were also installed. However when I tried to install cuda_10.0 (or 10.1) I always get the "Installation failed" message and the reason seems to be that the installer cannot find the kernel source packages. I am sure that the kernel sources are installed so I tried a few different things like the nomodeset kernel parameter as start option, deinstalling the Nouveau drivers and even blacklisting them, and resinstalling the whole Leap 15.2 from scratch, but without any improvement.
I am thinking on trying the newest cuda version (11.2) to see if that makes a difference, but that is not a good option for me since I think it requires a very new version of the Nvidia driver and I would prefer not to use Nvidia drivers above 418.XX, since these are the latest versions that support Nvidia 3D vision. So I am a bit in a catched up situation in this sense.
Thanks for your answer and comments, and sorry if I did not explained myself clearly enough: I did a clean install. In fact, I did it twice. As I said on my post: "Now, I have installed Leap 15.2 on a new disk, making sure that the kernel sources were also installed." So it is nothing related to this.
After my post, I tried to install cuda 11.2 in te same way (ie. command line at boot) and it worked flawlessly: cuda and the Nvidia driver associated were installed without warnings or error messages. But as I said in my previous post, this has the problem that the driver version that is installed is 460.27, which does not support Nvidia 3D vision. As far as I know, this support was dropped by Nvidia after driver versions 418.XX and that is the reason why I was trying cuda 10.0 or 10.1, which come with driver versions 410.48 and 418.87.
The fact that cuda 11.2 and the associated driver install without problems, while 10.0 or 10.1 fail with the error "kernel sources not found" tells me that, either the installer looks for the kernel sources in the wrong place (has there been any change in the location of kernel sources in Leap 15.2?), or that there is some other problem like gcc version (7.5.0) or kernel version (5.3.18) not supported by cuda 10.X.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.