# Delay USB load in FreeBSD



## BsDjUsTbSd (May 5, 2020)

Hello, I would like to know how I could delay the load of any USB that is currently plugged in so they start a bit after the system starts.
Note: Please don't just ask why. Just give the solution if you know it. If you don't then just don't reply it's totally ok.


----------



## Martin Paredes (May 10, 2020)

Short answer it's NO.

Each time you plug a device, the OS load the driver into the kernel and create a device file, then `devd` take place

Read the manuals of devd(8) and devd.conf(5), to figure out what can be done.

What you can delay, it's the action for the event


```
#
# Match a USB printer
#
attach 100 {
    device-name "ulpt0";
    action "sleep 5000 ; cat /usr/local/share/foo2zjs/firmware/sihp1018.dl > /dev/ulpt0";
};
```


----------



## George (May 10, 2020)

Maybe build a custom kernel without "device usb", or place "usb_load="NO" in /boot/loader.conf. Then try to load those modules later, manually. I don't think it will work though.

It would help if you knew the driver you want to delay. E.g. ugen, or whatever.


----------



## stimi (May 15, 2020)

You can also use usbconfig(8)() and a little crontab(5)() magic to create a script that will disable a usb device on boot, sleep, and then enable it.


----------

