You are not logged in.

#1 2016-01-16 23:07:33

Iyyel
Member
From: Australia in the US of A
Registered: 2015-12-20
Posts: 36
Website

Automatically start script/command at startup, best way?

Hello.

So, I have a small command that I would like to be executed at startup of the machine. The command is the following code.

sudo cpupower frequency-set -g powersave

since I would like the cpu governor to be powersave, at all times. It seems however, that after a reboot, this goes away.

I apologize if this is too simple of a thread, but I would just like to know the best possible way to do this.

So far, I have been looking to make a .service file to make it execute, but not quite sure if that is needed, or if I could do it more simpler, with cpupower in some way.

I appreciate all feedback, thank you.

Offline

#2 2016-01-16 23:11:06

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Automatically start script/command at startup, best way?

Offline

#3 2016-01-16 23:37:33

Iyyel
Member
From: Australia in the US of A
Registered: 2015-12-20
Posts: 36
Website

Re: Automatically start script/command at startup, best way?

Head_on_a_Stick wrote:

I should probably have included that, my bad.

I have a Macbook Pro 15-inch, mid-2015 with the upgraded i7 4980HQ.

If you want more information, this is how my system is configured so far. I followed some optimization tips specific for macbook, saying that it was clever to disable intel_pstate for battery performance.

[iyyel@archbook ~]$ cpupower frequency-info
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.80 GHz
  available frequency steps: 2.80 GHz, 2.80 GHz, 2.60 GHz, 2.40 GHz, 2.10 GHz, 1.90 GHz, 1.70 GHz, 1.50 GHz, 1.20 GHz, 1000 MHz, 800 MHz
  available cpufreq governors: powersave, ondemand, performance
  current policy: frequency should be within 800 MHz and 2.80 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.
  cpufreq stats: 2.80 GHz:0,09%, 2.80 GHz:0,00%, 2.60 GHz:0,02%, 2.40 GHz:0,02%, 2.10 GHz:0,02%, 1.90 GHz:0,02%, 1.70 GHz:0,02%, 1.50 GHz:0,04%, 1.20 GHz:0,06%, 1000 MHz:0,34%, 800 MHz:99,38%  (852)
  boost state support:
    Supported: yes
    Active: yes
[iyyel@archbook ~]$ 

Offline

#4 2016-01-16 23:40:37

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Automatically start script/command at startup, best way?

Iyyel wrote:

i7 4980HQ

I think you should be using the pstate governor.

I am not expert in this subject though so wait for more replies.

Offline

#5 2016-01-16 23:43:51

Iyyel
Member
From: Australia in the US of A
Registered: 2015-12-20
Posts: 36
Website

Re: Automatically start script/command at startup, best way?

Head_on_a_Stick wrote:
Iyyel wrote:

i7 4980HQ

I think you should be using the pstate governor.

I am not expert in this subject though so wait for more replies.

No problem, thanks for your reply.

Just to make stuff more clear, I was following this: http://www.newnix.space/blog/2015/7/23/ … d-machines

Still open for answers to the question in the OP. smile

EDIT: I've reverted the changes. I now use intel_pstate driver, with the intel_pstate powersave governer.

If anyone could tell me what they recommend, as in intel_pstate with powersave governer, or for example acpi_cpufreq with ondemand.

Any recommendations for best performance/battery?

Thank you.

Last edited by Iyyel (2016-01-17 00:05:27)

Offline

Board footer

Powered by FluxBB