View previous topic :: View next topic |
Author |
Message |
admasnd n00b
Joined: 10 Apr 2009 Posts: 56
|
Posted: Fri May 15, 2009 8:51 am Post subject: certain modules aren't being loaded [Solved] |
|
|
What began with following the power management guide, ended up with some of my modules not loading. Upon modifying my kernel for lm_sensors and running its detection program and restarting my laptop, my sound stop working and eventually Xorg stop working too.
Everytime Xorg tries to load, I get the following error:
Code: |
(EE) NVIDIA(0): Failed to load the NVIDIA kernel module!
|
When I try
I get the following error:
Code: |
FATAL: Error inserting nvidia (/lib/modules/2.6.27-gentoo-r8/video/nvidia.ko): Invalid module format
|
Also, nothing is shown when I use lsmod. Some modules are loading up, like acpi and NetworkManager. Because of this situation, I cannot use Gnome, and must use Windows Vista to post this so giving direct outputs of code will be difficult. Any help would be greatly appreciated.
Last edited by admasnd on Sat May 16, 2009 11:54 pm; edited 1 time in total |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Fri May 15, 2009 12:01 pm Post subject: |
|
|
Hi, can you post this :
Code: |
# emerge --info
# cd /usr/src && ls -la
|
|
|
Back to top |
|
|
admasnd n00b
Joined: 10 Apr 2009 Posts: 56
|
Posted: Fri May 15, 2009 7:59 pm Post subject: |
|
|
d2_racing wrote: | Hi, can you post this :
Code: |
# emerge --info
# cd /usr/src && ls -la
|
|
I had to use a ubuntu livecd and chroot into my gentoo install, but I got the info:
Code: |
(chroot) ubuntu / # emerge --info
Portage 2.1.6.11 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27-7-generic i686)
=================================================================
System uname: Linux-2.6.27-7-generic-i686-Intel-R-_Core-TM-2_Duo_CPU_T7250_@_2.00GHz-with-glibc2.0
Timestamp of tree: Thu, 14 May 2009 21:00:01 +0000
app-shells/bash: 3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python: 2.4.4-r13, 2.5.4-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox: 1.6-r2
sys-devel/autoconf: 2.13, 2.63
sys-devel/automake: 1.4_p6, 1.5, 1.9.6-r2, 1.10.2
sys-devel/binutils: 2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 1.5.26
virtual/os-headers: 2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa apm avahi berkdb bzip2 cairo cli cracklib crypt cups dbus dri fortran gdbm gif gnome gpm gtk hal iconv ipv6 isdnlog lm_sensors midi mudflap ncurses nforce2 nls nptl nptlonly nsplugin nvidia openmp pam pcre perl pmu png pppd python readline reflection session spl ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
|
Code: |
(chroot) ubuntu / # cd /usr/src && ls -la
total 20
drwxr-xr-x 5 root root 4096 2009-04-25 00:53 .
drwxr-xr-x 14 root root 4096 2009-04-13 03:10 ..
-rw-r--r-- 1 root root 0 2008-06-11 13:44 .keep
lrwxrwxrwx 1 root root 22 2009-04-11 23:17 linux -> linux-2.6.27-gentoo-r8
drwxr-xr-x 17 root root 4096 2009-04-24 23:19 linux-2.6.27-gentoo-r10
drwxr-xr-x 23 root root 4096 2009-05-15 03:19 linux-2.6.27-gentoo-r8
drwxr-xr-x 22 root root 4096 2009-05-14 22:03 linux-2.6.28-gentoo-r5
|
Thanks for taking the time out to help me. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Fri May 15, 2009 8:30 pm Post subject: |
|
|
and what give you ?
Code: | file /lib/modules/2.6.27-gentoo-r8/video/nvidia.ko |
|
|
Back to top |
|
|
admasnd n00b
Joined: 10 Apr 2009 Posts: 56
|
Posted: Fri May 15, 2009 8:38 pm Post subject: |
|
|
krinn wrote: | and what give you ?
Code: | file /lib/modules/2.6.27-gentoo-r8/video/nvidia.ko |
|
Code: |
(chroot) ubuntu src # file /lib/modules/2.6.27-gentoo-r8/video/nvidia.ko
/lib/modules/2.6.27-gentoo-r8/video/nvidia.ko: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV)
|
|
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Fri May 15, 2009 9:18 pm Post subject: |
|
|
and you did re-emerge the nvidia drivers AFTER you've rebuild that new kernel?
as build kernel, boot the kernel, emerge nvidia-drivers again with the new kernel |
|
Back to top |
|
|
admasnd n00b
Joined: 10 Apr 2009 Posts: 56
|
Posted: Fri May 15, 2009 9:57 pm Post subject: |
|
|
krinn wrote: | and you did re-emerge the nvidia drivers AFTER you've rebuild that new kernel?
as build kernel, boot the kernel, emerge nvidia-drivers again with the new kernel |
yes I did the following:
Code: |
mount /dev/sda2 /boot
cd /usr/src/linux
make && make modules_install
cp arch/i386/boot/bzImage /boot
reboot
emerge nvidia-drivers
su twan
startx
|
and I still get the following error:
Code: |
(EE) NVIDIA(0): Failed to load the NVIDIA kernel module!
|
I think my problem has something to do with the multiple kernels. I was not even aware that I had the two other kernels on my laptop. How do you check to see if the modules are installed with the kernel you are using?
I know from doing eselect kernel list that the kernel I am using is linux-2.6.27-gentoo-r8.
Also, I think the very last thing I did before Xorg stopped working was clearing out my /lib/modules/2.6.27-gentoo-r8/
by doing
Code: |
rm -r /lib/modules/2.6.27-gentoo-r8/
|
Since then it has been repopulated with files, but I wonder if the deletion of this folder has something to do with the problem. |
|
Back to top |
|
|
admasnd n00b
Joined: 10 Apr 2009 Posts: 56
|
Posted: Sat May 16, 2009 12:20 am Post subject: |
|
|
I don't know if this helps or not but when I check dmesg
I see the following message for the nvidia module, but messages involving the other modules look similar to the following:
Code: |
[43.848180] nvidia: version magic '2.6.27-gentoo-r8 mod_unload CORE2' should be '2.6.27-gentoo-r8 SMP mod_unload CORE2'
|
|
|
Back to top |
|
|
Nerevar l33t
Joined: 31 May 2008 Posts: 720
|
Posted: Sat May 16, 2009 1:11 am Post subject: |
|
|
Is it possible that the CFLAG march setting of i686 doesn't allow for SMP? Did you recently turn on SMP in your kernel? You certainly want SMP on a core2, but that march setting is way off. See here for the list of safe flags: http://en.gentoo-wiki.com/wiki/Safe_Cflags
EDIT: More likely... the kernel you're running is 2.6.27-7-generic (in the emerge --info), but the modules you're using are 2.6.27-gentoo-r8. Looks like your new kernel isn't loading. I still think you need to fix that march setting though. |
|
Back to top |
|
|
admasnd n00b
Joined: 10 Apr 2009 Posts: 56
|
Posted: Sat May 16, 2009 1:25 am Post subject: |
|
|
Nerevar wrote: | Is it possible that the CFLAG march setting of i686 doesn't allow for SMP? Did you recently turn on SMP in your kernel? You certainly want SMP on a core2, but that march setting is way off. See here for the list of safe flags: http://en.gentoo-wiki.com/wiki/Safe_Cflags
EDIT: More likely... the kernel you're running is 2.6.27-7-generic (in the emerge --info), but the modules you're using are 2.6.27-gentoo-r8. Looks like your new kernel isn't loading. I still think you need to fix that march setting though. |
I turned off SMP in my kernel as a troubleshooting step for the power management guide. |
|
Back to top |
|
|
Nerevar l33t
Joined: 31 May 2008 Posts: 720
|
Posted: Sat May 16, 2009 1:33 am Post subject: |
|
|
You need to first get a kernel booting with matching modules. Then reinstall the nvidia drivers. |
|
Back to top |
|
|
admasnd n00b
Joined: 10 Apr 2009 Posts: 56
|
Posted: Sat May 16, 2009 1:39 am Post subject: |
|
|
Nerevar wrote: | You need to first get a kernel booting with matching modules. Then reinstall the nvidia drivers. |
How do I do that? The methods I have been using to install the kernel haven't been doing the trick. |
|
Back to top |
|
|
Nerevar l33t
Joined: 31 May 2008 Posts: 720
|
|
Back to top |
|
|
admasnd n00b
Joined: 10 Apr 2009 Posts: 56
|
Posted: Sat May 16, 2009 1:54 am Post subject: |
|
|
The thing is that I don't understand what to do differently than before. My grub loads up the r8 kernel and the kernel image that is in /boot is the r8 version. So if the modules are being created with the r8 kernel, how do I find out what kernel they are being created as? |
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Sat May 16, 2009 2:00 am Post subject: |
|
|
admasnd wrote: | My grub loads up the r8 kernel and the kernel image that is in /boot is the r8 version. | The emerge --info output you posted indicates otherwise. Do you use a separate partition for /boot/? |
|
Back to top |
|
|
admasnd n00b
Joined: 10 Apr 2009 Posts: 56
|
Posted: Sat May 16, 2009 2:17 am Post subject: |
|
|
desultory wrote: | admasnd wrote: | My grub loads up the r8 kernel and the kernel image that is in /boot is the r8 version. | The emerge --info output you posted indicates otherwise. Do you use a separate partition for /boot/? |
yes I use a separate partition for /boot. I make sure that I mount it as well before I copy the bzImage, so I wonder what's going on.
Edit: I just ran uname -r and it says that i'm running the r8 kernel. |
|
Back to top |
|
|
Nerevar l33t
Joined: 31 May 2008 Posts: 720
|
|
Back to top |
|
|
admasnd n00b
Joined: 10 Apr 2009 Posts: 56
|
Posted: Sat May 16, 2009 3:39 am Post subject: |
|
|
My grub is configured properly. As for re-emerging nvidia-drivers, it made this worse.
After I ran
Code: |
emerge nvidia-drivers
eselect opengl set
|
none of the modules load like usual and Xorg doesn't load, but this time there is no errors in the xorg log and worst of all, the computer freezes.
The only way to avoid the computer freeze is to use interactive mode and make sure nothing related to Xorg tries to load up like xdm. |
|
Back to top |
|
|
Nerevar l33t
Joined: 31 May 2008 Posts: 720
|
Posted: Sat May 16, 2009 4:11 am Post subject: |
|
|
admasnd wrote: | My grub is configured properly. |
Why do you think this? What did you change to boot the right kernel? Are you still booting the right kernel or has it reverted again? Did you ever get the modules to load?
As for X hanging, did you try CTRL-ALT-BACKSPACE or CTRL-ALT-F1?
Sorry for the 20 questions, but my guessing at the answers is not working. |
|
Back to top |
|
|
admasnd n00b
Joined: 10 Apr 2009 Posts: 56
|
Posted: Sat May 16, 2009 4:27 am Post subject: |
|
|
Nerevar wrote: | admasnd wrote: | My grub is configured properly. |
Why do you think this? What did you change to boot the right kernel? Are you still booting the right kernel or has it reverted again? Did you ever get the modules to load?
As for X hanging, did you try CTRL-ALT-BACKSPACE or CTRL-ALT-F1?
Sorry for the 20 questions, but my guessing at the answers is not working. |
It's cool man. I'm just glad you giving me some of your time. As for your questions,
grub is loading the r8 kernel. as for the root setting for grub, it's (hd0,1) to represent /dev/sda2, which is my /boot partition.
I unmerged nvidia-drivers and got the following error:
Code: |
!!! Error: Failed to create //usr//lib/libGL.so
/var/tmp/binpkgs/X11-drivers/nvidia-drivers-180.29/temp/environment: line 3346:
4536 Killed eselect opengl set --use-old Xorg-X11
|
I don't know if that error is significant.
I then re-emerged nvidia-drivers, did eselect opengl set nvidia, did modprobe -r nvidia.
I then did modprobe nvidia and there was no error. startx did not work, however. the laptop froze.
Unfortunately, CTRL-ALT-BACKSPACE does not stop Xorg. It's a complete freeze. |
|
Back to top |
|
|
Nerevar l33t
Joined: 31 May 2008 Posts: 720
|
Posted: Sat May 16, 2009 4:37 am Post subject: |
|
|
That sounds like you're getting closer. At least the modules are now loading properly. Check your xorg log again for warnings/errors (egrep "WW|EE" /var/log/Xorg.0.log) and post your /etc/X11/xorg.conf. |
|
Back to top |
|
|
admasnd n00b
Joined: 10 Apr 2009 Posts: 56
|
Posted: Sat May 16, 2009 5:13 am Post subject: |
|
|
Nerevar wrote: | That sounds like you're getting closer. At least the modules are now loading properly. Check your xorg log again for warnings/errors (egrep "WW|EE" /var/log/Xorg.0.log) and post your /etc/X11/xorg.conf. |
Code: |
(chroot) ubuntu / # egrep "WW|EE" /var/log/Xorg.0.log
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/misc/".
(WW) The directory "/usr/share/fonts/TTF/" does not exist.
(WW) The directory "/usr/share/fonts/OTF" does not exist.
(WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/misc/".
(WW) The directory "/usr/share/fonts/TTF/" does not exist.
(WW) The directory "/usr/share/fonts/OTF" does not exist.
(WW) AllowEmptyInput is on, devices using drivers 'kbd' or 'mouse' will be disabled.
(WW) Disabling Mouse0
(WW) Disabling Keyboard0
(II) Loading extension MIT-SCREEN-SAVER
|
Code: |
(chroot) ubuntu / # cat /etc/X11/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder63) Thu Feb 5 00:18:17 PST 2009
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/misc/"
FontPath "/usr/share/fonts/TTF/"
FontPath "/usr/share/fonts/OTF"
FontPath "/usr/share/fonts/Type1/"
FontPath "/usr/share/fonts/100dpi/"
FontPath "/usr/share/fonts/75dpi/"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Device"
Identifier "Card0"
Driver "nvidia"
VendorName "nVidia Corporation"
BoardName "GeForce 8600M GT"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
|
Just to clarify, the nvidia module succeeded modprobe, not the other modules. |
|
Back to top |
|
|
Nerevar l33t
Joined: 31 May 2008 Posts: 720
|
Posted: Sat May 16, 2009 5:29 am Post subject: |
|
|
I don't see any problems with those. I guess I'd look at the dmesg output and the system log to try and see if there are any hardware related issues (due to kernel misconfig or something else). So, which modules aren't loading now? Are they modules provided by the kernel or 3rd party? Obviously the latter will take rebuilding. |
|
Back to top |
|
|
admasnd n00b
Joined: 10 Apr 2009 Posts: 56
|
Posted: Sat May 16, 2009 6:08 am Post subject: |
|
|
Nerevar wrote: | I don't see any problems with those. I guess I'd look at the dmesg output and the system log to try and see if there are any hardware related issues (due to kernel misconfig or something else). So, which modules aren't loading now? Are they modules provided by the kernel or 3rd party? Obviously the latter will take rebuilding. |
The following are the modules that aren't loading:
Code: |
snd-hda-intel
snd-pcm-oss
snd-mixer-oss
snd-seq-oss
snd-seq
|
These are kernel modules.
I tried the following:
Code: |
emerge --unmerge xorg-x11
emerge xorg-x11
env-update
source /etc/profile
|
It still freezes when xdm is run (specifically gdm for gnome).
Code: |
emerge --unmerge alsa-utils
emerge alsa-utils
modprobe snd-hda-intel
|
and the following error occurs:
Code: |
FATAL: Error inserting snd_hda_intel (/lib/modules/2.6.27-gentoo-r8/kernel/sound/pci/hda/snd-hda-intel.ko): Invalid module format
|
dmesg shows the same thing it showed for the nvidia module earlier for the other modules.
Code: |
[43.848180] nvidia: version magic '2.6.27-gentoo-r8 mod_unload CORE2' should be '2.6.27-gentoo-r8 SMP mod_unload CORE2'
|
except the module name is different then this code. |
|
Back to top |
|
|
Nerevar l33t
Joined: 31 May 2008 Posts: 720
|
Posted: Sat May 16, 2009 9:43 am Post subject: |
|
|
If you umount your /boot partition, does anything exist in /boot? |
|
Back to top |
|
|
|