The Raspberry Pi 5 power management IC
PMIC
is the Renesas DA9091, a chip
specifically designed
for the Pi 5.
The Raspberry Pi 3B+ and
Raspberry Pi 4 PMIC
is the MaxLinear MXL7704.
Older Raspberry Pi models used
custom circuitry
or the
APX803
instead of a COTS PMIC to handle sequencing of discrete DC power input to the Pi subsystems.
It has been
noted
that damaging the PMIC can make the Raspberry Pi too difficult to repair.
A yellow lightning bolt is GPU-superimposed on the Raspberry Pi display output for low voltage.
In general computing platform operation is not guaranteed with voltages out of tolerance.
The SD card can become unreadable, the Pi may have random malfunctions, and corrupt data (bad writes) on the SD card.
Raspberry Pi 4 and Pi 5 require a minimum 5 Volt 3.0 Amp power supply.
Using peripherals can require higher current supply.
The cable between the power supply and Raspberry Pi must be of good quality to minimize voltage drop and unstable operation.
The USB-C power connector of the Raspberry Pi 4 and Pi 5 is markedly more robust than the micro-USB power connector of legacy Raspberry Pi models.
If the DC input voltage falls below 4.65 volts (depending on Raspberry Pi model and firmware), the GPU superimposes a lightning bolt graphic on the display output.
This may not be visible on a VNC remote desktop.
The Raspberry Pi 5 added
vcgencmd pmic_read_adc
to read DC input voltage and the several generated voltages and currents consumed.
On older Raspberry Pi models there is no built-in capability to measure the Raspberry Pi DC input voltage without adding an external ADC.
On the older Raspberry Pi (older than Pi 5) it may be possible to read the input voltage binary state (OK or low) from the Terminal, but we have not confirmed this.
On the Raspberry Pi 1 B+ and Pi 2 it may be possible to
read state of GPIO 35,
depending on the hardware and firmware.
On the Raspberry Pi 3 in may be possible to
read GPU-driven LED status.
When compiling programs with concerns about excessive power consumption, consider not compiling in parallel.
For GNU Make, “make -j1” uses 1 CPU core.
For Ninja compilation in parallel is default, so specify “ninja -j1” for one build thread.
For meta-build systems limit build parallelism like CMake
cmake --build build -j1
or Meson
meson compile -j1
lynx
is a text web browser that allows browsing certain websites without need for a graphical display.
Several other text-based web browsers for Terminal are available, and while they offer some measure of increased security due to their lacking JavaScript or easily disabling JS, there have been CVEs for these web browsers as well.
With this type of browser using a custom engine, the web-browsing data bandwidth can be dramatically less than with general graphical web browsers as the graphics and JavaScript might simply be ignored and not downloaded.
This orders of magnitude reduction in data usage can be useful for those with limited data plans or slow connections.
This can be useful at remote arctic sites or on a satellite connection.
However, the lack of a general web browser backend engine like Chrome or Firefox can lead to many websites not rendering properly or at all.
An alternative approach is to render the website remotely and send only rendered text over a secure connection like SSH.
This achieves dramatic data bandwidth reduction to the remote site by rendering at a server with a normal full internet connection.
An implementation of this approach using a headless Mozilla Firefox is
browsh.
Browsh
keybindings
or mouse can be used to browse the web in the Terminal.
On Windows, Browsh can be installed by
winget:
Certain platforms default or have defaulted to use a 32-bit time_t, which will
overflow in year 2038.
To check if the platform uses a 64-bit time_t, use code like this
Gist.
Matlab previously made prerelease users sign a non-disclosure agreement (NDA), which hindered users from giving feedback about significant changes or bugs.
Developers of Matlab packages were likewise inhibited from updating their packages to work with new syntax or features.
There was typically one prerelease and the official release would sometimes have large jumps between the prerelease and added, removed, or changed features.
Each official release would have a few updates to fix bugs and add minor features.
Each official release was a gamble as to its quality and support by third-party packages.
Thankfully, Mathworks
loosened
the prerelease restrictions to allow public discussion and implementation of prerelease features.
Matlab prereleases are updated several times before the official release to help ensure features and fixes work across the diverse computing platforms Matlab supports.
Kudos to Mathworks for having a more open prerelease process.
Git 2.49 added the option to
build with Zlib-ng,
which can give a reported 25% compression speedup, which can be quite significant for large repositories.
Rust also began to be integrated in Git code along with further “libification” of Git code for reusability and quality.
When doing large builds on a computer that’s also used for interactive tasks (say, a developer laptop), the system may feel sluggish to the user while building.
Likewise, running tests can take a lot of CPU time and make the system less responsive.
To mitigate the high CPU usage, the run priority of the build system or test runner can be lowered.
This does not help if the system is running out of RAM or has low
disk IOPS,
but it can help if the system is CPU-bound.
Running at a lower priority can be more efficient than simply hard-limiting the number of CPU cores used by the build system or test runner.
These examples apply to virtually any build system such as CMake or Meson.
On Unix-like systems (Linux,
macOS,
BSD, …) use nice
to control process priority.
Matlab
buildtool
uses buildfile.m build plans that can each call other buildfile.m to stitch together Matlab subprojects from a top-level project.
An example syntax for a top-level buildfile.m that invokes say Git submodule Matlab project is:
functionplan = buildfile
plan = buildplan(localfunctions);
plan.DefaultTasks = "setup";
assert(~isMATLABReleaseOlderThan("R2024b"), "Subprojects with buildtool requires Matlab R2024b or newer")
endfunctionsetupTask(context)
sub1 = fullfile(context.Plan.RootFolder, "MySubproject/buildfile.m")
% Matlab gitrepo() doesn't yet have the ability to run this command after cloningif~isfile(sub1)
ok = system("git -C " + context.Plan.RootFolder + " submodule update --init --recursive");
assert(ok ==0, "Failed to update MySubproject Git submodule");
endbuildtool("-buildFile", sub1, "setup")
% assumes that sub1 also has a task named setup that should be runend
The red battery icon with a lightning bolt on a MacBook screen indicates that the battery is low and the Mac is not receiving enough power to boot.
This can happen with a malfunctioning battery, an inadequate USB-C charger, or a damaged USB-C cable.
If only the lightning bolt is under the red battery icon, this means the MacBook is receiving power via the USB-C port but there isn’t enough power to boot the MacBook.
If there is a plug and lightning bolt under the red battery icon, this means the MacBook is not receiving power via the USB-C port.
This issue can arise when the MacBook battery has run out (0% charge) and the USB-C charger is not providing enough power to boot the MacBook.
A solution is to find a
USB-C (USB-PD) charger
with at least 90 watts of power output to charge the MacBook battery to say 5% to 10% so that the MacBook can boot.
One can then switch back to the lower wattage adapter that may take several hours to charge the MacBook battery.
When traveling, especially with a high powered MacBook Pro, carry a USB-C adapter with at least the wattage of the original power adapter to avoid this issue.
A temptation is to use say an iPhone or iPad lower wattage 15 W or 30 W charger with a MacBook Pro that may need 60 W or 90 W to boot from an empty battery.
Using the
no boot checklist
from Apple is also useful to troubleshoot the issue.
It is uncommon to need to
reset the SMC.
FFmpeg can optimally re-encode video from numerous formats for YouTube (or other service) upload.
YouTube suggested settings
for SDR video are implemented below.
There are additional settings for
HDR Video.
BT.709 color space for SDR video. HDR should not use this flag.
-i in.avi
input file
-b:v 8M -bufsize 16M
8 Mbps video bitrate with 16 Mbps buffer size. This assumes 1080p input video–adjust this to the actual resolution of the input video. Use the bitrate table to choose appropriately.
When CMake fails on the configure or generate steps in a CI workflow, having CMakeConfigureLog.yaml uploaded a as a file can help debug the issue.
Add this step to the GitHub Actions workflow YAML file:
The “retention-days” parameter is optional.
Ensure the “name” parameter is unique to avoid conflicts with other jobs in the workflow.
Here we assume that the OS and C compiler are unique between jobs.