# Boots hangs randomly with USB mouse



## FDreamer (Sep 2, 2021)

Hi,

I'm plagued with a random problem for several months. Sometimes, the boot process hangs when looking for USB devices with:


```
ugen2.4: <Canon CanoScan> at usbus2
ugen2.5: <Logitech USB-PS/2 Optical Mouse> at usbus2
ugen2.5: <Logitech USB-PS/2 Optical Mouse> at usbus2 (Disconnected)
ugen2.5: <Logitech USB-PS/2 Optical Mouse> at usbus2 
ugen2.5: <Logitech USB-PS/2 Optical Mouse> at usbus2 (Disconnected)
```

The only way to correct it is to reboot and pray it won't happen again.
I found a thread on something similar but cannot for the life of me find it again. The advice in there was to set in /boot/loader.conf


```
# Don't wait for USB (sometimes it hangs)
hw.usb.no_boot_wait=1
```

Unfortunately, it doesn't work.

Any advice is appreciated !


----------



## eternal_noob (Sep 3, 2021)

Please post the output of `freebsd-version -kru`


----------



## mer (Sep 3, 2021)

Have you tried a different mouse or same mouse in a different port?  The "Disconnected" are interesting.
I've got a couple of systems that during USB probing something (software) thinks something (hardware) is on a port off a hub but there really isn't anything there.  Unless the behavior of no_boot_wait changed in an updated kernel that should at least skip over waiting on USB devices at boot time.  Not an issue for mouse, but may be if you have an external disk off USB.
You may also need to put quotes around the 1:
hw.usb.no_boot_wait="1"


----------



## FDreamer (Sep 3, 2021)

Thanks for the answers.
eternal_noob : I have `13.0-RELEASE-p4`.
mer : Switching to another USB port does not work. I didn't think of trying another mouse....


----------



## grahamperrin@ (Sep 4, 2021)

mer said:


> … quotes around the 1…



Not necessary in this case. 

FDreamer can you share more of what's logged? As part of a probe will be ideal; for a holistic view of things.

`pkg install -y sysutils/hw-probe sysutils/hwstat sysutils/lsblk sysutils/pciutils sysutils/usbutils`
`hw-probe -all -upload`


----------



## FDreamer (Sep 6, 2021)

grahamperrin Unfortunately, it's quite random and I haven't saved the log...
Here're the result of `hw-prope` though: https://bsd-hardware.info/?probe=29cfd33c5e .
The probe also gave a warning : `WARNING: failed to detect EDID`


----------



## Tieks (Sep 6, 2021)

FDreamer said:


> WARNING: failed to detect EDID


EDID is Extended Display Id Data. Has to do with your monitor, not your mouse.


----------



## FDreamer (Sep 12, 2021)

The issue occurred again today: switching to another USB port or to another mouse or both did not help. I had to shutdown it forcefully so I cannot share the output of dmesg when it's failing.
But here's a normal boot:


----------



## grahamperrin@ (Nov 1, 2021)

FDreamer said:


> I cannot share the output of dmesg when it's failing.



In addition to /var/run/dmesg.boot (mentioned in the manual page for dmesg(8)), one or both of these files might prove useful in future: 

/var/log/dmesg.today
/var/log/dmesg.yesterday
Also /var/log/messages



> ```
> ugen2.5: <Logitech USB-PS/2 Optical Mouse> at usbus2
> ugen2.5: <Logitech USB-PS/2 Optical Mouse> at usbus2 (Disconnected)
> ugen2.5: <Logitech USB-PS/2 Optical Mouse> at usbus2
> ...



If you get symptoms such repeated detection, disconnection, detection, disconnection with a different mouse at a different port, I might suspect a hardware issue with the computer. 

Are the *input/output errors* significant? <https://bsd-hardware.info/?probe=29cfd33c5e&log=lsusb>


----------

