Re: Writing to /sys/../power/autosuspend when not root.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 28 Apr 2020, Dave Mielke wrote:

> [quoted lines by Greg KH on 2020/04/27 at 12:30 +0200]
> 
> >Have a udev rule that turns autosuspend off for each specific USB device
> >that you know does not work with autosuspend.  
> 
> Yes, thanks, that should work. I have another question, though. Our code first
> tries to write "-1" to power/autosuspend, and then, if that fails, it writes
> "0". I'm guessing that "-1" was an older way (but I've forgotten). How can a
> udev rule be written to accommodate that?

See the entry for "/sys/bus/usb/devices/.../power/autosuspend" in
Documentation/ABI/stable/sysfs-bus-usb, or the corresponding entry for
"/sys/devices/.../power/autosuspend_delay_ms" in
Documentation/ABI/testing/sysfs-devices-power.

In short, -1 means "don't autosuspend", whereas 0 means "autosuspend as 
soon as possible".

Alan Stern




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux