LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Problem compiling nvidia drivers under Mandriva 2008.0 (https://www.linuxquestions.org/questions/mandriva-30/problem-compiling-nvidia-drivers-under-mandriva-2008-0-a-626906/)

81bones 03-09-2008 10:11 PM

Problem compiling nvidia drivers under Mandriva 2008.0
 
I'm trying to compile the latest nvidia drivers on a new laptop and I'm running into some problems. The laptop is an Acer Aspire 5520-5579 with an nvidia 7000M video system (chipset is nvidia 610M/MCP67-MV). I am running the 32-bit version of Mandriva 2008.0. At the moment I can't tell if it's a Mandriva problem or an nvidia problem. When I try to run the "NVIDIA-Linux-x86-169.12.pkg1.run" everything appears to compile, but when it tries to load the kernel module during the installation process I get the following error:

Code:

ERROR: Unable to load the kernel module 'nvidia.ko'.  This happens most
frequently when this kernel module was built against the wrong or improperly
configured kernel sources, with a version of gcc that differs from the one
used to build the target kernel, or if a driver such as rivafb/nvidiafb is
present and prevents the NVIDIA kernel module from obtaining ownership
of the NVIDIA graphics device(s).

As far as I can tell, I have the correct kernel sources installed and they are configured properly:

Code:

localhost ~ $ uname -r
2.6.22.18-laptop-1mdv

localhost ~ $ rpm -qa|grep kernel
kernel-source-2.6.22.18-1mdv-1-1mdv2008.0
kernel-laptop-latest-2.6.22.18-1mdv2008.0
kernel-laptop-2.6.22.18-1mdv-1-1mdv2008.0
kernel-laptop-2.6.22.9-1mdv-1-1mdv2008.0
kernel-source-latest-2.6.22.18-1mdv2008.0

And the version of gcc that's being used appears to be the same as the one that was used to compile the kernel:

Code:

localhost ~ $ cat /proc/version
Linux version 2.6.22.18-laptop-1mdv (qateam@mercury.mandriva.com)
(gcc version 4.2.2 20071128 (prerelease) (4.2.2-3.1mdv2008.0))
#1 SMP Mon Feb 11 15:20:57 EST 2008

localhost ~ $ gcc -v
Using built-in specs.
Target: i586-mandriva-linux-gnu
Configured with: ../configure --prefix=/usr
--libexecdir=/usr/lib --with-slibdir=/lib
--mandir=/usr/share/man --infodir=/usr/share/info
--enable-checking=release
--enable-languages=c,c++,ada,fortran,objc,obj-c++,java
--host=i586-mandriva-linux-gnu --with-cpu=generic
--with-system-zlib --enable-threads=posix
--enable-shared --enable-long-long
--enable-__cxa_atexit --disable-libunwind-exceptions
--enable-clocale=gnu --enable-java-awt=gtk
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
--enable-gtk-cairo --disable-libjava-multilib
--enable-ssp --disable-libssp
Thread model: posix
gcc version 4.2.2 20071128 (prerelease) (4.2.2-3.1mdv2008.0)

I don't think that either rivafb or nvidiafb are running, but just to be sure I tried doing "modprobe -r rivafb" and "modprobe -r nvidiafb" before running the installer and it still fails. Ironically, I was able to get everything to compile when I was running 64-bit Mandriva 2008.0 and it worked great, but I switched back to the 32-bit version because I wanted compatibility with other software.

Mandriva does offer an rpm package called "x11-driver-video-nvidia-current-169.12-1mdv2008.0.i586.rpm" that is obviously supposed to provide the precompiled drivers, but that package doesn't seem to work for me either. It installs ok, but it doesn't provide all the files it says it comes with; namely the kernel module and libraries. The setup programs like nvidia-settings are also missing.

The only thing I did notice (and I don't know if this is really a problem or not) is the following "error" (or maybe it's a warning) that appears near the end of nvidia-installer.log:

Code:

nvidia: version magic '2.6.22.18-1mdvcustom mod_unload 686 ' should be '2.6.22.18-laptop-1mdv SMP mod_unload 686 '
nvidiafb: cannot request PCI regions

Does anyone have any ideas about what's causing my problems? I really need to get this nvidia driver working; without it I have to use the generic vesa driver (the nv driver doesn't work with this particular hardware configuration). There's always a chance that it's a dumb problem on my part since I'm still kind of new to some of this stuff. Thanks.

