LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-02-2006, 07:17 PM   #1
311Sam
Member
 
Registered: Nov 2003
Location: waco, tx
Distribution: slackware & kubuntu
Posts: 108

Rep: Reputation: 15
agpgart.ko: Invalid module format?


upgraded from the stock 10.2 kernel to 2.6.18. i have the agpgart and chipset as a module. modprobe gives me:

Code:
root@311:~# modprobe agpgart
FATAL: Error inserting agpgart (/lib/modules/2.6.18/kernel/drivers/char/agp/agpgart.ko): Invalid module format
i have been chasing problems all day after the upgrade. this might just be a simple fix or maybe my brain is just fried for tonight. looked all over google and got nothing.

system is a dell c610 laptop with ati m6 mobility and intel i830m chipset

.config snip:

Code:
# CONFIG_FTAPE is not set
CONFIG_AGP=m
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
CONFIG_AGP_INTEL=m
# CONFIG_AGP_NVIDIA is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_EFFICEON is not set
CONFIG_DRM=m
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
CONFIG_DRM_RADEON=m
# CONFIG_DRM_I810 is not set
# CONFIG_DRM_I830 is not set
# CONFIG_DRM_I915 is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
# CONFIG_MWAVE is not set
# CONFIG_PC8736x_GPIO is not set
# CONFIG_NSC_GPIO is not set
# CONFIG_CS5535_GPIO is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_HPET is not set
# CONFIG_HANGCHECK_TIMER is not set
i am trying to get dri working in x using the built-in radeon driver. it all worked fine in 24

what could i possibly be missing?
 
Old 10-02-2006, 07:52 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
That most times happens when the kernel is built with a different version of gcc than the modules or ccache being enabled . Not sure about ccache and slackware.
Check out dmesg | less and gcc -v. How did you build and install the kernel and modules.
also what does dmesg say when you try to load the module, may give you a hint as to what is going on.
 
Old 10-02-2006, 08:32 PM   #3
311Sam
Member
 
Registered: Nov 2003
Location: waco, tx
Distribution: slackware & kubuntu
Posts: 108

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by comprookie2000
That most times happens when the kernel is built with a different version of gcc than the modules or ccache being enabled . Not sure about ccache and slackware.
Check out dmesg | less and gcc -v. How did you build and install the kernel and modules.
also what does dmesg say when you try to load the module, may give you a hint as to what is going on.
hmm after a modprobe agpgart, syslog reports: agpgart: exports duplicate symbol agp_bridge (owned by kernel)

like i said this is (was) a stock 10.2. upgraded to 2.6.18 with: make gconfig, make bzImage, make modules, make models_install. then i copied the necessary files to /boot

seems like i have had way more problems then most people with this upgrade.


have never heard of "ccache" i will read up on it

Last edited by 311Sam; 10-02-2006 at 08:34 PM.
 
Old 10-02-2006, 09:18 PM   #4
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
I would try this;
cd /usr/src/linux
make menuconfig
change this, compile it directly into the kernel
CONFIG_AGP=y
make
make modules_install
make install
The new kernel should be vmlinuz
cd /boot
ls
is it there, you should see vmlinuz.old also, that should be one of your old kernels,
make sure to edit lilo.conf
then run lilo
may work
 
Old 10-03-2006, 09:18 AM   #5
311Sam
Member
 
Registered: Nov 2003
Location: waco, tx
Distribution: slackware & kubuntu
Posts: 108

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by comprookie2000
I would try this;
cd /usr/src/linux
make menuconfig
change this, compile it directly into the kernel
CONFIG_AGP=y
make
make modules_install
make install
The new kernel should be vmlinuz
cd /boot
ls
is it there, you should see vmlinuz.old also, that should be one of your old kernels,
make sure to edit lilo.conf
then run lilo
may work
yea i was thinking about building it into the kernel, i was like that already but then i changed it to a module. then it was built into the kernel rc.modules was still mobeprobing agpgart and i think it was screwing everything up, or atleast puting errors in the logs
 
