Topic: Start powertop at boot
this is a long post, so please be patient .
I am using a librebooted x200, so as described here, I need to install powertop and start it at boot.
As the instructions given in the site doesn't apply to an alternative init system like openrc, I needed to find another method.
Furthermore, I have to disable the use of powertop in two external usb devices, so the commands I need to run in boot time are:
/usr/sbin/powertop --auto-tune echo 'on' > '/sys/bus/usb/devices/1-2.2/power/control'; echo 'on' > '/sys/bus/usb/devices/1-2.5/power/control';
I tried to add them in cron like this:
@reboot /usr/sbin/powertop --auto-tune @reboot echo on | doas /sys/bus/usb/devices/1-2.2/power/control @reboot echo on | doas /sys/bus/usb/devices/1-2.5/power/control
but although powertop starts, the 2nd and 3d command don't work. (Also I have tried more compinations with or without doas.)
What I ended up doing, and it worked, was to add the commands to ~/.xinitrc and also adjusting the /etc/doas.conf accordingly. I don't like messing with doas.conf though, and maybe there is something new for me to learn, so my question is if there is a better (more secure?) alternative for this.
Even if the siege is closing in around us.
Our mind is like a wanderer, and will always be free.