• lower CPU speed

    From Eben King@21:1/5 to All on Wed Oct 23 20:50:01 2024
    I have a variable-speed CPU. Normally the OS manages it. If I want to make less heat inside the case, is it possible to cap it at a certain speed?

    --
    Did they get you to trade your heroes for ghosts? Hot ashes for trees?
    Hot air for a cool breeze? Cold comfort for change?
    Did you exchange a walk-on part in the war for a lead role in a cage?
    -- Pink Floyd, "Wish You Were Here" from _Wish You Were Here_ (1975)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael =?utf-8?B?S2rDtnJsaW5n?=@21:1/5 to All on Wed Oct 23 21:10:01 2024
    On 23 Oct 2024 14:46 -0400, from eben@gmx.us (Eben King):
    I have a variable-speed CPU. Normally the OS manages it. If I want to make less heat inside the case, is it possible to cap it at a certain speed?

    CPU speed is controlled by the CPU frequency governor.

    Set /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor to
    "ondemand" or "conservative" (the main difference is how quickly they
    react to load changes), and /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
    as desired. (Value in the latter is in Hz.) The
    "scaling_available_governors" and "scaling_available_frequencies"
    pseudo-files in the same directory are likely to be instructive.

    You can also set the governor to "powersave" to run the CPU at its
    minimum supported speed.

    The changes will be lost on reboot so you'll need something to reapply
    them during or after a reboot if that's what you want.

    I think the linux-cpupower Debian package provides a nicer CLI
    front-end.

    --
    Michael Kjörling
    🔗 https://michael.kjorling.se

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike@21:1/5 to Eben King on Wed Oct 23 22:30:02 2024
    Eben King wrote:
    I have a variable-speed CPU. Normally the OS manages it. If I want to make less heat inside the case, is it possible to cap it at a certain speed?

    If you're trying to control the heat--i.e., the power dissipation--your BIOS may have a CPU setting for the PL1, Power Limit 1, or such. That would be
    more direct.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Hans on Wed Oct 23 22:50:02 2024
    On Wed, Oct 23, 2024 at 22:46:09 +0200, Hans wrote:
    #:/bin/bash

    cpufreq-set -c 0 -u 800MHz
    cpufreq-set -c 1 -u 800MHz
    cpufreq-set -c 2 -u 800MHz
    cpufreq-set -c 3 -u 800MHz

    For the record, that should be #!/bin/bash instead of #:/bin/bash
    (or you could use #!/bin/sh in this case, since you're not actually
    using any bash extensions).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to Brad Rogers on Wed Oct 23 22:30:02 2024
    On 10/23/24 14:52, Brad Rogers wrote:
    On Wed, 23 Oct 2024 14:46:05 -0400
    Eben King <eben@gmx.us> wrote:

    Hello Eben,

    less heat inside the case, is it possible to cap it at a certain speed?

    Yes. I use cpupower-gui for that sort of thing.

    Is that in the package "linux-cpupower", or where do you get it?

    --
    Remember, if you're not part of the solution,
    you're part of the precipitate.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans@21:1/5 to All on Wed Oct 23 22:50:02 2024
    This is a multi-part message in MIME format.

    Am Mittwoch, 23. Oktober 2024, 20:46:05 CEST schrieb Eben King:
    I have a variable-speed CPU. Normally the OS manages it. If I want to make less heat inside the case, is it possible to cap it at a certain speed?

    Try the command "cpufreq-set" like the example:

    cpufreq-set -c 0 -u 800MHz

    or any frequency your cpu can use.

    I added this command to a little shell script named "cpufreq-min.sh" and copied it to /usr/bin/

    So the cpu is forced to stay low on frequency. There is another script, called "cpufreq-max.sh"
    which does set the opposite, I guess you know the trick.

    Note: You must set each cpu seperately, so if you got i.e. 4 cores, your sript will need 4 lines for
    each core, like:

    ---

    #:/bin/bash

    cpufreq-set -c 0 -u 800MHz
    cpufreq-set -c 1 -u 800MHz
    cpufreq-set -c 2 -u 800MHz
    cpufreq-set -c 3 -u 800MHz

    ---

    This got the advantage, you can control each core seperately.

    Hope this helps.

    Best

    Hans

    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    </head>
    <body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Am Mittwoch, 23. Oktober 2024, 20:46:05 CEST schrieb Eben King:</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; I have a variable-speed CPU.&nbsp; Normally the OS manages it.&nbsp; If I want to make</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; less heat inside the case, is it possible to cap it at a certain speed?</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Try the command &quot;cpufreq-set&quot; like the example:</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><span s
  • From Hans@21:1/5 to All on Wed Oct 23 23:10:01 2024
    This is a multi-part message in MIME format.

    Am Mittwoch, 23. Oktober 2024, 22:47:54 CEST schrieb Greg Wooledge:
    On Wed, Oct 23, 2024 at 22:46:09 +0200, Hans wrote:
    #:/bin/bash

    cpufreq-set -c 0 -u 800MHz
    cpufreq-set -c 1 -u 800MHz
    cpufreq-set -c 2 -u 800MHz
    cpufreq-set -c 3 -u 800MHz

    For the record, that should be #!/bin/bash instead of #:/bin/bash
    (or you could use #!/bin/sh in this case, since you're not actually
    using any bash extensions).

    Yes, of course, just a little typo.

    Tried a second ago, if it still works.

    cpufreq-info | grep "current CPU"
    current CPU frequency is 797 MHz.
    current CPU frequency is 797 MHz.
    current CPU frequency is 797 MHz.
    current CPU frequency is 798 MHz.
    current CPU frequency is 800 MHz.
    current CPU frequency is 800 MHz.
    current CPU frequency is 797 MHz.
    current CPU frequency is 800 MHz.

    Then ran "glxgears", which normally let the cpu raise to full clock speed, but got the same
    result: all cores are 800 MHz.

    I am suing this, when my computer is working and will not need much cpu-power, for example,
    when building a livefile system. Most work then is writing to the harddrive, which does not need
    much cpu power. And no process can suddenly raise my cpu power!

    Such I can do unattended tasks safely. I believe, this is what the op wants to do.

    Hans


    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    </head>
    <body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Am Mittwoch, 23. Oktober 2024, 22:47:54 CEST schrieb Greg Wooledge:</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; On Wed, Oct 23, 2024 at 22:46:09 +0200, Hans wrote:</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; &gt; #:/bin/bash</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; &gt; </p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; &gt; cpufreq-set -c 0 -u 800MHz</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; &gt; cpufreq-set -c 1 -u 800MHz</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; &gt; cpufreq-set -c 2 -u 800MHz</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; &gt; cpufreq-set -c 3 -u 800MHz</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; For the record, that should be #!/bin/bash instead of #:/bin/bash</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; (or you could use #!/bin/sh in this case, since you're not actually</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; using any bash extensions).</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Yes, of course, just a little typo.</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Tried a second ago, if it still works. </p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><span style="background-color:#ffffff;"><span style="color:#000000;"><span style="font-family:monospace;">cpufreq-info | grep &quot;current CPU&quot; </span></span></span><br /> 
    current CPU frequency is 797 MHz. <br /> current CPU frequency is 797 MHz. <br /> current CPU frequency is 797 MHz. <br /> current CPU frequency is 798 MHz. <br /> current CPU frequency is 800 MHz. <br /> current CPU frequency is 800 MHz. <br /> 
    current CPU frequency is 797 MHz. <br /> current CPU frequency is 800 MHz.<br /><br />Then ran &quot;glxgears&quot;, which normally let the cpu raise to full clock speed, but got the same result: all cores are 800 MHz.</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I am suing this, when my computer is working and will not need much cpu-power, for example, when building a livefile system. Most work then is writing to the harddrive, which
    does not need much cpu power. And no process can suddenly raise my cpu power! </p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Such I can do unattended tasks safely. I believe, this is what the op wants to do.</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Hans</p>
    <br /></body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to Hans on Wed Oct 23 23:30:01 2024
    On 10/23/24 17:02, Hans wrote:

    Such I can do unattended tasks safely. I believe, this is what the op wants to do.

    The video card I have (GTX 970) doesn't enable its fan by default, plus
    gives bizarre ever-changing values for fan speed when you ask it. I found a workaround, by disabling and re-enabling each monitor in turn using DPMS.
    But once you've done the workaround the GPU still won't behave _until_ it
    drops to 60C. Which is easy enough if the computer's cold from being off
    all night, but if you just restarted it's already hot in there. So that's
    what I'm going to try, running the CPU slow so it (hopefully) cools down enough.

    --
    Most rock journalism is people who can't write interviewing people who
    can't talk for people who can't read.
    -- Frank Zappa (from MM, Jr)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to Hans on Wed Oct 23 23:20:01 2024
    On 10/23/24 16:46, Hans wrote:
    Am Mittwoch, 23. Oktober 2024, 20:46:05 CEST schrieb Eben King:
    I have a variable-speed CPU. Normally the OS manages it. If I want to make
    less heat inside the case, is it possible to cap it at a certain speed?

    Try the command "cpufreq-set"

    Thanks, it's installed. Hopefully it's enough the next time I need it. BTW
    it was in the package "cpufrequtils".

    I got a warning "W: Download is performed unsandboxed as root as file '/root/.synaptic/tmp//tmp_sh' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)"

    And while that file is readable by non-root users, none of the directories leading up to it are. I don't think that should be a problem if you know
    what you're looking for:

    eben@cerberus:~$ sudo ls -ld /root/.synaptic/tmp/tmp_sh /root/.synaptic/tmp /root/.synaptic /root
    drwx------ 9 root root 4096 Oct 23 16:58 /root
    drwx------ 4 root root 4096 Oct 23 17:00 /root/.synaptic
    drwx------ 2 root root 4096 Oct 23 16:59 /root/.synaptic/tmp
    -rw-r--r-- 1 root root 283682 Sep 23 2021 /root/.synaptic/tmp/tmp_sh


    What's the problem here?

    --
    I love the way Microsoft follows standards. In much the same manner that
    fish follow migrating caribou.
    -- Paul Tomblin

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans@21:1/5 to All on Thu Oct 24 17:10:01 2024
    This is a multi-part message in MIME format.

    Dunno if this helps.

    My cpu is an Intel I7-2670QM.

    The related files, you might need to check are:

    --------------------

    /etc/laptop-mode/conf.d/cpufreq.conf

    As far as I remember I chaned nothing here in the past.

    --------------------

    Second one is:
    /etc/modules

    in here I set the following entries:

    powernow-k8
    cpufreq_powersave
    cpufreq_ondemand
    cpufreq_userspace

    --------------------

    Third one, which might be related:
    /etc/modules-load.d/modules.conf

    In here are alsoi the three entries as above:

    powernow-k8
    cpufreq_powersave
    cpufreq_ondemand
    cpufreq_userspace

    --------------------

    I think, the powernow-k8 entry is no more needed, and is a relic from old times.

    Additionally check

    /etc/laptop-mode/laptop-mode.conf

    Although you might run a desktop computer, the package laptop-mode might be helpfull.


    --------------------
    Hope this helps.

    Best

    Hans


    I think I've got the "powersave" govenor selected and the CPU
    frequency does not stay at the minimum level:

    $ cpufreq-info | grep "current CPU "
    current CPU frequency is 800 MHz.
    current CPU frequency is 800 MHz.
    current CPU frequency is 800 MHz.
    current CPU frequency is 800 MHz.
    current CPU frequency is 800 MHz.
    current CPU frequency is 800 MHz.

    then in another window

    $ while true; do : ; done

    and all the cpus max out

    $ cpufreq-info | grep "current CPU "
    current CPU frequency is 4.10 GHz.
    current CPU frequency is 4.00 GHz.
    current CPU frequency is 4.00 GHz.
    current CPU frequency is 4.00 GHz.
    current CPU frequency is 4.00 GHz.
    current CPU frequency is 4.00 GHz.


    Regards,
    Lee



    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    </head>
    <body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Dunno if this helps.</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">My cpu is an Intel I7-2670QM.</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">The related files, you might need to check are:</p>
    <br /><hr />
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">/etc/laptop-mode/conf.d/cpufreq.conf </p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">As far as I remember I chaned nothing here in the past.</p>
    <br /><hr />
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Second one is:</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&nbsp;/etc/modules</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">in here I set the following entries:</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">powernow-k8</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">cpufreq_powersave</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">cpufreq_ondemand</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">cpufreq_userspace</p>
    <br /><hr />
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Third one, which might be related:</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">/etc/modules-load.d/modules.conf</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">In here are alsoi the three entries as above:</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">powernow-k8</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">cpufreq_powersave</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">cpufreq_ondemand</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">cpufreq_userspace</p>
    <br /><hr />
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I think, the powernow-k8 entry is no more needed, and is a relic from old times.</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Additionally check </p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">/etc/laptop-mode/laptop-mode.conf</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Although you might run a desktop computer, the package laptop-mode might be helpfull.</p>
    <br /><br /><hr />
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Hope this helps.</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Best </p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Hans</p>
    <br /><br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; I think I've got the &quot;powersave&quot; govenor selected and the CPU</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; frequency does not stay at the minimum level:</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; $ cpufreq-info | grep &quot;current CPU &quot;</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp;&nbsp; current CPU frequency is 800 MHz.</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp;&nbsp; current CPU frequency is 800 MHz.</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp;&nbsp; current CPU frequency is 800 MHz.</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp;&nbsp; current CPU frequency is 800 MHz.</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp;&nbsp; current CPU frequency is 800 MHz.</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp;&nbsp; current CPU frequency is 800 MHz.</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; then in another window</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; $ while true; do : ; done</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; and all the cpus max out</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; $ cpufreq-info | grep &quot;current CPU &quot;</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp;&nbsp; current CPU frequency is 4.10 GHz.</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp;&nbsp; current CPU frequency is 4.00 GHz.</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp;&nbsp; current CPU frequency is 4.00 GHz.</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp;&nbsp; current CPU frequency is 4.00 GHz.</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp;&nbsp; current CPU frequency is 4.00 GHz.</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp;&nbsp; current CPU frequency is 4.00 GHz.</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; Regards,</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; Lee</p>
    <br /><br /></body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)