Received: from sonic302-3.consmr.mail.bf2.yahoo.com (sonic302-3.consmr.mail.bf2.yahoo.com [74.6.135.42]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 88E6E78079C for <~alpine/users@lists.alpinelinux.org>; Sun, 29 May 2022 20:16:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1653855404; bh=dpVA2X++CtsaNq0zhw6cdr7Ti9TxKSbuW98RBkmj7bc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From:Subject:Reply-To; b=S0WPmaIMmESA5QRh3G+kLTmCtov50bFXyq2TZUnMbmpBqfhyPTjKTzcRevNLfmNb+JQ2BsMDWFFruZE3jT00oOl0z2UbyyJCsuj6f4QiyFU73jlzSFcYmHIM1SFC8YTGwMvfK4OSKlE6KBG3wGlYw1doumn3Zfa97yKTPEX/SDng5IQ0FChodL6E2dbqSFeqoqwVJvi81V08gGCAhjrWDxteUaM7v/Iw5E8qz1ORBFqzRZLW1D41jQAblQ48uKiRNX5hRcVPo+jKkbFNAB3ozPopL3DlhQ22NMMQCnWLB1LR+nQD9yn59JirvlZ8lj+nSHLli5PJPI8jHeL2jCNYVg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1653855404; bh=2AnijhhNGAtBy9adkc8muD893MZ3zBBpXwFELnUN5xU=; h=X-Sonic-MF:From:Date:Subject:To:From:Subject; b=Imm8O47w3nkYP1a2jghqIphmBCFMkvStONIsc9iQWqUiM4IylmiuFbWr5JIPoB9jxAk+DKkBzortqtdK+/UHG8pDkByNSwatdhDn/2khSJlxukFC+TjkLsmVNe/TTysYjY8eoAx2zG2UzxJ7BkNaYaT5y0l+kXej6j8qRnR25S5nfaCXMR51TvtW4uM+xLvZC7gCef6DeLft6IXXyoYlYObNBe4EPPlFsMWTQ1a2nqIlgzVrsmulObcc5ftmUMit/uDBjwjvTlUyUTQBpPZp3nMAPLc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bf2.yahoo.com with HTTP; Sun, 29 May 2022 20:16:44 +0000 Received: by hermes--canary-production-gq1-54945cc758-2bxrx (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1f3d33f6ad36ec3dff7db8315f929ca3; Sun, 29 May 2022 20:16:43 +0000 (UTC) Received: by mail-yb1-f169.google.com with SMTP id x137so16078448ybg.5 for <~alpine/users@lists.alpinelinux.org>; Sun, 29 May 2022 13:16:43 -0700 (PDT) X-Gm-Message-State: AOAM5307IdBNFWHTY3q33Kh2nHDfur0wlM90txw1D51lLMIcv0QMZV31 iRbWTwT0kqY6jJ8CUs93X7lCQ0AS2VeyfEAUfg== X-Google-Smtp-Source: ABdhPJxtxpNyLIxFeCLsd+QLPqI6iJ/dIYNLkFaHI0DJKn3IKu8fGGs16grNMrEGPgFxwjF1GINhwVplI8FS7tXt/uA= X-Received: by 2002:a25:d311:0:b0:65c:b04d:5f8b with SMTP id e17-20020a25d311000000b0065cb04d5f8bmr6348972ybf.26.1653855401921; Sun, 29 May 2022 13:16:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jerome Marc Date: Sun, 29 May 2022 22:16:31 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Raspberry PI cpufreq To: alice Cc: ~alpine/users@lists.alpinelinux.org Content-Type: multipart/alternative; boundary="000000000000bdd1eb05e02c3718" X-Mailer: WebService/1.1.20225 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo --000000000000bdd1eb05e02c3718 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Alice, Thank you very much. You are perfectly right however I investigated and found interesting results. Yes it's a PI 1B model that I used for years as a media center. I want to use it as a home gateway (smart home and various network services) therefore it will be online 24/24 7/7 this is the reason why I wanted to limit energy consumption as much as possible... First of all, arm_freq_min has been disabled in the latest firmwares. Basically you cannot set a value lower than the factory value. But there is a workaround : if you set arm_freq with a low value you get a similar result. Don't tell it loud else the firmware devs could block this as well. I applied these settings : arm_freq =3D100 gpu_freq_min=3D100 gpu_mem=3D32 initial_turbo=3D60 And I activated the conservative governor All is working fine : At idle cpu and gpu are running at 100 and on load they run at standard levels. I verified the gains with a wattmeter and I was very disappointed :-). Basically the gain was about 0.1 watt (drop from 2.3 to 2.2). The measure was done at the wall with ethernet connected. Disconnecting the ethernet cable made the power consumption drop to about 1.5w Yes, it's disappointing. I was hoping to be close to 1w. The RPI 1B is quite power hungry because of a poorly designed power circuit, that's it. However I think I reduced the heat which is a good thing. The system is still snappy despite running at low freq when idling. Didn't have any crashes so far. I even tried to reduce the voltage at idle using over_voltage_min=3D-4 but this led to mmc errors in the log and the SD card was corrupted. Jerome Le dim. 29 mai 2022 =C3=A0 04:14, alice a =C3=A9crit : > On Sun May 29, 2022 at 1:16 AM CEST, Jerome Marc wrote: > > Hi, > > > > I just installed Alpine 16 on an old Raspberry PI B. > > I want to use the ondemand governor and set the freq between 100 and 70= 0. > > Unfortunately it looks like the arm_freq_min is ignored. > > if I set : > > arm_freq=3D700 > > arm_freq_min=3D500 > > > > cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies > > returns 700000 only > > > > But if I set > > arm_freq=3D500 > > > > cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies > > returns 700000 500000 > > > > Strange isn't it ? Did I misunderstand something? Or is there a bug in > the > > fernel/firmware ? > > https://www.raspberrypi.com/documentation/computers/config_txt.html is > your friend :) > > i don't remember which gen the Pi B is from (i assume 1?), but it is not > recommended to ever set the minimum below the default, nor are there any > real power savings from it (and it's not supported). so, just keep it at > the default of 700. > > as for where the issue lies, it's in the rpi firmware that reads the > values and applies things- if it ignores it, then it's just ignored, > unrelated to the kernel. > --000000000000bdd1eb05e02c3718 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0 Alice,

Thank you very much. You are = perfectly right however I investigated and found interesting results. Yes i= t's a PI 1B model that I used for years as a media center.
I = want to use it as a home gateway (smart home and various network services) = therefore it will be online 24/24 7/7 this is the reason why I wanted to li= mit energy consumption=C2=A0as much as=C2=A0possible...

First of all, arm_freq_min has been disabled in the latest firmwares.= Basically you cannot set a value lower than the factory value. But there i= s a workaround : if you set arm_freq with a low value you get a similar res= ult. Don't tell it loud else the firmware devs could block this as well= . I applied these settings :

arm_freq =3D100
gpu_freq_min=3D100
gpu_mem=3D32
initial_= turbo=3D60
And I activated the conservative governor
Al= l is working fine : At idle cpu and gpu are running at 100 and on load they= run at standard levels.
I verified the gains with a wattmeter an= d I was very disappointed=C2=A0:-). Basically the gain was about 0.1 watt (= drop from 2.3 to 2.2). The measure was done at the wall with ethernet conne= cted. Disconnecting the ethernet cable made the power consumption drop to a= bout 1.5w

