# Usb ports idle



## roger85 (Mar 13, 2021)

Hello,

My data are stored on a bunch of 5 HDD configured as a raidz2-zpool and connected to the computer via usb.
Until FreeBSD-12.1 the 5 HDD ran continuously and provided immediate access at any time.
No change in the hardware (MB Msi H97M-G49, Intel Haswell-i7).
Since FreeBSD-12.2, and now similarly with FreeBSD-13.0-RC2, the 5 HDD fall in "sleep" state after few minutes without any access. 
From this state, the bunch needs about 50 seconds to wake up. Same behaviour for Usb-3 or Usb-2 port used. 
No change when I switched from the "old" zfs to the new "open-zfs" .

What have I misconfigured?

Thank you


----------



## trev (Mar 13, 2021)

What does usbconfig(8) show? If the drives show up with (power) SAVE you can change it to (power) ON.


----------



## roger85 (Mar 14, 2021)

Hi,
here is  usbconfig

```
ugen0.1: <0x8086 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen1.1: <Intel EHCI root HUB> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen2.1: <Intel EHCI root HUB> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <Cyber Power System CPS RS232 USB BRIDGE for UPS> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (20mA)
ugen2.2: <vendor 0x8087 product 0x8001> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2: <vendor 0x8087 product 0x8009> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.3: <vendor 0x0409 product 0x005a> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
ugen0.4: <MOSART Semi. 2.4G RF Keyboard  Mouse> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
ugen0.5: <JMicron External USB 3.0> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (2mA)
```
(ugen0.5 correspond to the port the enclosure of bunch is connected)

Here is /etc//devfs.rules

```
[system=10]
        add path 'acd*' mode 0666
        add path 'cd*' mode 0666
        add path 'pass*' mode 0666
        add path 'xpt*' mode 0666
        add path 'ugen0,6' mode 0666
        add path 'usb*' mode 0666
        add path 'ses*' mode 0666
        add path 'udev*' mode 0666
```
and hereis #camcontrol devlist

```
<WDC WD10EZEX-08WN4A0 02.01A02>    at scbus0 target 0 lun 0 (ada0,pass0)
<WDC WD1003FZEX-00K3CA0 01.01A01>  at scbus1 target 0 lun 0 (ada1,pass1)
<PLEXTOR DVDR   PX-891SA 1.06>     at scbus2 target 0 lun 0 (cd0,pass2)
<AHCI SGPIO Enclosure 2.00 0001>   at scbus3 target 0 lun 0 (ses0,pass3)
<External USB 3.0 5203>            at scbus4 target 0 lun 0 (da0,pass4)
<External USB 3.0 5203>            at scbus4 target 0 lun 1 (da1,pass5)
<External USB 3.0 5203>            at scbus4 target 0 lun 2 (da2,pass6)
<External USB 3.0 5203>            at scbus4 target 0 lun 3 (da3,pass7)
<External USB 3.0 5203>            at scbus4 target 0 lun 4 (da4,pass8)
```
and here is the status of the pool :

```
roger@H97M-G43:~ $ zpool status
  pool: Z2Data
 state: ONLINE
config:

    NAME        STATE     READ WRITE CKSUM
    Z2Data      ONLINE       0     0     0
      raidz2-0  ONLINE       0     0     0
        da0     ONLINE       0     0     0
        da1     ONLINE       0     0     0
        da2     ONLINE       0     0     0
        da3     ONLINE       0     0     0
        da4     ONLINE       0     0     0

errors: No known data errors
```
The funny side is that all my config files are unchanged since year 2016 (FreeBSD-10.x) and that the bunch worked fine until upgrade to 12.2 !! Note that at start-up my zpool allows access, and the "sleeping" state occurs only after few minutes without any access; unfortunately zpool does not allows any individual control of the HDD in the bunch! Actually, as the pool is used only for "data" (O.S. and home files are on an different SATA HDD), it is possible to live despite such behaviour! So I could suspect that from FreeBSD-12.2 something is changed in the usb system management ?

Thank you for your answer anyway!


----------



## roger85 (Mar 30, 2021)

Problem "magically" disappeared with 13.0-RC4. Thanks!


----------