Old 10-03-2006, 02:43 PM   #6
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
I think rc.modules is a sym link to the 2.4.xx kernel. I just delete it all. Then I think it is here. (I'm on gentoo at this time)
cd /etc/rc.d
rm rc.modules
rm (what ever the 2.4.xx kernel modules are)
touch rc.modules
chmod +x rc.modules
Then on my laptop I have in there;
nvidia
ndiswrapper
 
Old 10-03-2006, 02:45 PM   #7
311Sam
Member
 
Registered: Nov 2003
Location: waco, tx
Distribution: slackware & kubuntu
Posts: 108

Original Poster
Rep: Reputation: 15
well i recompiled with all the agp stuff in the kernel and i still cant get direct rendering to work:

Code:
(WW) RADEON(0): [agp] AGP not available
(EE) RADEON(0): [agp] AGP failed to initialize. Disabling the DRI.
(II) RADEON(0): [agp] You may want to make sure the agpgart kernel module
is loaded before the radeon kernel module.
since i was messing around with modules i went ahead and deleted the /lib/modules/2.6.18 directory before i did make modules_install. i usually do that when i am taking out and adding modules in the kernel i am fixing to compile. but now after i rebooted my sound stopped working again and all the modules are putting out the error "wrong module format" very interesting. the only thing i changed in my config besides the agp stuff was i changed


Code:
#CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y

to:

Code:
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
logs are looking wierd too:

Code:
Oct  3 14:21:11 311 kernel: snd_page_alloc: version magic '2.6.18 mod_unload PENTIUMIII REGPARM gcc-3.3' should be '2.6.18 preempt mod_unload PENTIUMIII REGPARM gcc-3.3'
Oct  3 14:21:11 311 kernel: soundcore: version magic '2.6.18 mod_unload PENTIUMIII REGPARM gcc-3.3' should be '2.6.18 preempt mod_unload PENTIUMIII REGPARM gcc-3.3'
Oct  3 14:21:11 311 kernel: snd: version magic '2.6.18 mod_unload PENTIUMIII REGPARM gcc-3.3' should be '2.6.18 preempt mod_unload PENTIUMIII REGPARM gcc-3.3'
Oct  3 14:21:11 311 kernel: snd_timer: version magic '2.6.18 mod_unload PENTIUMIII REGPARM gcc-3.3' should be '2.6.18 preempt mod_unload PENTIUMIII REGPARM gcc-3.3'
Oct  3 14:21:11 311 kernel: snd_pcm: version magic '2.6.18 mod_unload PENTIUMIII REGPARM gcc-3.3' should be '2.6.18 preempt mod_unload PENTIUMIII REGPARM gcc-3.3'
Oct  3 14:21:11 311 kernel: snd_ac97_bus: version magic '2.6.18 mod_unload PENTIUMIII REGPARM gcc-3.3' should be '2.6.18 preempt mod_unload PENTIUMIII REGPARM gcc-3.3'
Oct  3 14:21:11 311 kernel: snd_ac97_codec: version magic '2.6.18 mod_unload PENTIUMIII REGPARM gcc-3.3' should be '2.6.18 preempt mod_unload PENTIUMIII REGPARM gcc-3.3'
im going to ditch preemt all together and i hope it is the cause of all my problems, although i dont see how
 
Old 10-03-2006, 04:21 PM   #8
nykey
Member
 
Registered: Nov 2003
Posts: 360

Rep: Reputation: 30
I had this problem also. To solve it I booted my system into that kernel into CLI mode and I've copied my .config to /home/user ,
then "cd /usr/src/linux" (or where you have your kernel source directory) and I've ran "make clean" then "make distclean" and
finally "make mrproper". After this I copied my .config file back from /home/user to /usr/src/linux (or your kernel source directory)
and ran "make oldconfig" then "make && make_modules install"... after it finished I copied "System.map" , ".config" and "bzImage"
to /boot added an option to lilo.conf for the new kernel and ran "lilo -v", rebooted and it worked like a charm.
 
Old 10-03-2006, 04:32 PM   #9
311Sam
Member
 
Registered: Nov 2003
Location: waco, tx
Distribution: slackware & kubuntu
Posts: 108

Original Poster
Rep: Reputation: 15
ok i got it working, i disabled the preempt kernel crap and then recompiled using all the agp stuff as modules, works like a charm and now i have direct rendering working right. 2.6 also fixed my glxgears lockup problem as long as i have "Option "SWcursor" "true"" under my video card settings. it always locked up even with that option in 2.4.


today is a good day
 
  


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
Invalid Module Format Sava Linux - Kernel 16 11-16-2006 12:58 AM
Invalid module format king111 Linux - Newbie 4 07-19-2005 01:14 AM
fglrx --> Invalid module format Ezzy Linux - Hardware 1 05-10-2005 02:16 AM
'Invalid module format' loading simple module on Suse Linux Professional 9.1 rocketdude Linux - Distributions 3 07-27-2004 11:40 PM
invalid module format powadha Slackware 5 12-25-2003 04:19 PM

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

All times are GMT -5. The time now is 06:19 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