LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Tags used in this thread
Popular LQ Tags , , ,

Reply
 
Thread Tools
Old 10-03-2009, 07:21 PM   #1
maxkukartsev
LQ Newbie
 
Registered: Apr 2009
Distribution: Fedora, Ubuntu, Debian
Posts: 16
Thanked: 1
Question Kernel compilation ignores necessary module


[Log in to get rid of this advertisement]
Hi everyone,

I am using Debian Lenny (2.6.26-19).

I compiled a new kernel with nVidia driver support using the downloaded script NVIDIA-Linux-x86-185.18.36-pkg1.run. Booting up that kernel launched the nVidia driver successfully.

Then I installed the Intel wireless driver by following the instructions in http://wiki.debian.org/iwlagn, which compiled a new kernel for me.

Now I have 2 entries in my GRUB boot menu,
1) Debian GNU/Linux, kernel 2.6.30-bpo.1-686 ## after wireless driver
2) Debian GNU/Linux, kernel 2.6.26-2-686 ## after nVidia driver

If I boot (1), I get wireless support but the nVidia driver does not get loaded. So I need to have a generic xorg.conf (without nVidia module) for this to work.

If I boot (2), I get nVidia, but no wireless.

How can I have both modules loaded?

Thanks,
Max Kukartsev

Last edited by maxkukartsev; 10-04-2009 at 02:36 AM..
linuxdebian maxkukartsev is offline  
Tag This Post , , ,
Reply With Quote
Old 10-04-2009, 02:31 AM   #2
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA
Distribution: Debian Squeeze, SuSE 11.0, F8, F10, F11 x86_64
Posts: 1,129
Thanked: 16
Install the Intel wireless module first. Then, into the same kernel, install the Nvidia module. I can't remember exactly where it is, but there is a fairly recent guide to installing Nvidia modules in Debian, on the Debian site: debian.org
linuxdebian AwesomeMachine is offline     Reply With Quote
Old 10-04-2009, 02:54 AM   #3
maxkukartsev
LQ Newbie
 
Registered: Apr 2009
Distribution: Fedora, Ubuntu, Debian
Posts: 16
Thanked: 1

Original Poster
Question What about subsequent kernel rebuilds?

I booted up into my wireless-enabled kernel, and from there ran the NVIDIA-Linux-x86-185.18.36-pkg1.run script to add the nVidia module to the kernel as well. Now if I boot up into my (1) Debian GNU/Linux, kernel 2.6.30-bpo.1-686, I get both the nVidia and wireless modules.

HOWEVER:
When the config script for the iwlagn package rebuilt the kernel, it appeared to IGNORE the nVidia module which was loaded into the kernel at the time. I did not reboot after installing the nVidia driver (just started the GDM init script), so perhaps this is why the iwlagn script did not include the nVidia driver in its kernel recompilation?

Thanks,
Max Kukartsev
linuxdebian maxkukartsev is offline     Reply With Quote
Old 10-23-2009, 01:29 AM   #4
freet15
LQ Newbie
 
Registered: Apr 2007
Posts: 2
Thanked: 0
Quote:
Originally Posted by maxkukartsev View Post
I booted up into my wireless-enabled kernel, and from there ran the NVIDIA-Linux-x86-185.18.36-pkg1.run script to add the nVidia module to the kernel as well. Now if I boot up into my (1) Debian GNU/Linux, kernel 2.6.30-bpo.1-686, I get both the nVidia and wireless modules.

HOWEVER:
When the config script for the iwlagn package rebuilt the kernel, it appeared to IGNORE the nVidia module which was loaded into the kernel at the time. I did not reboot after installing the nVidia driver (just started the GDM init script), so perhaps this is why the iwlagn script did not include the nVidia driver in its kernel recompilation?

Thanks,
Max Kukartsev
Max, I have the same problem as you got. but I ran the NVIDIA-Linux-x86-185.18.36-pkg1.run in my kernel environment(2.6.30-bpo.1-686) still failed.

the message show as follow:

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), or NVIDIA GPU
installed in this system is not supported by this NVIDIA Linux graphics
driver release.
linuxdebian freet15 is offline     Reply With Quote
Old 10-31-2009, 05:13 PM   #5
maxkukartsev
LQ Newbie
 
Registered: Apr 2009
Distribution: Fedora, Ubuntu, Debian
Posts: 16
Thanked: 1

Original Poster
Smile Check for same compiler version

Quote:
Originally Posted by freet15 View Post
Max, I have the same problem as you got. but I ran the NVIDIA-Linux-x86-185.18.36-pkg1.run in my kernel environment(2.6.30-bpo.1-686) still failed.

the message show as follow:

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), or NVIDIA GPU
installed in this system is not supported by this NVIDIA Linux graphics
driver release.
Hi freet15,

I would assume the message is correct, and there is a mismatch in compiler version used to build the current kernel and the nVidia module.

Here's what I would do:
  1. Check the compiler used to build the current kernel:
    Code:
    cat /proc/version
    Look for gcc version x.y.z and compare that with the version of gcc in your PATH:
    Code:
    gcc -v
  2. Download that version of the compiler. Older versions of gcc appear as gcc-x.y, so to install:
    Code:
    sudo apt-get install gcc-x.y
    Binaries from such packages will also be named gcc-x.y
  3. Before running NVIDIA-Linux-x86-185.18.36-pkg1.run, set the $CC environment variable so that it'll use that particular compiler:
    Code:
    export CC=gcc-x.y
linuxdebian maxkukartsev is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
Kernel module compilation problem marcintom Programming 0 01-30-2009 04:44 AM
module compilation in kernel hovnatan Ubuntu 0 02-10-2007 05:33 AM
Kernel Module compilation and running imransadat Programming 3 03-04-2005 07:56 AM
kernel module compilation zbrox Linux - Software 1 01-28-2004 04:31 PM
Kernel compilation, what module did I missed ? Kocil Linux - Software 7 08-10-2003 07:03 AM


All times are GMT -5. The time now is 10:52 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration