Bug 255259

Summary: iwm wireless module alway automatically load
Product: Base System Reporter: Raffeale <dcp2k>
Component: kernAssignee: freebsd-wireless (Nobody) <wireless>
Status: Closed Works As Intended    
Severity: Affects Many People CC: freebsd, lwhsu, portmaster
Priority: ---    
Version: 13.0-RELEASE   
Hardware: amd64   
OS: Any   

Description Raffeale 2021-04-20 12:57:27 UTC
i have installed freebsd13, iwm_load is not in my loader.conf ,i compile a custom kernel without iwm module,when i restart i found that the iwm module has been loaded automatically.why? what's wrong?
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2021-04-20 13:37:44 UTC
This is because of devmatch(8) is taking effect.  If you don't like this behavior, try putting devmatch_enable="NO" to /etc/rc.conf .

BTW, it's recommended to use mailing list to ask questions, for example, https://lists.freebsd.org/mailman/listinfo/freebsd-questions
Comment 2 Mina Galić freebsd_triage 2021-04-20 13:42:24 UTC
(In reply to Li-Wen Hsu from comment #1)
that sounds like a big Hammer, when a smaller one is available in the form of the undocumented 

devmatch_blacklist="iwm.ko"
Comment 3 Li-Wen Hsu freebsd_committer freebsd_triage 2021-04-20 13:45:10 UTC
(In reply to Mina Galić from comment #2)
Thanks for the tip.  It's documented in rc.conf(5)
Comment 4 Chris Hutchinson 2021-04-20 17:15:35 UTC
(In reply to Mina Galić from comment #2)
There's also iwm_load="NO". Isn't there?
Comment 5 Mina Galić freebsd_triage 2021-04-20 17:19:30 UTC
(In reply to Chris Hutchinson from comment #4)
that's for loader.conf, and it's the default anyway, and it doesn't prevent devmatch from loading it.

devmatch_blacklist="iwm.ko"

should, and if it doesn't, that's a bug that needs to be addressed

your next workaround then would be to rename or remove the module and rerun service kldxref.