Re: usb mouse not work on boot

From: Oleksandr Kryvulia <shuriku_at_shurik.kiev.ua>
Date: Sat, 18 May 2024 15:22:12 UTC
18.05.24 16:06, Warner Losh:
>
>
> On Sat, May 18, 2024, 6:51 AM Oleksandr Kryvulia 
> <shuriku@shurik.kiev.ua> wrote:
>
>     18.05.24 12:59, Oleksandr Kryvulia:
>>     18.05.24 12:55, Dag-Erling Smørgrav:
>>>     Oleksandr Kryvulia<shuriku@shurik.kiev.ua>  <mailto:shuriku@shurik.kiev.ua>  writes:
>>>>     Gary Jennejohn<garyj@gmx.de>  <mailto:garyj@gmx.de>  writes:
>>>>>     Try adding uhid_load="YES" to your /boot/loader.conf.  With that
>>>>>     added the module should be automatically loaded during the kernel
>>>>>     boot.
>>>>     As workaround I already have kld_list+="uhid" in /etc/rc.conf.
>>>     I hope you don't mean that literally, because /etc/rc.conf is a shell
>>>     script and += is not valid shell syntax.  On the other hand, something
>>>     like
>>>
>>>     kld_list="${kld_list} uhid"
>>     Yes, you are right. I mean
>>     sysrc kld_list+="uhid"
>
>     One more correction. Via kld_list I need load ums(4), loading only
>     uhid(4) does not solve a problem.
>
>
>
> You don't need to change kld_list. In fact, you should undo any 
> changes you've made there. Undo everything in loader.conf you've done.
>
> This is a bug in the boot optimization stuff. Or rather, this exposes 
> a long standing bug in the USB code where there's an asymmetry between 
> the nomatch events and the bus tree it presents to devctl causing 
> devmatch to fail when the nomatch events aren't present on boot.
>
> Just set hw.bus.devctl_nomatch_enabled=1 in /boot/loader.conf and 
> reboot. Or update to the change I'm about to make.
>

Thanks for the detailed explanation, Warner. Interesting that on my 
system hw.bus.devctl_nomatch_enabled=1 is set by /etc/rc.d/devmatch but 
only explicit set it in /boot/loader.conf did the trick. That is why I 
think this sysctl don't work in my case.