Date: Mon, 27 Jun 2022 19:58:14 +0300 From: Vladimir Kondratyev <vladimir@kondratyev.su> To: Ivan Quitschal <tezeka@hotmail.com>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org> Subject: Re: iichid/hms keyboard/mouse wrongly reattached to uhid/ums Message-ID: <8674be8f-b4fb-008d-9318-2184285b46a8@kondratyev.su> In-Reply-To: <CP6P284MB1900818F505F78F68EC4C6BECBB99@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM> References: <CP6P284MB1900818F505F78F68EC4C6BECBB99@CP6P284MB1900.BRAP284.PROD.OUTLOOK.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
On 27.06.2022 18:19, Ivan Quitschal wrote: > Hi all >=20 > Not sure if I found a problem here but here we go. >=20 > Since I have a KVM usb switch here for keyboard/mouse sometimes I toggl= e it=20 > between my windows and freebsd. >=20 > I am using iichid here to have my multimedia keys working on keyboard a= nd all >=20 > hw.usb.usbhid.enable=3D"1" >=20 > Im also using Wulf=E2=80=99s moused >=20 > https://github.com/wulf7/moused <https://github.com/wulf7/moused> >=20 > so far so good. Problem is: >=20 > when I switch to windows , everything is detached correctly (hms, hkbd = etc), but=20 > when I switch back, sometimes >=20 > the keyboard and mouse are wrongly attached to =E2=80=9Cums=E2=80=9D de= vice , not hms.=20 > (sometimes it goes to the correct one). >=20 > Shouldn=E2=80=99t ums/uhid modules be deactivated once hw.usb.usbhid.en= able is set to 1 ? >=20 > The workaround I did here was to manually kldunload both uhid.ko and um= s.ko=20 > within rc.local during boot. >=20 > This way I can detache attach the kbd/mouse back as much as I want and = it always=20 > end up in hms/hkbd devices >=20 > Is this how its supposed to function? Randomly choosing between ums or = hms? >=20 > Thanks >=20 > --tzk It seems that usbhid's bus probe priority must be increased from BUS_PROBE_GENERIC + 1 to BUS_PROBE_DEFAULT + 1 Test this patch: diff --git a/sys/dev/usb/input/usbhid.c b/sys/dev/usb/input/usbhid.c index fe53f11b8f4..174e1c28ae9 100644 --- a/sys/dev/usb/input/usbhid.c +++ b/sys/dev/usb/input/usbhid.c @@ -802,7 +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); } static int --=20 WBR Vladimir Kondratyev
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8674be8f-b4fb-008d-9318-2184285b46a8>