On Sat, Mar 12, 2016 at 05:35:17PM -0300, Bruno Schneider wrote: > I have a notebook with Debian testing (Stretch) that gets slow > whenever the power cord is plugged in. I can't figure out the exact > reason for that, but it seems that setting the CPU governor to > performance helps a lot. > > But calling cpufreq-selector is hard for regular users. I wish to make > a script that is called upon power plug events, with root privileges.
The cpufreqd package already does this. Install, and look at /etc/cpufreqd.conf Or, you could poll the command on_ac_power to get the status changes. Joel > I read documentation from acpi and pm-powersave, and from my > understanding, scripts in /etc/pm/power.d/ should be called every time > the power plug status changes with parameters "true" or "false". So I > created a script there, but it seems to be called only at boot time, > and not every time the power plug status changes. > > Can anybody help? > -- > Bruno Schneider > -- Joel Roth