RES: usb mouse not work on boot
- Reply: Oleksandr Kryvulia : "Re: RES: usb mouse not work on boot"
- Reply: Dag-Erling_Smørgrav : "Re: RES: usb mouse not work on boot"
- In reply to: Warner Losh : "Re: usb mouse not work on boot"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 18 May 2024 16:29:39 UTC
Hi Warner / WBR / Oleksandr Im not sure if that’s the case with this uhid.ko, but you guys remember I had a priority issue with this module and Vladimir made me a patch to fix the attach priority? Warner, was it fixed since then? Let me show the patch I use to this very day important line is this, the patch might be wrong , because im still on 14-current +// return (BUS_PROBE_GENERIC + 1); return (BUS_PROBE_DEFAULT + 1); diff --git a/sys/dev/usb/input/usbhid.c b/sys/dev/usb/input/usbhid.c index 174e1c28ae96..7b19d713c943 100644 --- a/sys/dev/usb/input/usbhid.c +++ b/sys/dev/usb/input/usbhid.c @@ -802,6 +802,7 @@ usbhid_probe(device_t dev) if (hid_test_quirk(&sc->sc_hw, HQ_HID_IGNORE)) return (ENXIO); +// return (BUS_PROBE_GENERIC + 1); return (BUS_PROBE_DEFAULT + 1); } Thanks --tzk De: owner-freebsd-current@FreeBSD.org <owner-freebsd-current@FreeBSD.org> Em nome de Warner Losh Enviada em: sábado, 18 de maio de 2024 12:33 Para: Oleksandr Kryvulia <shuriku@shurik.kiev.ua> Cc: FreeBSD Current <freebsd-current@freebsd.org> Assunto: Re: usb mouse not work on boot On Sat, May 18, 2024, 9:22 AM Oleksandr Kryvulia <shuriku@shurik.kiev.ua<mailto:shuriku@shurik.kiev.ua>> wrote: 18.05.24 16:06, Warner Losh: On Sat, May 18, 2024, 6:51 AM Oleksandr Kryvulia <shuriku@shurik.kiev.ua<mailto: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. Yea. That's the optimization. We don't start generating events until it is one. Setting it in the bootloader causes all events to coke through. Setting it in devmatch turns them on after we run devmatch the first time, omitting all of the ones generated on boot. Warner