Yes, it's disappointing. I was hopin= g to be close to 1w. The RPI 1B is quite power hungry because of a poorly d= esigned power circuit, that's it. However I think I reduced the heat wh= ich is a good thing. The system is still snappy despite running=C2=A0 at lo= w freq when idling. Didn't have any crashes so far.

I even tried to reduce the voltage at idle using over_voltage_min=3D-= 4 but this led to mmc errors in the log and the SD card was corrupted.

Jerome


Le=C2=A0dim. 29 mai 2022 =C3=A0=C2=A004:14, alice <alice@ayaya.dev> a =C3=A9crit=C2=A0:
On Sun May 29, 2022 at 1:16 A= M CEST, Jerome Marc wrote:
> Hi,
>
> I just installed Alpine 16 on an old Raspberry PI B.
> I want to use the ondemand governor and set the freq between 100 and 7= 00.
> Unfortunately it looks like the arm_freq_min is ignored.
> if I set :
> arm_freq=3D700
> arm_freq_min=3D500
>
> cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies=
> returns 700000 only
>
> But if I set
> arm_freq=3D500
>
> cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies=
> returns 700000 500000
>
> Strange isn't it ? Did I misunderstand something? Or is there a bu= g in the
> fernel/firmware ?

https://www.raspberrypi.com/docum= entation/computers/config_txt.html is
your friend :)

i don't remember which gen the Pi B is from (i assume 1?), but it is no= t
recommended to ever set the minimum below the default, nor are there any real power savings from it (and it's not supported). so, just keep it a= t
the default of 700.

as for where the issue lies, it's in the rpi firmware that reads the values and applies things- if it ignores it, then it's just ignored, unrelated to the kernel.
--000000000000bdd1eb05e02c3718--