During a normal installer process, the installer asks if a number of services should be enabled by default. On the Raspberry Pi pre-built image, this is a pre-installed system where these configuration options are never presented. By default, the Raspberry Pi 4 is locked to only 600 MHz unless powerd is running. There is currently no obvious way to know that the performance of this board is being limited without digging into sysctl. This could lead users to assume that "FreeBSD is unoptimized and slow" compared to other OSes. Right now, the only note I'm aware of about this particular issue is at the very bottom of a Wiki page. This isn't a good end-user experience to have to hunt down this information, especially if they don't even know what to look for to begin with. https://wiki.freebsd.org/arm/Raspberry%20Pi#RPI4 Because of these, I believe that powerd should be enabled by default in the Raspberry Pi specific images that are generated.
@Reporter Can this change proposal be interpreted as 'installer: Show service screen to ARM and/or RPi build/image users ' as in, is this relevent, useful or valuable to users for services beyond powerd either at present or in the future?
It might be nice to show part of the installer process during "first boot" In regards to powerd specifically though, the Raspberry Pi 4 is severally limited in compute power without it running, since it defaults to ~1/3rd its rated clock speed. This has a significant end-user impact. But yeah, right now, no "installer" is displayed at all for the Raspberry Pi, since it is a pre-built image. If we could at least get some sort of message on boot, or an interactive menu on first-boot, that would at least be a start (plus allowing for other service configurations too)
(In reply to Vincent Milum Jr from comment #2) Thanks Vincent. Could you please create a separate issue for 'installer: Enable service configuration on <relevent arch/build scription>" and See Also: this issue Can/should this be addressed in supported stable/* branches, and/or enabled for next patch levels of existing releases?
As much as I understand the intention I think we should try to keep all platforms and/or arches as consistent as possible. Similar topic has been up for discussion regarding kernel configuration between aarch64 and amd64 primarily.
This wouldn't be a kernel config change though. This is a single-line addition to the rc.conf specific to the Raspberry Pi pre-built image, which also has other Raspberry Pi specific customizations (like u-boot). Normally I'd agree to keep everything as close to the same as possible, but in the case of the Raspberry Pi image specifically, the hardware is severely limited in performance without this. That's not a good experience for end-users trying out FreeBSD for the first time (a common use case for the Raspberry Pi). We're used to x86 systems that default to a high-power state unless powerd is enabled. Raspberry Pi is acting in the opposite fashion, defaulting to a lower-power state. If we want things to be consistent, then enabling powerd seems more like a requirement then to bring the system more in-line with x86 default expectations.
I just got bitten by this while trying to improve the performance of my pi400 by overclocking and only discovered the requirement for powerd when I tried to check to see if the overclock config was correct. IMO, powerd should be enabled by default for the same reasons as the OP.
At this point with how important power management is on ALL systems, I really believe this should now be default on -all- FreeBSD images.
(In reply to dfr from comment #6) FYI: If you can tolerate a fixed frequency, there is (some context shown as well): # sysctl dev.bcm2835_cpufreq.0.freq_settings dev.bcm2835_cpufreq.0.freq_settings: 1500/-1 600/-1 (1500 MHz and 600 MHz) I'll note that settings in the RPi*'s config.txt can change that list of possibilities (via presenting different device tree details via the firmware adjusting the tree to match). The RPI* firmware version used also can change the default for that list. # sysctl hw.cpufreq.arm_freq hw.cpufreq.arm_freq: 600000000 # sysctl hw.cpufreq.arm_freq=1500000000 hw.cpufreq.arm_freq: 600000000 -> 1500000000 /etc/sysctl.conf can be used to set the figure. Systems that do not support cpufreq (and, so, do not support powerd) can sometimes be handled similarly (but using the appropriate naming). This note is not about if powerd should vs. should-not be enabled by default if there is no one interested in being the one to make the implementation change. Just think of this note as documenting a workaround given how things are. I normally use a fixed frequency, but I normally do all the control from config.txt instead of from FreeBSD.
<https://reviews.freebsd.org/D43141> This can be solved by creating a separate ISO for RPI4
(In reply to Minsoo Choo from comment #9) The Raspberry Pi ALREADY has a separate dedicated image, that's exactly what this is about.
The current 64-bit RPI image is shared by multiple models, including 3B+ and 4B. However, the RPi 3B+ can benefit from enabling powerd as well, as can derivatives of the 4B. I don't see any reason not to enable powerd on the current RPI image.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=4347ef60501f2a55ad31f7532ad903b81f3af18f commit 4347ef60501f2a55ad31f7532ad903b81f3af18f Author: Mike Karels <karels@FreeBSD.org> AuthorDate: 2024-01-05 19:41:24 +0000 Commit: Mike Karels <karels@FreeBSD.org> CommitDate: 2024-01-05 19:41:24 +0000 arm64/RPI: enable powerd by default on arm64-aarch64-RPI images Most 64-bit Raspberry Pi models have a variable processor clock speed that defaults to a slow speed (e.g. 600 MHz for a nominal 1.5 GHz clock). This results in everything running slowly unless or until powerd is started, and FreeBSD is then thought to be slow. Enable powerd by default in /etc/rc.conf on the arm64-aarch64-RPI images. Tested on Raspberry Pi 3B+ and 4B so far. PR: 256836 MFC after: 1 month Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D43296 release/arm64/RPI.conf | 1 + release/tools/arm.subr | 3 +++ 2 files changed, 4 insertions(+)
I'll note that: https://lists.freebsd.org/archives/freebsd-arm/2023-December/003467.html is a report of needing to disable powerd to get reliability for some tip / sshd use. (I expect tip-to-serial-console from one RPi* to another is the actual issue but more evidence gathering is needed.)
(In reply to Mark Millard from comment #13) Bad reference to the tip/ssh vs. powerpd issue: trying again . . . https://lists.freebsd.org/archives/freebsd-arm/2024-January/003478.html
(In reply to Mark Millard from comment #14) I think this is a case that will require hand configuration to get acceptable results in any case, and is a fairly rare case. I tested a serial console over a period of about a day, and saw nothing strange (although there was little console output). I even saw changes in CPU speed while doing output, which didn't seem to get scrambled.
(In reply to Mike Karels from comment #15) It may be worth a note mentioning the subject area with the issue once it is isolated: avoiding unnecessary surprises that are messy to track down to a specific type of context. I do not take the issue as an indication to avoid powerd by default. (It should be easy and clear how to disable, which appears to be the case.) It is just a messier context than one would hope.
(In reply to Mark Millard from comment #16) Bob P. has reported getting a failure when no systems were running powerd . It may be that powerd only contributes some to how frequently the issue happens during buildworld and such activities that produce a heavy load. But it is now known to not be required to be involved. So: no need for a note for the issue.
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=0c6e3bfd13621cfa2dbc432b08cbfb3dcf012d87 commit 0c6e3bfd13621cfa2dbc432b08cbfb3dcf012d87 Author: Mike Karels <karels@FreeBSD.org> AuthorDate: 2024-01-05 19:41:24 +0000 Commit: Mike Karels <karels@FreeBSD.org> CommitDate: 2024-01-30 20:10:00 +0000 arm64/RPI: enable powerd by default on arm64-aarch64-RPI images Most 64-bit Raspberry Pi models have a variable processor clock speed that defaults to a slow speed (e.g. 600 MHz for a nominal 1.5 GHz clock). This results in everything running slowly unless or until powerd is started, and FreeBSD is then thought to be slow. Enable powerd by default in /etc/rc.conf on the arm64-aarch64-RPI images. Tested on Raspberry Pi 3B+ and 4B so far. PR: 256836 Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D43296 (cherry picked from commit 4347ef60501f2a55ad31f7532ad903b81f3af18f) release/arm64/RPI.conf | 1 + release/tools/arm.subr | 3 +++ 2 files changed, 4 insertions(+)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e889b5a892b63e5868ffbcbf82f55cbe79dda5ac commit e889b5a892b63e5868ffbcbf82f55cbe79dda5ac Author: Mike Karels <karels@FreeBSD.org> AuthorDate: 2024-01-05 19:41:24 +0000 Commit: Mike Karels <karels@FreeBSD.org> CommitDate: 2024-01-30 20:10:56 +0000 arm64/RPI: enable powerd by default on arm64-aarch64-RPI images Most 64-bit Raspberry Pi models have a variable processor clock speed that defaults to a slow speed (e.g. 600 MHz for a nominal 1.5 GHz clock). This results in everything running slowly unless or until powerd is started, and FreeBSD is then thought to be slow. Enable powerd by default in /etc/rc.conf on the arm64-aarch64-RPI images. Tested on Raspberry Pi 3B+ and 4B so far. PR: 256836 Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D43296 (cherry picked from commit 4347ef60501f2a55ad31f7532ad903b81f3af18f) release/arm64/RPI.conf | 1 + release/tools/arm.subr | 3 +++ 2 files changed, 4 insertions(+)
This has been done on main, stable/14, and stable/13. stable/12 is EOL.