LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-10-2006, 04:09 PM   #1
thanto_
Member
 
Registered: Jun 2005
Location: Irvine, CA
Distribution: Red Hat Fedora Core 4
Posts: 36

Rep: Reputation: 15
installing nvidia drivers with yum


Before I start, some posssibly relevant info...
The contents of my boot folder are as follows:
vmlinuz-2.6.16-1.2108_FC4
vmlinuz-2.6.16-1.2096_FC4
vmlinuz-2.6.11-1.1369_FC4smp <--note: only smp
vmlinuz-2.6.11-1.1369_FC4
System.map-2.6.16-1.2108_FC4
System.map-2.6.16-1.2096_FC4
System.map-2.6.11-1.1369_FC4smp
System.map-2.6.11-1.1369_FC4
memtest86+-1.55.1
initrd-2.6.16-1.2108_FC4.img
initrd-2.6.16-1.2096_FC4.img
initrd-2.6.11-1.1369_FC4smp.img
initrd-2.6.11-1.1369_FC4.img
config-2.6.16-1.2108_FC4
config-2.6.16-1.2096_FC4
config-2.6.11-1.1369_FC4smp
config-2.6.11-1.1369_FC4

checked through grub.conf, and all versions show up.

The kernel it starts with is 2.6.11-1.1369_FC4smp.

I'm running FC4 x86_64.

I read through the stickied thread regarding installing nvidia drivers and all relevant links I could find. OK, so I do yum install kernel-module-nvidia. Yum tries to install kernel-module-nvidia-2.6.13-1.1526_FC4.x86_64, which fails because I don't have the required kernel. I then updated my kernel to 2096. I tried it again... same kmod. I stopped trying for the day. The next day, I discovered 2108, so I installed that one too (yum update vmlinuz, IIRC). I then tried to install the nvidia kmod again... same version again, and it failed for the same reason as it did before. So, I did a yum search to see if I could find one that I *could* install, and lo and behold, I found the nvidia kmod matching my newest vmlinuz, and installed that one specifically (yum install kernel-module-nvidia-2.6.16-1.2108_FC4).

I then realized that I hadn't configured my xorg.conf. As a non-root user, I tried xorgconf, xorgconfig, nvidia-setup, nvidia-config, etc. None of them were commands I could use (some didn't exist, some were in sbin--I didn't know this at the time). I then went in as root and tried to configure xorg.conf manually following the instructions provided by nvidia, namely changing the driver from "vesa" to "nvidia", making sure it was loading glx (that was already there), but not dri (commented it out), and then commenting out the DRI section at the bottom of xorg.conf. This, of course, prevented X from loading. So, I used my Knoppix boot-CD, and checked on xorg.conf. Apparently, the driver name was changed from "nvidia" to "nv", and a new load "dri" line was added right below the one I commented out. WTF? I reverted the xorg.conf. I then searched for the nvidia automatic config stuff, discovering it in sbin (finally). I restarted and went in as root, then ran nvidia-config, and some of the other nvidia things. I restarted, and this time, X loaded, getting me to user login screen. I logged in as a non-root user, whereupon X crashed (same display problem as when I configured xorg.conf manually). I then went in to xorg.conf, and again, I noticed the driver was "nv", and that it was loading dri. I reverted it once again, and restarted. I then uninstalled the nvidia kmod. So, that's where I'm at now.

