1

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...

  • I would have picked this question and answer: https://askubuntu.com/a/490401/15811 what is posted there regarding /etc/rc.local (alternatice #1) works on our machines (also 14.04). – Rinzwind Jan 31 '18 at 15:15
  • @Rinzwind Well I'm an idiot. I had a couple of lines in there that made some power adjustments for the internal graphics card. Later I had disabled that graphics card in the BIOS (since I won't be needing it) and the files those lines were trying to write didn't exist (nor the directories). And since the first line of my /etc/rc.local file is #!/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
  • @AndrewLamarra If you found a solution to your problem please add an answer explaining it below and mark it as accepted. – dessert Jan 31 '18 at 16:05

1 Answers1

1

I figured it out. I had a couple of lines in the /etc/rc.local file that made some power adjustments for the internal graphics card. Later I had disabled that graphics card in the BIOS (since I won't be needing it) and the files those lines were trying to write didn't exist (nor the directories). And since the first line of my /etc/rc.local file is #!/bin/sh -e the script quit on the first command that failed. After removing those lines, it seems my powertop changes are working!