LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Nvidia driver is not working after using a self compiled kernel (2.6.38) (https://www.linuxquestions.org/questions/linux-newbie-8/nvidia-driver-is-not-working-after-using-a-self-compiled-kernel-2-6-38-a-869619/)

todingman 03-19-2011 10:53 AM

Nvidia driver is not working after using a self compiled kernel (2.6.38)
 
Hi all,

Long time reader, first time poster (just registered) here! I might say that I heard a lot of good things about this forum from podcasts, that is why I'm here :)

BACKGROUND: I've been using Linux for only 8 months and I started with Linux Mint. Everything was awesome in Mint because almost everything works. About a month ago, I decided to go deeper in my Linux knowledge. I've been reading a lot and found out that Arch linux would be my learning distro. As I was installing Arch, it was a pain at first but I really learned a lot which I would never ever learn with Mint. Now I decided to take a step further is which "compiling your own kernel". Moreover, I still consider myself a total noob and I beg for your patience and understanding.

*I already tried reading the Arch Wiki/other forums/irc chat - and unfortunately I failed to understand the terms (technical terms mostly). One of the factors would be my English comprehension. English is not my Native Language that made matters worse.

MY PROBLEM:

Everything was smooth in my Arch for a 2 weeks until I decided to compile my own kernel. I currently have a Nvidia GTX 460 1GB card.

BTW, the method I used to install nvidia with 2.6.37 was

Code:

pacman -S nvidia nvidia-utils
and that worked with all of the .37 kernels (-1 -2 -3 -4) which was download from kernel.org.

When I compiled the .38 (using the same .config of .37), it just boots up to the terminal (not loading gdm). However, I could still login by typing my username and password. So I've checked dmesg of both .37 and .38 and noticed that the Nvidia driver is not loaded in .38.

I tried reinstall it by running pacman and it doesn't do anything. It was thinking of uninstalling nvidia and nvidia-utils but there are so many dependencies conflicts (like screensaver, compiz, etc).

Since, I didn't want to mess up my .37 install, I just grabbed an old HDD and installed from scratch again. This time, I compiled the .38 kernel first (without gui) and then installed nvidia nvidia-utils. It was the same problem.

With this observation, I'm concluding that the nvidia and nvidia-utils from pacman is not compatible with .38.

I've read that I have to wait for nvidia to release a driver that will be compatible with the .38 kernel. Is that true? Does it mean I have to wait for nvidia/nvidia-utils to be updated from pacman? How would I know when it is updated?

I've also read about nouveau, but I guess that is not for me because it doesn't support 3D.

Is there a work around for me to use nvidia/nvidia-utils with .38?

Is nvidia and nvidia-utils proprietary drivers? What is the difference with these two and the one you download directly from nvidia?

First of all, I apologize for the bombardment of questions. As you can tell, I'm so clueless on how nvidia drivers work on linux in general (since it was spoon fed by mint) and I really would love to learn about this is a deeper level. Could someone please explain to me (LAYMANS terms) how nvidia works (and possibly a solution to my issue). I would never get offended if you explain it to me like a 10-year old boy :)

Thank you so much!

(Again, sorry for my poor English skills).

EDIT: Additional info - I have a netbook that also runs arch. It uses an Intel GMA integrated video chip which I used "xf86-video-intel" from pacman and I believe since it is open source, it works with .38 fine. So does that mean if you use an open source driver, it will work with all other kernels?

TB0ne 03-19-2011 11:23 AM

You are FAR from clueless, and your English is very good. I wish more questions were as well written out as yours. :)

I have just gone through something similar, with a fresh install of openSUSE 11.4, and have the latest drivers directly fro nVidia working fine. To save you some reading in their docs (and please bear in mind, this worked on openSUSE. Not sure about Arch). First, download the latest drivers from nVidia, and make a backup copy of /etc/X11/xorg.conf.* into your home directory somewhere, just to be safe. Then:
  • Create a file in /etc/modprobe.d/nvidia.conf. Let the contents be
    Code:

    blacklist nouveau
  • Reboot, and come up into runlevel 3. Either just put a 3 into your Grub menu, or boot up, then type in "sudo init 3". At this point you'll be at a command-line, with no X running
  • Run a "chmod 755" on the nVidia driver file you downloaded (probably a .run file). Then execute it.
  • It'll prompt you for several things, and it should run through, and compile a driver for your kernel, and modify the xorg.conf file to use it.
At that point you should be able to reboot, and it'll work. I've always had good luck with the nVidia drivers from their site.

bigrigdriver 03-19-2011 11:25 AM

Key points about the nvidia package are:
a) the package is the correct one for your hardware.
b) the package is compiled for your kernel.

Since the package worked for before changing your kernel, you know that it is the correct package for your hardware. Now that you have changed the kernel, you need to rebuild the package for your kernel. The Arch wiki contains step-by-step instructions which you can find here: https://wiki.archlinux.org/index.php..._custom_kernel

Scroll down the page to this
Quote:

It is required to edit the files nvidia.install and PKGBUILD file so that they contain the right kernel version variables.

While running the custom kernel, get the appropiate kernel and local version names:
then start from that point to rebuild your nvidia package the Arch way.

