From nobody Sat May 18 13:17:35 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 4VhPWv6yTvz5KmHJ for ; Sat, 18 May 2024 13:17:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VhPWv6LxXz51tc for ; Sat, 18 May 2024 13:17:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a5cdd6cfae7so518082066b.0 for ; Sat, 18 May 2024 06:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1716038266; x=1716643066; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MJwDbIOq5oIVniX8Yk8lKbpWqe7kerYzHcH2ci2MFKQ=; b=gFgw0fIWgcZa61V7w3TiVgi0aW1KZ2sV/YrpECDABLHWRCLvau3fmFRG8VsK1MSaOM vS9RCMcP+5BEA+H/o7hJT+v7YpIsphbsu10L2y/5uHFjUjKlM46pP56Zchw3vMqHUpbs ATGhVTw2muPLpbGoe0Y3RNqGEMpOaGO59dIZsFBgAk8PUjxFpb32cnOGbLdrES6na0dl AQvxLoMVgacOEBNqWqCTjOGilhWIWA1JE0KZwrqnZeUFBkP1KiScOk7VzsErPi4KBnPo A3T3Qq8FCGjzTCDSxXzXpW6BqBST4uCInkmIS/HsVbXZ2/VsoCTvHGU4CcfTGZwYRAkJ Ikyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716038266; x=1716643066; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MJwDbIOq5oIVniX8Yk8lKbpWqe7kerYzHcH2ci2MFKQ=; b=hhq0Hcfmq0tv3lz2Ic4Dhf5bdrdci81DQa+RuNIgWnNw/DpSvm8kgqHHKPne6qgcHb GnzTNbjXMFaLCSFuIzRt+MHa3eD8Lryeql0PLnhL5fkDMFOgf8LU0DyFPQ7pFbrt3bAJ Ph0scCEXQUBG+1H6ii7YdrI7BJUR46hpVkRlsgY4c1Pt6FSPHIlgIyWYUBWgKcCkRHqt QGzwg+NpWKzRgpMJZB58et1F8tSwEiimdoNNlgC2FhquYXvXIpVH+e5kPihOvOECy3sS n0WH+OahsC/drEpQRn0hzNzjlxxktGvc2I9fgaToA7n7WOM0idEzcITmLR9JiRR9+Egm 1m2w== X-Gm-Message-State: AOJu0YzD5mVk5W/bcouZq7it5iOweSIDdafGo+QKdhhRtq83GABiRU0C Ke0qg+/LWwK+0qPb2TzGg/Yit+P4HnOC3eGsNs9l4InkQj/8hWUPmH+2YkSn1vtQwlksSoYkGJS s+6/gcjG/K5PjjoCmMDevDUj2QzNsRiZws8kbmz846DWtm/LziEg= X-Google-Smtp-Source: AGHT+IEHKJk1IEYd3g6bjNQwqLqxBZ072FnyQUVvS+arJrrlkuIPkMrhjDwmXhYVRxCGppBMklk1yPOORVmFAq/6FVQ= X-Received: by 2002:a17:906:3386:b0:a55:b67c:bd04 with SMTP id a640c23a62f3a-a5d58d52a19mr158378466b.4.1716038266619; Sat, 18 May 2024 06:17:46 -0700 (PDT) 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 References: <20240518092649.6430ad53@ernst.home> <86ttivwikf.fsf@ltc.des.dev> <34a397ef-ca2d-4e04-9066-3cf8a0c48616@shurik.kiev.ua> In-Reply-To: <34a397ef-ca2d-4e04-9066-3cf8a0c48616@shurik.kiev.ua> From: Warner Losh Date: Sat, 18 May 2024 07:17:35 -0600 Message-ID: Subject: Re: usb mouse not work on boot To: Oleksandr Kryvulia Cc: freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="0000000000004da2a60618ba4ba5" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4VhPWv6LxXz51tc --0000000000004da2a60618ba4ba5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, May 18, 2024 at 6:51=E2=80=AFAM Oleksandr Kryvulia wrote: > 18.05.24 12:59, Oleksandr Kryvulia: > > 18.05.24 12:55, Dag-Erling Sm=C3=B8rgrav: > > Oleksandr Kryvulia writ= es: > > Gary Jennejohn writes: > > Try adding uhid_load=3D"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+=3D"uhid" in /etc/rc.conf. > > I hope you don't mean that literally, because /etc/rc.conf is a shell > script and +=3D is not valid shell syntax. On the other hand, something > like > > kld_list=3D"${kld_list} uhid" > > Yes, you are right. I mean > sysrc kld_list+=3D"uhid" > > > One more correction. Via kld_list I need load ums(4), loading only uhid(4= ) > does not solve a problem. > Also, in this case, kld_list is a terrible place to load the files. You're better off loading them with xxx_load=3DYES in loader.conf. The reason is that both uhid and ums will match your mouse. kld_list loads these in a random order (effectively) and the first one to load will claim the device, since there's no re-probe when the next one loads. You should never use it, unless the module you're loading isn't supported by the boot loader (like drm-kmod). The old advice was to put everything in kld_list and it would speed up boot, but all the performance bugs in the boot loader have been fixed by a combination of moving to UEFI (which is generally faster), BIOSes with performance bugs disappearing 10 years ago and block caching being added to the boot loader. It should almost always be empty or just drm-mod these days (unless you somehow have special needs). By adding uhid last to this list in this way, you're guaranteeing you'll hit this bug because it's not after ums, and that things won't work. Warner --0000000000004da2a60618ba4ba5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sat, May 18, 2024 at 6:51=E2=80=AF= AM Oleksandr Kryvulia <shuriku= @shurik.kiev.ua> wrote:
=20 =20 =20
18.05.24 12:59, Oleksandr Kryvulia:
=20 18.05.24 12:55, Dag-Erling Sm=C3=B8rgrav:
Oleksandr Kryvulia <shuriku@shurik.kiev.ua> writes:
Gary Je=
nnejohn <garyj@gmx.de&=
gt; writes:
Try add=
ing uhid_load=3D"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+=3D"uhid=
" in /etc/rc.conf.
I hope you don't mean that literally, because /=
etc/rc.conf is a shell
script and +=3D is not valid shell syntax.  On the other hand, something
like

kld_list=3D"${kld_list} uhid"
Yes, you are right. I mean
sysrc kld_list+=3D"uhid"

One more correction. Via kld_list I need load ums(4), loading only uhid(4) does not solve a problem.

=
Also, in this case, kld_list is a terrible place to load the files. Yo= u're better off loading them with xxx_load=3DYES in loader.conf. The re= ason is that both uhid and ums will match your mouse. kld_list loads these = in a random order (effectively) and the first one to load will claim the de= vice, since there's no re-probe when the next one loads. You should nev= er use it, unless the module you're loading isn't supported by the = boot loader (like drm-kmod). The old advice was to put everything in kld_li= st and it would speed up boot, but all the performance bugs in the boot loa= der have been fixed by a combination of moving to UEFI (which is generally = faster), BIOSes with performance bugs disappearing 10 years ago and block c= aching being added to the boot loader. It should almost always be empty or = just drm-mod these days (unless you somehow have special needs).
<= div>
By adding uhid last to this list in this way, you're= guaranteeing you'll hit this bug because it's not after ums, and t= hat things won't work.

Warner
--0000000000004da2a60618ba4ba5--