Compiling NVIDIA drivers on openSUSE 11.2 32 bit

Hi,

yesterday I tried to compile the latest NVIDIA driver kernel module for 32 bit Linux on my brandnew openSUSE 11.2 32 bit installation. I installed kernel-source and kernel-syms, booted into run level 3 and sudo-ed the installation run.

The installer told me it couldn’t find the kernel header files.

I resorted to installing the driver from the repository, but this also installed an older kernel version.

What do I have to do to make the compiler find the kernel headers and compile the driver for the latest kernel?

Try installing linux-kernel-headers.

They are listed as installed by YaST2.

This might be a result of my installing the NVIDIA driver from the repo, as this spawned installation of a different kernel.

I had searched for the kernel headers in YaST2’s software installer when I found the driver install was missing them though and couldn’t find them there at the time.

Now what would I have to do to revert to the latest kernel (to be able to subsequently retry NVIDIA driver installation for it)?

Can someone help me here please?

Problem is that the updater offers a new kernel, but if I install it the NVIDIA drivers won’t work anymore.

Why on earth wouldn’t the compiler find the kernel headers after I had installed the kernel source anyway?

(Sorry, edit limit)

I found kernel.h to be in /usr/src/linux/include/linux - is that the usual path?

Instead of trying to hack something I suspect you do not understand (and frankly I also do not know all the details down to the actual files involved), why not just show us specifically WHAT you have installed, show us what driver you are using now, and show us EXACTLY what you tried to do and failed (ie the EXACT commands).

So, EXACTLY what is the output of:

rpm -qa '*kernel*'
rpm -qa '*driver*'
uname -a

EXACTLY what file did you try to use when you tried to “compile” the hardway ? ie Exactly what is the name of the file? Exactly where is it located (in what directory) on your PC ?

EXACTLY what repository did you add when you tried the repository method that you think messed things up ?