SkittleLinux18 03-10-2008 02:16 AM

You should just be able to install the drivers via package manager. Mandriva's is a little different, but it works. Open up "Install/Remove Programs" from your kde start menu and do a search for video card drivers.

If it's your first time opening that program, you'll have to add some media. Just follow the options and click yes until you come to a screen with a list of mirror sites. Selecte the one(s) you want and you should be good to go.

Good Luck!

Ixthusdan 03-10-2008 05:55 AM

This error is typical when you have installed the wrong kernel sources. Make sure that the sources match the running kernel. I would suggest using Easy-Urpmi at http://easyurpmi.zarb.org to set up your software media and then in a console simply type "urpmi nvidia". Urpmi will select and install the correct sources along with the driver.

jkerr82508 03-10-2008 06:01 AM

I believe that on Mandriva, you should use kernel-laptop-devel for compiling third party drivers, not the full kernel sources (which are intended to be used only when re-compiling the kernel). Install the kernel-laptop-devel-latest package to ensure that the kernel-laptop-devel package is always updated automatically whenever you update the kernel.

Jim

SkittleLinux18 03-10-2008 12:05 PM

And be careful, because Mandriva 2008 is notorious for breaking when kernels are upgraded and other updates and drivers are added. You will probably be fine, I just wanted to give you the heads up.

Ixthusdan 03-10-2008 06:26 PM

I am not sure that Mandriva is known to "break" with kernel upgrades any more than any other distro. Naturally, an nvidia driver must be compiled for a new kernel; dkms handles this quite nicely. It causes the first boot to last a little longer, but all is well afterwards. I would always recommend doing a kernel upgrade separately from other upgrades.

81bones 03-10-2008 06:50 PM

Thanks for all the replies. Turns out that I didn't have the right source packages installed as jkerr82508 suggested. After installing "kernel-laptop-devel-latest" the drivers compiled fine and everything works great. I'm still not sure why the Mandriva rpm of the drivers didn't work though. I have urpmi configured correctly (use it all the time) and the package did install -- it places documentation in the /usr/share/doc/x11-driver-video-nvidia directory and leaves some other files in the apporpriate places, but the main files (like the binaries and the modules) are no where to be found. Weird.

Anyway, there's just one other quick thing (now that the drivers work). There are still several devices listed in my hardware control center with names like "unknown device 0547" or "unknown device 0563." Most of them seem to be properly categorized under a type of hardware (devices 0547, 0548, 0541, 0561, and 0563 are all under Bridges and System Controllers, and device 054c is under Ethernet Card, for example). But there's at least one that is completely unknown; it's only listed as "unknown device 0543." They all seem to be related to the nvidia chipset. Is there any way to configure these devices so they are properly recognized? Particularly device 0543. Thanks again!

Ixthusdan 03-11-2008 05:46 AM

Install the linux nforce drivers. On my systems, "urpmi nvidia" always installs both chip set and video card drivers.

81bones 03-11-2008 07:23 AM

I'm pretty sure the nforce drivers are already installed. The SATA controller is using the ahci module, my IDE controller is using the amd74xx module, my audio system is using the snd_hda_intel module, and my ethernet controller is using the forcedeth module, and those are all nvidia nforce modules. It's just that for some reason a lot of the devices are listed as unknown. Perhaps this chipset is a little too new to be fully recognized? I also checked for any nvidia packages related to the nforce drivers using urpmi and rpmfind.net, but all I could find were the packages for the video drivers.


All times are GMT -5. The time now is 02:32 AM.