• Making a Powertop tunable permanent

    From Ar@2:250/1 to All on Tue Jul 20 17:05:31 2021
    After every reboot (new kernel), I have to go in to Powertop to change
    the USB receiver for laptop mouse and stop it going to sleep. Is there
    any way of making the change permanent?

    When I make the temporary change, it flashes up at the top of the console...

    echo 'on' > '/sys/bus/usb/devices/5-2/power/control';

    It changes from echo 'auto' before changing the device to "bad".

    --- MBSE BBS v1.0.7.22 (GNU/Linux-x86_64)
    * Origin: - (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Tue Jul 20 17:58:11 2021
    On 2021-07-20, Ar <Ar@127.0.0.1> wrote:
    After every reboot (new kernel), I have to go in to Powertop to change
    the USB receiver for laptop mouse and stop it going to sleep. Is there
    any way of making the change permanent?

    When I make the temporary change, it flashes up at the top of the console...

    echo 'on' > '/sys/bus/usb/devices/5-2/power/control';

    It changes from echo 'auto' before changing the device to "bad".
    If that is all it does then you could put that line into
    /etc/rc.d/rc.local (making sure rc.local is executable as owner-group)


    --- MBSE BBS v1.0.7.22 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Tue Jul 20 18:02:54 2021
    On Tue, 20 Jul 2021 12:05:31 -0400, Ar <Ar@127.0.0.1> wrote:

    After every reboot (new kernel), I have to go in to Powertop to change
    the USB receiver for laptop mouse and stop it going to sleep. Is there
    any way of making the change permanent?

    When I make the temporary change, it flashes up at the top of the console...

    echo 'on' > '/sys/bus/usb/devices/5-2/power/control';

    It changes from echo 'auto' before changing the device to "bad".

    Off hand, I think the easiest way would be to use rc.local.

    As root, "touch /etc/rc.d/rc.local" "chmod a+x /etc/rc.d/rc.local", then edit the file and append the line ...
    echo 'on' > '/sys/bus/usb/devices/5-2/power/control'
    to that file so the script is executed on every boot.

    There are probably other ways to accomplish the same thing.

    Regards, Dave Hodgins

    --
    Change dwhodgins@nomail.afraid.org to davidwhodgins@teksavvy.com for
    email replies.

    --- MBSE BBS v1.0.7.22 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)