EXACTLY what rpms were installed at that time ? (you can use:

rpm -qa --last > myinstalled-rpms.txt

and then open up ‘myinstalled-rpms.txt’ with a text editor and figure out EXACTLY what was installed then

I am a stickler for details, and without ALL of that I would not dream of trying to help.

Maybe someone else who has MORE insight than I in terms of what can wrong in a failed nVidia proprietary driver install, could chime in here and help. Sorry if the above is not helpful.

oldcpu,

ahead of everything let me tell you that I didn’t say that the repository driven NVIDIA driver install messed anything up. I said it worked, but looked like it installed an older Linux kernel. What did not work was to compile the current NVIDIA driver module (256.35) using the kernel openSUSE 11.2 had installed on my system.

Maybe you were a bit in a hurry reading over this thread.

I don’t know what kernel version was installed from the openSUSE 11.2 installation DVD I had created using the official 11.2 32 bit iso download. What I do know is that when installing the NVIDIA driver from the repository using YaST2 a message was shown (among others) about some kernel being installed.

rpm -qa ‘kernel’:

kernel-default-devel-2.6.31.12-0.2.1.i586
kernel-source-2.6.31.12-0.2.1.noarch
kernel-syms-2.6.31.12-0.2.1.i586
kernel-debug-devel-2.6.31.12-0.2.1.i586
kernel-default-2.6.31.12-0.2.1.i586
kernel-desktop-devel-2.6.31.12-0.2.1.i586
kernel-xen-devel-2.6.31.12-0.2.1.i586
kernel-desktop-2.6.31.5-0.1.1.i586
linux-kernel-headers-2.6.31-3.4.noarch
kernel-pae-devel-2.6.31.12-0.2.1.i586

The driver that gets loaded when I am prompted for a Linux version to load by the bootloader is 2.6.31.12-0.2.

rpm -qa ‘driver’:

xorg-x11-driver-input-7.4-39.2.1.i586
xorg-x11-driver-video-7.4-87.91.1.i586
xorg-x11-driver-video-radeonhd-1.3.0_20100216_79a0ab2-0.1.1.i586
cups-drivers-1.3.9-4.1.i586

Before trying to compile the NVIDIA driver, I installed the kernel symbols and source using YaST2. At that moment I had a pristine system as created by the openSUSE 11.2 32 bit installation. No updates whatsoever had been installed. Then I rebooted and at the launch screen entered ‘3’ as boot option, which had the result of offering me a text based login and not starting the X server.

I logged in using my regular user and then as su. After that I changed to my Downloads folder and issued the command:

sh ./NVIDIA-Linux-x86-256.35.run

The script execution started, and after a very brief while a message was printed on the screen that the kernel headers could not be found.

Btw, I had followed the instructions for compiling the NVIDIA driver on openSUSE I had found on the inet.

The repository I got the driver from is http://download.nvidia.com/opensuse/11.2.

Giving you a list of rpms probably is pointless since as already pointed out the driver from the repository installed.

The real problem is that I have to reject installation of newer (and often more secure) kernels to keep my NVIDIA drivers working (not a desirable option) until I find out how to recompile the driver for new kernels.

Definitely. This thread is getting long and I struggle to understand what your problem is.

I am puzzled there. Why do you have both a version 2.6.31.12 kernel-default and a 2.6.31.5 kernel-desktop.

There may be good reasons, and there may not be, and prior to proceeding with a recommendation, I would like to understand this.

For example, on my laptop I keep both a 2.6.31.5 and a 2.6.31.12 kernel, because my wireless works with the 2.6.31.5. but not the 2.6.31.12. But the 2.6.31.12 has many security fixes, so when not using wireless, in my case, I boot to the 2.6.31.12. But since I need to boot to two different kernels, on that laptop I do NOT use the proprietary driver.

In case you did not know - the proprietary driver if built for the 2.6.31.12 (per your kernel-source and kernel-syms) may not work for the 2.6.31.5 kernel you also have installed.

If you type:

rpm -qa --last | grep kernel

it will give you a nice summary of the dates when various kernel rpms were installed.

The kernel version that is packaged with openSUSE-11.2 is the 2.6.31.5 kernel.

In order to understand what you are doing, I really wanted to see what kernel you typically boot to.

Did the “uname -a” command that I asked for not work for you ? :\

oldcpu,

I can’t quite understand why you cannot understand me, given I have printed the problem in bold at the end of my reply to you.

I also don’t know why there’s two kernels on my system; I guess the second was installed when the last NVIDIA driver suitable for openSUSE 11.2 (190.something) was installed from the repository, because as I already said there were messages during driver installation about a kernel being installed.

I also told you which kernel version I am using, but here’s the uname output:

2.6.31.12-0.2-default #1 SMP 2010-03-16 21:25:39 +0100 i686 athlon i386 GNU/Linux

I had removed the 2.6.31.5 kernel boot option from the boot menu because it failed to work (probably because it doesn’t work with the NVIDIA driver).

So here’s my concern again:

If I want to install kernel updates, I need to be able to recompile the NVIDIA driver for them, or I will have to do without hardware accelerated graphics.

The reason I can’t understand initially is likely due to my own very slow and thick methodical nature. I’m not as smart as 99.999% of the users on this forum, so I need to be spoon fed. Without that , I can’t help. I confess as soon as you started replying to my 1st post I immediately regretted getting involved in this thread, as I KNEW from the start the discourse would be painful.

Anyway it appears to me that

  • the kernel-desktop-2.6.31.5-0.1.1.i586 was initially installed on your PC. I can NOT confirm that because you did not provide the output of “rpm -qa --last | grep kernel”.
  • the kernel-default-2.6.31.12-0.2.1.i586 was possibly then installed (dragged in as a dependency) when you possibly installed the WRONG nVidia proprietary driver for your installed kernel. HOWEVER THE REVERSE MAY BE TRUE. Again I can NOT confirm that because you did not provide the output of “rpm -qa --last | grep kernel”.

As noted, I am not as smart as everyone else, so I can not guess what happened without your providing clearly painful information.

So like your understandable frustration, I am about to leave this thread, without ever having got to the bottom as to what happened, where that MIGHT be useful to know why things are not working.

My only suggestion is to REMOVE linux-kernel-headers on the assumption that it installed badly, and then re-install it.

Sorry I can’t help, but I’m not smart enough and I need massive information to figure things out.

oldcpu,

the initial problem was as simple as this: Compiling the latest NVIDIA driver for 32 bit Linux as outlined in the openSUSE guidelines lead to the compiler complaining about missing header files although kernel source and symbols were installed.

I subsequently wrote where I found the kernel headers to be located on my system. The only question is whether they are at the right place or not.

All you did served to confuse the matter and doesn’t play a role here, as it didn’t help to resolve the header location problem. You may consider this an offense, but actually I am just stating the facts as seen from my side.

I have to say that your first post here already gave me a feeling of subliminal resentment against me, probably due to earlier contacts you had with me, where I had expressed my frustration about my ongoing problems with openSUSE Linux (or Linux in general).

I also have to say that your comments about you being slow and dumb actually seem to be directed at me.

I tried my best not express any of this here (or in one of the other threads I have posted yesterday and today), but if you want to keep stuck in that, so be it.

Thanks for your help anyway.

I am a very detailed person when it comes to solving a problem. In the area of graphics (and also in helping with sound), I can not in all due honesty give reasonable help without enormous detail. Many users find my requests for massive detail an annoyance.

In fact, I did NOT immediately reply to your subsequent posts until you specifically asked:

Can someone help me here please?

At that point I VERY RELUCTANTLY posted again.

You did not provide all the information I asked … and I assume that is because you believed it not necessary and that I should instead spend my time hunting back and forth in the thread to find it. … fair enough, … thats your call.

I leave this thread now. I don’t think given our mutual interaction that I can help. I truly hope someone else can.

Good luck in your efforts.

Something has changed in where the kernel has bits I know this due to vmware modules. Now for my problem I believe it is a case of vmware looking in /usr/src/linux/include/ when it should be looking in /usr/src/linux/include/linux

info I used to solve my problem VMware - ArchWiki but tbh you would seem to have the opposite problem. I suspect building the latest and greatest graphic driver against an older kernel is really the problem, I’m guessing if you use 2.6.33 kernel your problem will go away, either that or wait for the solution to be solved via the repo.

oldcpu,

I am not looking for trouble here, but I am not going to accept the claims and implications of your statements regarding me here.

when I had asked for help you had not made any specific requests for information yet.

I did not post all info because I had overlooked one line in your request. Now you assume I just didn’t care to give you all information. Let me point this out: When you had to evaluate the possible reasons why I didn’t, you chose a negative one. Does that say anything about me? No, it says something about you. It says that you prefer negative interpretations if you encounter unclear communications, and that you didn’t first ask back to clarify (which btw is in gross contradiction to your claim about being very exacting). You made your assumption and acted on it as a matter of fact. You probably don’t like to hear that, but actually my reflecting your position in this matter is giving you a chance to improve in this area.

I did not post the installation history because I already made it clear which kernel I was using.

As far as “hunting back and forth in this thread goes”: This thread to that point was a rather brief one, with short posts. You don’t want to hunt forth and back through a help request thread to find information you think you need? Fair enough. I don’t want to post everything twice. Not fair?

All your requests were completely superfluous because the only interesting question is where the Linux headers are and how to the the installer where they are. That’s the problem at hand, and nothing else.

It is hard to say in English for me, but your presumed attitude of being meticulous actually is stubborn harping on about principles in my sight, and is totally contraproductive as you failed to make sure you properly understood the problem at first. You have been making it hard for you here, not me. You have been digging into details unncessarily, maybe because you’re so used to it and so in love with your own being “super exacting”.

As far as I am concerned this discussion is over because it has been totally derailled. To me it looks like you were deeply preoccupied already when you entered this thread, and usually such a disposition reapes exactly what it expects to.

Great that it had to end this way.

This is a stupid comment which really upsets me. I am not a Linux expert, but I am professional software developer (i.e. it is my job) for over 20 years (not reckoned my computer experience from school and uni which amount to another 10 years).

What makes you believe I do not understand that a compiler needs some header files and cannot find them?

What so hard to understand about “I downloaded the NVIDIA driver installer, installed kernel source and symbols, booted into run mode 3, called the installer and it said it cannot find those headers?”

Why the heck do you need any other information, like about installed drivers and kernels? So much more after I had said that I had a pristine installation using the official 11.2 32 bit ISO? One second of thought would have made it clear that I couldn’t possibly have any proprietary NVIDIA drivers installed before. If you knew that a driver from the SUSE repo needs a certain kernel to work with, you would also have understood immediately that the second kernel version could only have been installed when the driver from the repo was installed (that’s at least the logical conclusion I am coming to, given the OS installation was pristine with no updates installed). You don’t need to know all the stuff you asked for. All you need is to know where the kernel headers should be, what could be the reason they aren’t there, and how to fix that.

You also requested information about which kernel I boot into when it had already been given to you.

Apparently it is you who doesn’t understand something here.

I understand that your help is given freely, and I don’t think I have any rights to it. But if you want to help, don’t blame me for not giving you what you need when you, “Mr. meticulous” didn’t read and/or understand what I posted.

Your entire reaction really looks more and more like you were looking for an occasion to put me down.

Thats not the case.

I hope you get this working. But based on your last 2 posts its even more clear we can not work together with our respective personalities.

Good luck to you and I DO really hope you solve this.

I cannot work with someone who claims he is exacting when he isn’t, and doesn’t see the forest because there’s too many trees in front of him.

Well, Its an interesting thread, however if someone chooses to help you with your problem, I feel you have the right to refuse that help. I’m not sure attacking them would help solve your problem. (general observation only).