Page 1 of 1

[tuto] openSUSE >= 15.3,Tumbleweed,How to get a silent and cold PC ?

Posted: Wed Nov 24, 2021 2:26 pm
by promeneur
0. some problems may occurs:
- cpu too hot
- fah does not decrease its cpu power consumption when you launch an app.
- setting "folding power"to "light" or "medium" does not work

In this case
see the Bruce solution

http://foldingforum.org/viewtopic.php?f ... 37#p307174

or

see my solution

1. I tested Bruce's solution.

The CPU of my PC gets 4 cores.
FAH settings : Power "full" when i am "working"

Result:
- my solution "cpulimit --exe FahCore_a8 --limit 50" : about 32 °C
- Bruce's solution "only one core for folding" : about 42 °C

Bruce's solution is easy but does nor work with gpu fah core
My solution is complex but works with every type (cpu or gpu) fah core.

2. My solution

We can use cpulimit (supplied with standard repos).
See doc
http://cpulimit.sourceforge.net/

You must start an instance of cpulimit for each core fah expects to use. For example in my case fah expects to use a4 and a7 cores then at startup systemd starts one occurrence for a4 and one for a7.

For each occurrence, you must create a service.

In my case, cpu gets 4 cores and I want to limit to 12.5 % the use of each core and FAH expects to use a7 cores. According to the doc, I must set "limit" to "50"

Obviously, you can replace "a7" by any Fahcore name.

in /etc/systemd/system/

create "cpulimit_a7.service" file

put in it

Code: Select all

# /etc/systemd/system/cpulimit_a7.service
#

[Unit]
Description=Run cpulimit for fah a7 core

[Service]
Type=oneshot
ExecStart=/usr/bin/cpulimit --exe FahCore_a7 --limit 50

[Install]
WantedBy=multi-user.target
update its ownership and permissions as below

Code: Select all

$ sudo chown root:root /etc/systemd/system/cpulimit_a7.service
 $ sudo chmod u=rw,go=r /etc/systemd/system/cpulimit_a7.service
Reload systemd manager configuration

Code: Select all

        $ sudo systemctl daemon-reload
with "service manager" tool :
- set cpulimit_a7 service to "activate", "start mode" to "At system startup" then "apply" and check start does not fail

Repeat the procedure for all the FAH cores you expect.

Enjoy

If someone can help. I get a little problem. When with "yast service manager" I start the service then the service is well started, but the dialog does not finish then I must kill the service manager. Perhaps we must add something in the service file.

Re: [tuto] openSUSE 15.3,How to get a silent and cold PC ?

Posted: Thu Nov 25, 2021 6:30 am
by Whompithian
You can condense the steps from:
create "cpulimit_a7.service" file
to

Code: Select all

$ sudo systemctl daemon-reload
into:

Code: Select all

sudo systemctl edit --full --force cpulimit_a7.service
I'm afraid I can't help with the yast problem, though.

Re: [tuto] openSUSE >= 15.3,Tumbleweed,How to get a silent and cold PC ?

Posted: Mon May 15, 2023 10:01 am
by promeneur
A simpler solution that you can customize easily.
It is simpler to modify a bash script than a service file.

Contents of cpulimit.service

Code: Select all


# /usr/lib/systemd/system/cpulimit.service
#

[Unit]
Description=Run cpulimit

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/home/<your id>/bin/cpulimit.sh

[Install]
WantedBy=multi-user.target

Contents of cpulimit.sh

The values of “--limit” are examples. You must customize them.

Code: Select all


#!/bin/bash
# reducing cpu temp, gpu temp and chassis fan noise
cpulimit --exe FahCore_a7 --limit 50 &
cpulimit --exe FahCore_a8 --limit 50 &
cpulimit --exe FahCore_22 --limit 75 &

If you modify the contents of cpulimit.sh then you must restart cpulimit service.

Re: [tuto] openSUSE >= 15.3,Tumbleweed,How to get a silent and cold PC ?

Posted: Tue Feb 20, 2024 5:56 am
by promeneur
Beware that cpulimit can limit only one occurrence of a core.
If you have for example two a8 then only one will be limited by cpulimit.

Here is a script using cpulimit to limit several occurrences of the same app

https://aweirdimagination.net/2020/08/0 ... processes/

I did not experiment this script.

Re: [tuto] openSUSE >= 15.3,Tumbleweed,How to get a silent and cold PC ?

Posted: Wed Feb 21, 2024 11:56 am
by promeneur
For those using MS Windows, there is a clone of cpulimit.

https://github.com/alquerci/cpulimit