Re: iichid/hms keyboard/mouse wrongly reattached to uhid/ums

From: Michael Gmelin <grembo_at_freebsd.org>
Date: Mon, 27 Jun 2022 16:27:07 UTC

On Mon, 27 Jun 2022 16:18:58 +0000
Ivan Quitschal <tezeka@hotmail.com> wrote:

> > Hi,
> >
> >Can you dump "kldstat" at the different times?  
> 
> >I guess it may be just be that the wrong module is loaded first, so
> >it grabs the device, because there are no other drivers loaded, even
> >though ums is a generic driver.  
> 
> >Try loading all relevant drivers in /boot/loader.conf . Then the
> >attach order shouldn't matter.  
> 
> >--HPS  
> 
> 
> Hi Michael 
> 
> Yes , hw.usb.usbhid.enable="1" is in loader.conf , not sysctl 
> 
> Hi Warner
> 
> When ums.ko is up, the second attach is always taken by "ums" first
> no matter what. First time you boot tho, it takes the correct one
> (hms)
> 
> Hi Hans
> 
> Looks like this below is the only order I could make it work even tho
>  uhid and usbhid get loaded regardless what I put on loader.conf
> 
> usbhid_load="NO" <-- still loaded anyway
> uhid_load="NO" <-- still loaded anyway
> ums_load="NO" <- this one is not loaded
> ic_load="YES"
> iichid_load="YES"
> hidbus_load="YES"
> hsctrl_load="YES"
> hidmap_load="YES"
> hcons_load="YES"
> hkbd_load="YES"
> hms_load="YES"
> hmt_load="YES"
> hconf_load="YES"
> 
> hw.usb.usbhid.enable="1"
> 
> with the order below , after 5 reboots and lots of kvm switches , it
> always ended up on the right iichid device. Seems to be working now
> 
> but like I said, its random, let see after some more reboots if this
> rule is still valid

I don't know if it makes any difference in your case, but I had best
results loading these drivers through rc.conf, e.g.:

  sysrc kld_list+="hidraw hkbd"

Cheers
Michael

-- 
Michael Gmelin