Following the rebuild instructions are the configuration instructions.

I hope this helps you. Good luck!

todingman 03-19-2011 11:51 PM

Quote:

Originally Posted by TB0ne (Post 4296171)
You are FAR from clueless, and your English is very good. I wish more questions were as well written out as yours. :)

I have just gone through something similar, with a fresh install of openSUSE 11.4, and have the latest drivers directly fro nVidia working fine. To save you some reading in their docs (and please bear in mind, this worked on openSUSE. Not sure about Arch). First, download the latest drivers from nVidia, and make a backup copy of /etc/X11/xorg.conf.* into your home directory somewhere, just to be safe. Then:
  • Create a file in /etc/modprobe.d/nvidia.conf. Let the contents be
    Code:

    blacklist nouveau
  • Reboot, and come up into runlevel 3. Either just put a 3 into your Grub menu, or boot up, then type in "sudo init 3". At this point you'll be at a command-line, with no X running
  • Run a "chmod 755" on the nVidia driver file you downloaded (probably a .run file). Then execute it.
  • It'll prompt you for several things, and it should run through, and compile a driver for your kernel, and modify the xorg.conf file to use it.
At that point you should be able to reboot, and it'll work. I've always had good luck with the nVidia drivers from their site.

It worked!! Not only did it solve my problem, I learned something new :)

Although when I was installing it, I was presented with an option to install NVIDIA's 32-bit compatibility OpenGL libraries and I selected YES. Then it threw me an error saying:

Code:

Unable to open 'usr/lib32/xorg/modules/extensions/libglx.so' for reading (No such file or directory)
I pressed enter then the same exact error showed again, I pressed enter one more time and it continued to install the NVIDIA driver - I rebooted and despite of those errors, I'm now on .38 using Nvidia drivers with full 3D :D

So I did a
Code:

find / -name "libglx.so"
and indeed it was not located at that location but the file is located here:

/usr/lib/xorg/modules/extensions/libglx.so

not in "/usr/lib32" - I was tempted to just copy that file from that directory to the other one and re-run the Nvidia installation. I got scared ha ha.

Anyway, as I mentioned on my original first post, I grabbed an old HDD and installed Arch from scratch (my testing ground). I actually tried to that hdd first before using my main one, for some reason it did not give me the "libglx.so error" which I find weird. I used Arch 64-bit on both installs.

So far I'm good right now, but do you think that error could give me future problems? Thanks again!


@bigrigdriver:

Thanks for the tip. I'm actually gonna try that method as I really want to learn more. Since I have an old HDD which I do test installs all the time, I'll try it as soon as I sort out this libglx.so error.

Thank you guys for being so helpful.

EDIT: I forgot to mention that my old HDD (test hdd) contains the basic Arch linux setup only. It only has xorg-server, gnome, gnome-extra, .38 kernel, nvidia, nvidia-utils. My main HDD contains a lot of stuff - all my applications, etc. Could it be the reason why I'm having that error - maybe I installed something?

todingman 03-20-2011 08:17 AM

UPDATE:

After a lot of trials and errors, I managed to solve my libglx.so error by creating a symbolic link of my "libglx.so.260.19.44" to the "/usr/lib32/xorg/modules/extensions/" folder naming it "libglx.so".

Code:

ln -s /usr/lib/xorg/modules/extensions/libglx.so.260.19.44 /usr/lib32/xorg/modules/extensions/libglx.so
I reinstalled the NVIDIA driver and there were no more errors :D

I was reading the Ubuntu forums and although we don't exactly have the same problem, I just tried it and it worked.

Everything looks good now.

Just one last quick question: Are the "nvidia" and "nvidia-utils" that you get from pacman are also "proprietary nvidia drivers"? If yes, I'm just guessing here, these are proprietary drivers that will only work for the "official" Arch kernels. Thus, making your own custom kernel will not make it work? You have to install in manually just like I did, right?

Or I'm totally getting it wrong and nvidia/nvidia-utils are open source drivers?

I'm sorry for the silly questions but I'm really trying to understand more about these stuff.

Thanks again!

bigrigdriver 03-20-2011 12:49 PM

Arch recommends checking the nvidia website to determine the correct driver series to install for your graphics card, but then install the packman packages for that driver series. That means that Arch are repackaging the nvidia driver via packman to make updating the driver easier.

todingman 03-20-2011 05:08 PM

Quote:

Originally Posted by bigrigdriver (Post 4297179)
Arch recommends checking the nvidia website to determine the correct driver series to install for your graphics card, but then install the packman packages for that driver series. That means that Arch are repackaging the nvidia driver via packman to make updating the driver easier.

Thank you so much!

I'm almost set. I just have one last problem with front panel audio ports. Front and Back audio ports (green port) both sound off at the same time. When I was using Windows before, if I plug a headset in the front audio port, it mutes the back - now both have sound.

I'm still trying to figure out how to solve this and if I can't solve it in 2 days, I'll probably start a new thread (need to be running before the weekend).

Thanks again guys. Repped! This is really a great forum!


All times are GMT -5. The time now is 04:54 PM.