So, some questions:
Why is it loading the old kernel on startup (specifically, the smp version--what is smp?), and not the new one? Can I change that? Can I get smp versions of my newer kernels? Why are the old kernels still there (shouldn't they be considered obsolete by yum when doing yum update/upgrade?)?
Why was yum trying to install that particular nvidia kmod instead of the new one?
Why does it keep changing xorg.conf every time I restart such that xorg.conf becomes broken? Why didn't nvidia-config fix that?
Was there something I did wrong when installing the new kernel? Or installing the nvidia kmod? What am I missing here?
 
Old 05-10-2006, 04:39 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
As you found out, you have to specify the kernel version. Fedora dosn't actually support loading proprietary drivers into it's kernel - so yum's utility is somewhat messed up here. (This is fair enough - the nvidia licence is not compatible with the GPL. You want linux 3D accel. You should consider intel chipset.)

http://www.fedorafaq.org/fc4/#nvidia
Code:
yum install nvidia-glx kernel-module-nvidia-$(uname -r)
Then you have to restart X.

The correct changes get written to xorg.conf automatically.

When you next upgrade your kernel - do this:
Code:
yum install kernel-module-nvidia-$(rpm -q --queryformat="%{version}-%{release}\n" kernel | tail -n 1)
The fedorafaq has custom nvidia instructions here.

Quote:
So, some questions:
Why is it loading the old kernel on startup (specifically, the smp version--what is smp?), and not the new one? Can I change that?
The old kernel is loading because it is set to default. You can change this in /boot/grub/brub.conf (and probably from the grub menue.
Quote:
Can I get smp versions of my newer kernels?
SMP kernels are used for multi-processor boards. If you do not have one, then you don't need it. The first kernel was probably smp-enabled to make sure it would install on any of the supported architectures. Any kernel can be recompiled smp by setting smp=1 in the makefile or enabling it in gconfig
Quote:
] Why are the old kernels still there (shouldn't they be considered obsolete by yum when doing yum update/upgrade?)?
It is a good idea to keep at least one old kernel you know is working. Just in case you get in trouble, you can select the alternate kernel in the grub menue. In other words, you didn't need to boot from that knoppic CD
Quote:
Why was yum trying to install that particular nvidia kmod instead of the new one?
because you didn't specify the kernel version, it was probably just installing the one at the top of the list or something default-esque like that.
Quote:
Why does it keep changing xorg.conf every time I restart such that xorg.conf becomes broken? Why didn't nvidia-config fix that?
pass. Editing this to "nvidia" worked for me. It would change, of course, if you had booted into the wrong kernel...
Quote:
Was there something I did wrong when installing the new kernel? Or installing the nvidia kmod? What am I missing here?
Prossibly - I think you jumped the gun there when you initially installed.

FWIW: I have DRI enabled in mode 0666 and nv6600 goes fine.
 
Old 05-10-2006, 08:32 PM   #3
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
And if you move to FC5, be advised that livna calls them kmod- instad of kernel-module- which is a little easier to type.

And if you don't want to type all that stuff, yumex is a nice GUI front-end to yum.
 
Old 05-11-2006, 12:29 AM   #4
thanto_
Member
 
Registered: Jun 2005
Location: Irvine, CA
Distribution: Red Hat Fedora Core 4
Posts: 36

Original Poster
Rep: Reputation: 15
OK, now that I know what SMP is, I think I need it. I'm running a dual-core AMD 64. I tried changing grub.conf and also changing the kernels as it loaded, and the smp kernel is the only one that actually loaded, so I think it's a multi-processor board thingy. I ran a search for more kernels (yum search vmlinuz) that were smp, and no smp kernels showed up (including the one I have! or at least not that I know of--nothing showed up as smp). So, I just tried to install the nvidia kmod for my kernel. No dice:
# yum install nvidia-glx kernel-module-nvidia-$(uname -r)
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package nvidia-glx.x86_64 0:1.0.8178-0.lvn.3.4 set to be updated
---> Package kernel-module-nvidia-2.6.11-1.1369_FC4smp.x86_64 0:1.0.7174-0.lvn.4.4 set to be updated
--> Running transaction check
--> Processing Dependency: kernel-module-nvidia = 1.0.8178 for package: nvidia-glx
--> Processing Dependency: nvidia-glx = 0:1.0.7174 for package: kernel-module-nvidia-2.6.11-1.1369_FC4smp
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package kernel-module-nvidia-2.6.16-1.2108_FC4.x86_64 0:1.0.8178-0.lvn.4 set to be updated
--> Running transaction check
--> Processing Dependency: nvidia-glx = 0:1.0.7174 for package: kernel-module-nvidia-2.6.11-1.1369_FC4smp
--> Finished Dependency Resolution
Error: Missing Dependency: nvidia-glx = 0:1.0.7174 is needed by package kernel-module-nvidia-2.6.11-1.1369_FC4smp



Quote:
Originally Posted by Simon Bridge
Any kernel can be recompiled smp by setting smp=1 in the makefile or enabling it in gconfig
How do I recompile a kernel? What makefile? And what's this gconfig? I don't have a man or info file on it. I think I could solve a lot of problems if I was running the newest kernel with smp enabled.

Last edited by thanto_; 05-11-2006 at 12:34 AM.
 
Old 05-11-2006, 01:32 AM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
well all right - you need to install the kernel source and headers.

You unpack the kernel source tarball, and cd into the top directory like for any source install... then type "make gconfig" ... you'll get a graphical tool showing what-all is already in the kernel. Hunt through for smp, and check that box. Save and exit. Enter "make", "make modules", "make modules install", then you need to copy the vmlinuz file to /boot and reboot.

However - you can check if smp is enabled (I think) via: less /proc/cpuinfo

As it stands, without smp, you will be using only one CPU. Not actually a problem. Whenever you get a dependency error, you should try to yum install the dependency.

yum install nvidia-glx

In my case, nvidia-glx installed along with the driver. Like it's supposed to.
 
Old 05-12-2006, 04:35 PM   #6
thanto_
Member
 
Registered: Jun 2005
Location: Irvine, CA
Distribution: Red Hat Fedora Core 4
Posts: 36

Original Poster
Rep: Reputation: 15
Ok, so where do I get the kernel source and headers? I checked less /proc/cpuinfo and I don't see smp anywhere, so I assume it's not enabled. The problem, though, is that the new kernels will not load. The non-smp 2.6.11-1369 loads just fine, but the 2.6.16-2096 and -2108 won't load X properly. That is, right before it would normally get to the graphical loading screen, it's just a black screen with an X cursor. When loading 1369 and 1369smp, the same thing happens for maybe a second, but it immediately proceeds to the graphical loading screen, and the cursor changes into a sand clock.

I tried yum install nvidia-glx. That installed everything just fine (or rather, it ran without errors). However, when restarting my computer (running kernel 1369smp), I noticed that it failed to load the nvidia-glx or nvidia kmod for my kernel because there was no nvidia-glx/nvidia kmod for my kernel.
 
Old 05-13-2006, 12:24 AM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
I think if /proc/cpuinfo lists both cpus then smp is enabled. Not sure though.
The kernel source and headers are available via the official yum repos.

At this stage, I strongly suggest using a gui frontend for yum, like yumex (yum install yumex). You get to dynamically search the repos as well as casually browse them. You will learn a lot this way.

Also - read through the resources in www.mjmwired.net. i.e.
Quote:
Fedora no longer ships with the kernel-source RPM. You must install it
separately. This is NOT needed unless you wish to re-compile your
kernel.

Kernel Headers (kernel-devel)
If you need to install a driver (Nvidia, ndiswrapper, Cisco VPN, etc.) that
requires kernel sources, it may be sufficient to install just the kernel headers
package (kernel-devel RPM). This can be found on CD4, the DVD or online. If you
have updated your kernel (using yum or up2date), then use yum to install the
package ('yum install kernel-devel'). Make sure to match your current kernel
version (read below for the 'uname' command).

The default kernel source can be found through any mirror. Look in the
directory "/4/i386/os/SRPMS/". An example from Fedora:
http://download.fedora.redhat.com/pu...i386/os/SRPMS/.
If you are using an updated kernel you can also look in the update directory
on most Fedora mirror sites. For example:
http://download.fedora.redhat.com/pu...dates/4/SRPMS/.

If you wish you you can obtain the source of your current running kernel.
Use the 'uname' command.

[root@charon fc4]# uname -r
2.6.11-1.1369_FC4

Select: kernel-2.6.11-1.1369_FC4.src.rpm 03-Jun-2005 13:32 41M

Install:
[root@charon fc4]# rpm -ivh kernel-2.6.11-1.1369_FC4.src.rpm
1:kernel ########################################### [100%]

Set it up:

[root@charon fc4]# rpmbuild -bp --target=noarch /usr/src/redhat/SPECS/kernel-2.6.spec

The source files will be properly located in '/usr/src/redhat/BUILD/kernel-2.6.11/'

This is clearly explained in the FC4 Release Notes - Kernel.

General instructions to recompile a 2.6.x kernel in Fedora can be found in
my Fedora Core 4 Kernel Compile Notes.
... the kernel compile notes are quite readable and detailed. Have a look.

Last edited by Simon Bridge; 05-13-2006 at 12:26 AM.
 
Old 05-13-2006, 02:04 AM   #8
thanto_
Member
 
Registered: Jun 2005
Location: Irvine, CA
Distribution: Red Hat Fedora Core 4
Posts: 36

Original Poster
Rep: Reputation: 15
Ok, less /proc/cpuinfo lists both processors (processor 0 and processor 1), so it looks like smp is on. The non-smp version of 1369 still runs, though, last I checked, which means that that isn't it (unless I never actually tried the non-smp, which is possible--I'm forgetful)...

I installed yumex. No errors. But when I tried to run it (yumex), I got this:
Code:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Traceback (most recent call last):
  File "/usr/share/yumex/yumexmain.py", line 24, in ?
    import gtk
  File "/usr/src/build/535816-x86_64/install/usr/lib64/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 37, in ?
RuntimeError: could not open display
There's no build directory in /usr/src/, so that error is understandable. What doesn't make sense is that there's no build directory there and that yumex is looking for it. I'll get to the rest later. I'm exhausted at the moment.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing nvidia drivers from nvidia website on mepis 3.3 xbennyboy Linux - Hardware 4 04-23-2005 09:19 AM
installing nvidia drivers PeaceTank Linux - Software 3 12-18-2004 07:43 PM
Installing NVIDIA drivers Feldon Linux - Newbie 2 09-19-2004 09:11 PM
Need help installing nvidia drivers. brynjarh Linux - Newbie 1 06-05-2004 07:49 AM
installing nVidia drivers... gigs_42 Linux - Hardware 1 03-09-2003 03:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration