USB Device Not Detected on FreeBSD? Fix It Step by Step
In this article
If FreeBSD does not detect a USB device, the fastest fix is to check the kernel messages first: run dmesg | tail -30 right after plugging the device in. If nothing appears, the device is not reaching the USB stack at all, which usually points to a physical port, cable, or hub problem. If a line does appear but no driver attaches, the issue is at the driver or device-class level. This guide walks through both cases in order, from the simplest checks to kernel configuration, so you can isolate the fault without reinstalling anything.
What You'll Need
- A FreeBSD system you can log into as root or with
su/doas(most diagnostic commands need elevated privileges). - The USB device and its original cable, plus a second known-good device (a USB flash drive is ideal) for comparison testing.
- Access to a terminal. If the system is headless, SSH access is fine.
- Optional: a spare USB port on the machine, preferably one directly on the motherboard rather than a front-panel or hub port.
Step-by-Step
- Confirm the device is seen at the hardware level. Plug the device in, wait a few seconds, then run
dmesg | tail -40. You are looking for lines containingugen,umass,ukbd,ums, or the device's vendor name. If new lines appear, the kernel saw something and you can skip to step 5. If nothing appears, continue with step 2. - Check the USB bus itself. Run
usbconfigwith no arguments. It lists every USB bus and the devices attached to each. If the device does not appear here, the problem is below the driver layer: port, cable, hub, or power. Move the device to a different port, try a different cable, and remove any unpowered hub between the device and the machine. - Verify the USB controller is present. Run
pciconf -lv | grep -i usb. You should see one or more controllers (for examplexhci,ehci, orohci). If no controller appears, the USB hardware may be disabled in the BIOS/UEFI firmware or the controller driver did not load. Reboot into firmware setup and check that USB support and XHCI hand-off are enabled. - Check kernel modules. Some drivers are loadable rather than built into the kernel. Run
kldstatto list loaded modules, then try loading the relevant one manually, for examplekldload umassfor USB storage orkldload ukbdfor a keyboard. Ifkldloadreports the module is already loaded, that is fine. If it reports the file cannot be found, the module may not be present in/boot/kernel; check withls /boot/kernel | grep umass. - Look for driver attachment messages. Run
dmesg | grep -i -E 'ugen|umass|ukbd|ums|usb'and read the most recent entries. A healthy attach looks like augenline followed by a driver-specific line such asumass0: ... on usbus0. If you seeugenbut no driver line, the device class is not being claimed by any driver, which is common for vendor-specific or unsupported devices. - Identify the device node. For storage, check
ls /dev/da*andls /dev/ada*. A newly attached USB disk usually appears as/dev/da0or higher. For input devices, checkls /dev/ukbd*andls /dev/ums*. For generic access,ls /dev/ugen*shows the raw USB endpoints. If the node exists, the device is detected and the remaining problem is mounting or permissions, not detection. - Check permissions and groups. If the device node exists but your user cannot open it, confirm your account is in the
operatorgroup (for many device nodes) or that the node's ownership and mode allow access. Runls -lon the node and compare with a working device. Adding a user to a group requires logging out and back in, or usingnewgrp. - Test with a known-good device. Plug in a USB flash drive you know works. If it is detected and the original device is not, the fault is with the original device or its cable. If neither is detected, the fault is with the port, controller, or kernel configuration, so revisit steps 2 through 4.
- Check for power and hub issues. Bus-powered devices such as external 2.5-inch drives can fail to spin up on weak ports. Use a powered hub or a port that supplies adequate current, and avoid daisy-chaining unpowered hubs. On laptops, some ports are shared or disabled depending on firmware settings.
- Review boot-time USB configuration. If the device works only when plugged in after boot but not at boot, check
/boot/loader.confand/etc/rc.conffor USB-related settings. Do not add random tunables; only adjust settings you can confirm from the FreeBSD handbook or the driver's manual page. After any change, reboot and retest.
Common Mistakes
- Assuming
dmesgis live. It is a buffer, not a stream. Always run it after plugging the device in, and usetailto see recent lines. - Ignoring the difference between
ugenand a driver. Seeingugen0only means the raw device was enumerated. It does not mean a storage or input driver claimed it. - Testing only one port. Front-panel ports and hubs fail or under-supply power far more often than rear motherboard ports.
- Loading modules blindly. Loading a module that does not match the device class will not help and can confuse diagnosis. Match the module to the device type.
- Forgetting permissions. A detected device that your user cannot open looks like a detection failure but is an access problem.
Tips
- Keep a known-good USB flash drive nearby as a control device for every test.
- Run
usbconfig dump_device_descafter identifying the device to see its class and vendor/product IDs, which tell you which driver should claim it. - Use
usbconfig listfor a compact view of buses and devices when the full output is long. - If a device works on another operating system but not FreeBSD, note its class; some vendor-specific devices have no FreeBSD driver and will only expose a
ugennode. - Reboot after changing kernel modules or loader settings rather than assuming the change took effect.
Troubleshooting
If usbconfig shows nothing at all, the problem is almost always physical or firmware-level: try another cable, another port, and check the firmware settings for USB and XHCI. If usbconfig shows the device but no driver attaches, confirm the device class and load the matching module; if no module exists for that class, the device is not supported by a native driver and only raw ugen access is available. If the device node appears but mounting fails for storage, check dmesg for partition-table errors and confirm the filesystem is one FreeBSD can mount. If the device disappears intermittently, suspect power delivery or a failing cable. If a device works at boot but not after a suspend/resume cycle, the controller may need a reset; rebooting is the reliable workaround. When all else fails, compare against a second machine running FreeBSD to determine whether the fault follows the device or the host.
Frequently Asked Questions
Why does dmesg show nothing when I plug in a USB device?
The kernel did not see the device at all. Check the port, cable, and hub first, then confirm the USB controller appears in pciconf -lv.
What is the difference between ugen and umass?
ugen is the generic raw USB device node. umass is the mass-storage driver that claims storage-class devices and creates /dev/da* nodes.
Do I need to load a kernel module for every USB device?
No. Many drivers are built into the kernel. Loadable modules are needed only when the driver is not compiled in or not auto-loaded.
Why can I see the device but not access it as a normal user?
Device node permissions and group membership control access. Check the node's owner and mode, and confirm your user is in the appropriate group.
Can a USB hub cause detection failures?
Yes. Unpowered hubs and long cable runs can cause enumeration failures or intermittent disconnects, especially for power-hungry devices.
Is there a command to list all attached USB devices?
Yes, usbconfig lists buses and attached devices, and usbconfig list gives a compact summary.