Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

According to the man page of lsmod the command shows “what kernel modules are currently loaded”.

I wrote a script that uses modinfo to show what kernel object (.ko) files are actually in use:

#!/bin/sh
for i in `lsmod | awk '{print $1}' | sed -n '1!p'`; do
echo "###############################$i###############################"
echo ""
modinfo $i
echo ""
echo ""
done

Now I found out that modinfo nvidia shows the following output:

ERROR: modinfo: could not find module nvidia

Do you guys have any explanation for this?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

Your nvidia module is perfectly loaded and working. The problem lies in modinfo.

modinfo fetch the list of known modules by reading the /lib/modules/$(uname -r)/modules.* files, which are usually updated with depmod.

If depmod -a has not been run after installing the nvidia module, then modinfo does not knows about it. This does not prevent anybody from loading the module with insmod and lsmod will show it just fine if loaded.

share|improve this answer

If you've recently uninstalled your nvidia driver, you may have unistalled the module from your system, but it's still in your initrd. You can check which are in your initrd with lsinitrd. Or just try reinstalling your kernel to see if it no longer shows up in lsmod.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.