# [not solved] udisk CONFIG_USB_SUSPEND

## emc

Hi,

I really like to use USB Power Suspend beside udisk req. and (as far as I know powertop)

 *Quote:*   

>  ERROR (setup)
> 
>   CONFIG_USB_SUSPEND:  is not set when it should be.
> 
>   WARN (setup)
> ...

 

But when I enable in kernel my touchpad and mouse when is not use form 2 sec is turned off. There is any way to use USB_SUSPEND without this behavior?Last edited by emc on Mon Apr 08, 2013 7:18 pm; edited 2 times in total

----------

## syn0ptik

try to make

echo 0 > /sys/bus/usb/devices/usb1/power/autosuspend

----------

## emc

Help text from kernel:

 *Quote:*   

> CONFIG_USB_SUSPEND:
> 
>    If you say Y here, you can use driver calls or the sysfs
> 
>    "power/control" file to enable or disable autosuspend for
> ...

 

So pobably is control, right?:

```
# pwd

/sys/bus/usb/devices/usb1/power

# grep '' *

async:enabled

autosuspend_delay_ms:0

control:auto

runtime_active_kids:0

runtime_active_time:9268759

runtime_enabled:enabled

runtime_status:active

runtime_suspended_time:0

runtime_usage:0

wakeup:disabled

wakeup_abort_count:

wakeup_active:

wakeup_active_count:

wakeup_count:

wakeup_expire_count:

wakeup_last_time_ms:

wakeup_max_time_ms:

wakeup_total_time_ms:
```

So, I will compile new kernel. Should I paste disable into control file?

How I can verify which usb is which, I have:

```
# pwd

/sys/bus/usb/devices

# ls -l

total 0

lrwxrwxrwx 1 root root 0 Mar 27 12:38 1-0:1.0 -> ../../../devices/pci0000:00/0000:00:12.0/usb1/1-0:1.0

lrwxrwxrwx 1 root root 0 Mar 27 12:38 2-0:1.0 -> ../../../devices/pci0000:00/0000:00:13.0/usb2/2-0:1.0

lrwxrwxrwx 1 root root 0 Mar 27 12:38 3-0:1.0 -> ../../../devices/pci0000:00/0000:00:15.2/0000:07:00.0/usb3/3-0:1.0

lrwxrwxrwx 1 root root 0 Mar 27 12:38 4-0:1.0 -> ../../../devices/pci0000:00/0000:00:15.2/0000:07:00.0/usb4/4-0:1.0

lrwxrwxrwx 1 root root 0 Mar 27 11:39 5-0:1.0 -> ../../../devices/pci0000:00/0000:00:12.2/usb5/5-0:1.0

lrwxrwxrwx 1 root root 0 Mar 27 11:39 6-0:1.0 -> ../../../devices/pci0000:00/0000:00:13.2/usb6/6-0:1.0

lrwxrwxrwx 1 root root 0 Mar 27 11:39 6-2 -> ../../../devices/pci0000:00/0000:00:13.2/usb6/6-2

lrwxrwxrwx 1 root root 0 Mar 27 11:39 6-2:1.0 -> ../../../devices/pci0000:00/0000:00:13.2/usb6/6-2/6-2:1.0

lrwxrwxrwx 1 root root 0 Mar 27 11:39 6-4 -> ../../../devices/pci0000:00/0000:00:13.2/usb6/6-4

lrwxrwxrwx 1 root root 0 Mar 27 11:39 6-4:1.0 -> ../../../devices/pci0000:00/0000:00:13.2/usb6/6-4/6-4:1.0

lrwxrwxrwx 1 root root 0 Mar 27 11:39 6-4:1.1 -> ../../../devices/pci0000:00/0000:00:13.2/usb6/6-4/6-4:1.1

lrwxrwxrwx 1 root root 0 Mar 27 12:38 usb1 -> ../../../devices/pci0000:00/0000:00:12.0/usb1

lrwxrwxrwx 1 root root 0 Mar 27 12:38 usb2 -> ../../../devices/pci0000:00/0000:00:13.0/usb2

lrwxrwxrwx 1 root root 0 Mar 27 12:38 usb3 -> ../../../devices/pci0000:00/0000:00:15.2/0000:07:00.0/usb3

lrwxrwxrwx 1 root root 0 Mar 27 12:38 usb4 -> ../../../devices/pci0000:00/0000:00:15.2/0000:07:00.0/usb4

lrwxrwxrwx 1 root root 0 Mar 27 11:39 usb5 -> ../../../devices/pci0000:00/0000:00:12.2/usb5

lrwxrwxrwx 1 root root 0 Mar 27 11:39 usb6 -> ../../../devices/pci0000:00/0000:00:13.2/usb6

# lsusb -t

/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M

    |__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M

    |__ Port 4: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M

    |__ Port 4: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M

/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M

/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M

/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M
```

----------

## emc

find out:

