Score:0

Script not working correctly (powertop)

cn flag

I am trying to improve my laptop's energy consumption by using powertop and a script to change the settings after booting.The script I made is based on the answer of Ric Klaren under this post: `powertop --auto-tune` without messing with USB and touchpad

Here's the script:

#!/bin/bash
powertop --auto-tune
HIDDEVICES=3-1
for i in ; do
  echo -n "Enabling " | cat - /sys/bus/usb/devices//product
  echo 'on' > /sys/bus/usb/devices//power/control
done

Somehow it does not work as intended and enables every option, as well as those concerning my USB mouse. Here's the output, if I run the script:

modprobe cpufreq_stats failedLoaded 127 prior measurements  
RAPL device for cpu 0  
RAPL Using PowerCap Sysfs : Domain Mask d  
RAPL device for cpu 0  
RAPL Using PowerCap Sysfs : Domain Mask d  
Devfreq not enabled  
glob returned GLOB_ABORTED  
To show power estimates do 221 measurement(s) connected to battery only  
Leaving PowerTOP

Thanks!

muru avatar
us flag
Your script as given won't do anything because the loop is empty, so it can't possibly show the output you say it does.
Martin Thornton avatar
cn flag
You removed all the `$VARIABLES` from the script. Try putting them back!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.