From nobody Sat May 18 15:22:12 2024 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VhSHY6l1Tz5L0sh for ; Sat, 18 May 2024 15:22:17 +0000 (UTC) (envelope-from shuriku@shurik.kiev.ua) Received: from mail.flex-it.com.ua (mail.flex-it.com.ua [193.239.74.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VhSHY1nGpz44MS for ; Sat, 18 May 2024 15:22:17 +0000 (UTC) (envelope-from shuriku@shurik.kiev.ua) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of shuriku@shurik.kiev.ua designates 193.239.74.7 as permitted sender) smtp.mailfrom=shuriku@shurik.kiev.ua Received: from 93.183.208.50.ipv4.datagroup.ua ([93.183.208.50] helo=[192.168.200.135]) by mail.flex-it.com.ua with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.97.1 (FreeBSD)) (envelope-from ) id 1s8Lsz-00000000Nx0-3Bwj for freebsd-current@freebsd.org; Sat, 18 May 2024 18:22:13 +0300 Content-Type: multipart/alternative; boundary="------------XPZCXI7BZBgzKkvgKLEcdUPe" Message-ID: Date: Sat, 18 May 2024 18:22:12 +0300 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: usb mouse not work on boot To: freebsd-current@freebsd.org References: <20240518092649.6430ad53@ernst.home> <86ttivwikf.fsf@ltc.des.dev> <34a397ef-ca2d-4e04-9066-3cf8a0c48616@shurik.kiev.ua> Content-Language: en-US From: Oleksandr Kryvulia In-Reply-To: X-ACL-Warn: SPF failed. 93.183.208.50 is not allowed to send mail from shurik.kiev.ua. X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.28 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; R_SPF_ALLOW(-0.20)[+mx:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; XM_UA_NO_VERSION(0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:35297, ipnet:193.239.72.0/22, country:UA]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[shurik.kiev.ua]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4VhSHY1nGpz44MS This is a multi-part message in MIME format. --------------XPZCXI7BZBgzKkvgKLEcdUPe Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 18.05.24 16:06, Warner Losh: > > > On Sat, May 18, 2024, 6:51 AM Oleksandr Kryvulia > wrote: > > 18.05.24 12:59, Oleksandr Kryvulia: >> 18.05.24 12:55, Dag-Erling Smørgrav: >>> Oleksandr Kryvulia writes: >>>> Gary Jennejohn 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. --------------XPZCXI7BZBgzKkvgKLEcdUPe Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 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> writes:
Gary Jennejohn <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.
--------------XPZCXI7BZBgzKkvgKLEcdUPe--