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

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

 



On Sun, Apr 26, 2020 at 03:08:38PM -0400, Dave Mielke wrote:
> We're working on getting brltty to run as an unprivileged user with just a few
> required capabilities. We don't want one of those required capabilities to be
> CAP_DAC_OVERRIDE (bypass file permission checks).
> 
> Some USB-connected braille devices don't respond very well to being
> autosuspended. We get around this, when running as root, by writing to the
> SYSFS power/autosuspend file associated with the device. Our problem is that
> only the root user can write to it.
> 
> Other than using CAP_DAC_OVERRIDE (which we don't want to do), what other
> way(s) might we be able to use to overcome this restriction? For example, is
> there some kind of safe (enough) udev rule?

Have a udev rule that turns autosuspend off for each specific USB device
that you know does not work with autosuspend.  Do you have such a list?

If so, we can add it to the USB core with the
USB_QUIRK_DISCONNECT_SUSPEND flag.  Or is it the USB_QUIRK_NO_LPM that
they need?  I can't remember, but you can test it out from userspace
by reading about those in the
Documentation/admin-guide/kernel-parameters.txt file.

Hope this helps,

greg k-h



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

  Powered by Linux