# Kernel modules behaving strange



## ricky92 (Mar 26, 2013)

I'm having a very strange problem with dynamic kernel modules, in particular I'm talking about the hwpmc.ko one: I can't seem to load it properly.
When I execute [cmd=]kldload hwpmc[/cmd] it doesn't give any error, and when executing [cmd=]kldstat[/cmd] the output is the following:

```
Id Refs Address            Size     Name
 1    5 0xffffffff80200000 11eca90  kernel
 2    1 0xffffffff81612000 a96b     fuse.ko
 3    1 0xffffffff8161d000 e6f0     hwpmc.ko
```
which should mean it successfully loaded it. It did not, though.
[cmd=]kldstat -m hwpmc[/cmd] returns 
	
	



```
kldstat: can't find module hwpmc: No such file or directory
```
 and it is very strange.

On another machine, it worked just fine, and [cmd=]kldstat -m hwpmc[/cmd] showed the right module. I have already tried recompiling both the world and the kernel, but it is not working anyway. What could it be?

Thanks in advance.


----------



## SirDice (Mar 27, 2013)

And what version of FreeBSD are we talking about?


----------



## ricky92 (Mar 27, 2013)

SirDice said:
			
		

> And what version of FreeBSD are we talking about?


Output of [cmd=""]uname -a[/cmd]:

```
FreeBSD myhost.com 9.0-RELEASE FreeBSD 9.0-RELEASE #1 r248726M: Tue Mar 26 18:15:18 CET 2013     root@myhost.com:/usr/obj/usr/src/sys/GENERIC  amd64
```


----------



## SirDice (Mar 27, 2013)

Keep in mind that 9.0-RELEASE will be end-of-life at the end of this month. I suggest you plan an upgrade to 9.1-RELEASE-p1.


----------



## ricky92 (Mar 27, 2013)

Thank you for your prompt responses, SirDice. I will try updating the system to 9.1, and will let you know if this solved the problem.


----------



## ricky92 (Mar 27, 2013)

An update to 9.1-RELEASE solved the problem. Thank you again for your help.


----------