```
# lsusb -v | grep iSerial

  iSerial                 3 058F63666433

  iSerial                 2 0x0001

  iSerial                 1 0000:00:12.0

  iSerial                 1 0000:00:13.0

  iSerial                 1 0000:07:00.0

  iSerial                 1 0000:07:00.0

  iSerial                 1 0000:00:12.2

  iSerial                 1 0000:00:13.2
```

----------

## emc

I didn't change anything. My USB mosee in fact was disable when USB port was power off due to USB_SUSPEND, but after few times plug-in/plug-out, start working after that (I mean power off didn't suspend mouse to working).

----------

## emc

Anyway I add not into: http://wiki.gentoo.org/wiki/USB_Power_Saving

----------

## emc

Hi,

I didn't solved issue. Still after reboot I have plug-in/out mouse to get it working. I try play around 'rw' files in /sys/bus/usb/devices/usb[1-6]/power, but I can write to them even when I'm root:

```
# ls -la

-r--r--r-- 1 root root 4096 Apr  8 21:17 active_duration

-rw-r--r-- 1 root root 4096 Apr  8 21:17 async

-rw-r--r-- 1 root root 4096 Apr  8 20:59 autosuspend

-rw-r--r-- 1 root root 4096 Apr  8 21:17 autosuspend_delay_ms

-r--r--r-- 1 root root 4096 Apr  8 21:17 connected_duration

-rw-r--r-- 1 root root 4096 Apr  8 20:59 control

-rw-r--r-- 1 root root 4096 Apr  8 21:17 level

-r--r--r-- 1 root root 4096 Apr  8 21:17 runtime_active_kids

-r--r--r-- 1 root root 4096 Apr  8 21:17 runtime_active_time

-r--r--r-- 1 root root 4096 Apr  8 21:17 runtime_enabled

-r--r--r-- 1 root root 4096 Apr  8 21:17 runtime_status

-r--r--r-- 1 root root 4096 Apr  8 21:17 runtime_suspended_time

-r--r--r-- 1 root root 4096 Apr  8 21:17 runtime_usage

-rw-r--r-- 1 root root 4096 Apr  8 21:17 wakeup

-r--r--r-- 1 root root 4096 Apr  8 21:17 wakeup_abort_count

-r--r--r-- 1 root root 4096 Apr  8 21:17 wakeup_active

-r--r--r-- 1 root root 4096 Apr  8 21:17 wakeup_active_count

-r--r--r-- 1 root root 4096 Apr  8 21:17 wakeup_count

-r--r--r-- 1 root root 4096 Apr  8 21:17 wakeup_expire_count

-r--r--r-- 1 root root 4096 Apr  8 21:17 wakeup_last_time_ms

-r--r--r-- 1 root root 4096 Apr  8 21:17 wakeup_max_time_ms

-r--r--r-- 1 root root 4096 Apr  8 21:17 wakeup_total_time_ms
```

Whey I try edit: autosuspend, autosuspend_delay_ms, control, level or wakeup I got:

```
"control"

"control" E667: Fsync failed

Press ENTER or type command to continue
```

or simply:

```
# echo "disabled" > control 

bash: echo: write error: Invalid argument
```

I have 2 question where and what should I put to disabled power saving form USB port and how to make it parnament? Should I type disable in control or 0 in autosuspend?

----------

## sikpuppy

Is the problem you can't set kernel flag "CONFIG_USB_SUSPEND?".  If that's the case then you need to go:

Power management and ACPI options -> [*] Run-time PM core functionality.

Then the entry will be visible:

Device Drivers -> USB Support -> [*]  USB runtime power management (autosuspend) and wakeup.

Took me a while to figure this out.

----------

## emc

No, problem I have is: I want disable power suspend in one USB port since my mouse is unable to activate after power was cut. I need replug mouse to make it work.

----------

## RobPearce

 *sikpuppy wrote:*   

> Is the problem you can't set kernel flag "CONFIG_USB_SUSPEND?".  If that's the case then you need to go:
> 
> Power management and ACPI options -> [*] Run-time PM core functionality.
> 
> Then the entry will be visible:
> ...

 

And now, as of kernel 3.11, the option no longer exists.

----------

## sikpuppy

 *RobPearce wrote:*   

>  *sikpuppy wrote:*   Is the problem you can't set kernel flag "CONFIG_USB_SUSPEND?".  If that's the case then you need to go:
> 
> Power management and ACPI options -> [*] Run-time PM core functionality.
> 
> Then the entry will be visible:
> ...

 No?  Where's it gone?  Has it been replaced by something similar?  Have you thoroughly looked behind the couch cushions and under the floor mats of your car?  If you haven't then your journey is only just beginning.

*edit* Plus the 3.11 has only been out for a week or so.  If you desperately need such a new kernel perhaps you might expect things to be slightly pear shaped, at least until the kernel herd remove the keyword.  Have you heard of the Kernel?  Has the kernel herd heard from you?  If not, chop chop.

----------

