This should be a simple matter of running a shell script at boot, but for some reason I can't seem to get it to work. I have a Security Onion machine (Ubuntu 14.04) and I'd like to run the PowerTOP recommended changes on boot (without anyone having to log in). I've tried all 3 methods in the accepted answer here. But each time I reboot, I run sudo powertop
and the Tunables tab shows the entries as "Bad" again. I also check some of the individual files just to confirm that the changes were not made. I've tried running a script on boot that executes all the recommended 'echo' commands (and I'm quite familiar with creating shell scripts so I know about the shebang & chmod +x) and I've tried just running powertop --auto-tune
on boot. Am I missing something?
Funny thing is, if this was a newer version of Ubuntu using Systemd, I'm sure this would be much easier...
#!/bin/sh -e
the script quit on the first command that failed. After removing those lines, it seems my powertop changes are working! Still not sure why I couldn't get it to work with either Upstart or Sysvinit... – Andrew Lamarra Jan 31 '18 at 16:01