Pi In The Sky
Simply a work area and/or catch-all for miscellaneous Raspberry Pi tips, tricks, tools, tweaks, research or harebrainers - most-likely a mess, but potentially useful to others.
Sub-Pages
Putting Raspberry Pi Monitor to Sleep (DPMS) - HowTo: Turn OFF RPi Monitors (backlight too!)
GPIO Breadboard Worksheet - Used to document some of my projects. Breadboard contention!
RaspOS Lite (Bookworm): HowTo: HDMI Audio on RPI4 - Coming Soon!
Earmarked for migration - will see how much of this moves to this site
// whoops! Lost them! They were a mess anyhoo ... below from wayback machine: //
Random, but occasionally useful RPi Links and Resources
// I'll re-do benchmarks if/when I ever get a RPI5 //
Other Stuff on This Page
Struggles
(Ongoing or Solved Issues/Oddities)
RPI 4 No HDMI Output
Oct 2021: First RPI Hardware issue?! SmartiePi RPI4 board from June 2021 has lost ability to emit HDMI signal. Runs fine if I SSH into it, but cannot get HDMI output to save my life! Pi has been used headless for past 6 months or so. When reconnected to HDMI there is NO signal/output.
22 October: FIXED! It was the damn CASE! NO HDMI cable or adapter would work (and I tested a quite a few!). Finally removed the case and POOF! The cable clicked in a nanometer farther and it came right up! VERY bizarre, RPI 4B was mounted in that case the day it arrived and worked fine right out of the box for months! I can also see the case is no longer available on Amazon.
Others w/ similar issues
Watching this chatter: https://www.reddit.com/r/raspberry_pi/comments/qc4jad/did_i_damage_my_raspberry_pi_4_hdmi_issues/
Firmware could do this? https://github.com/raspberrypi/firmware/issues/1548. Have now worked with fresh SD/OS, updated/upgraded everything including eeprom. https://jamesachambers.com/raspberry-pi-4-bootloader-firmware-updating-recovery-guide/
See also: Kludge for getting HDMI AUDIO working on RaspOS Lite/Bookworm
Pi Power
Mini Project - A tangent while on my quest to build CamperPi that will provide low-power/offgrid entertainment. I also have a pile of questionable RPi power supplies that need to be weeded through - I keep plugging in bad ones! THEY NEED TO BE TOSSED!
Jan 2022 - Built a contraption to test cables and PSU's ... I had a mess on my hands!
Stumbled upon ....
Article/Script to test power supplies AND CABLES:
@ https://bia.is/2019/02/02/raspberry-pi-check-your-power-supply/Some VERY GOOD background info:
@ https://ownyourbits.com/2019/02/02/whats-wrong-with-the-raspberry-pi/Another good article (and script):
@ https://jamesachambers.com/measure-raspberry-pi-undervoltage-true-clock-speeds/Official Power Supply Requirements:
@ https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#power-supplyBreakdown of vcgencmd output:
@ https://harlemsquirrel.github.io/shell/2019/01/05/monitoring-raspberry-pi-power-and-thermal-issues.html
Built new TesterPi image
Raspberry Pi Imager: Download/burn Raspberry Pi OS Light
Configure, install & boot
Raspi-Config: Hostname, WiFi, password, localisation & turn on ssh
apt-get update, then apt-get full-upgrade
installs (editor and sysbench): apt-get install joe sysbench
sudo reboot
via ssh:
Created ps-check.sh using script @ https://bia.is/2019/02/02/raspberry-pi-check-your-power-supply/
Sysbench 1.020: Slight mod to CPU syntax in script. Now looks like this:
sysbench cpu --cpu-max-prime=10000000 --threads=4 run &May as well bring in my tester2.sh over too ... script I used for Pi benchmarking
Also created picheck3.py python3 code using sample script from jamesachambers and the code from page on harlemsquirrel site. Stuck it on github to see how that works too @ https://github.com/tped/PiPower
Initial tests: Ghadzooks, this is interesting! I knew I had some crappy cables, but many surprises here ...
The Legrand Wall Outlets* I had installed in my work area are worse than I thought ... periodic undervoltage on RPI3B+ w/ known good cable
My USB Tester/Multimeter* sucks power (of course it does! :facepalm:) ... one step forward, two steps back!
Most of my USB-2 to Micro USB cables were pretty bad ... BUT worth saving for RPi 1B, 2 and RPi 0W
Canakit 3.5amp PS w/ PiSwitch* is probably my favorite for RPI 4 projects. Good price ($10) & solid
Argon ONE Raspberry Pi 4 USB Type C Cable Power Supply | 5ft 5.25V/3.5A*. Works great, little more $$ and no on/off switch
Smraza 5.1V 3A Power Supply for RPi 4 with ON/Off Switch & USB-C->MicroUSB adapter*. Doesn't look durable, but works fine w/ 90 degree plug to fit in a tight spot!
Throttling is not necessarily a problem: $h1t does happen! Example, our HomePi is rock solid, it runs and has done it's job for years ... a few reboots/year for updates and such. Over the course of months, vcgencmd reports that it has had at least one Under-Voltage, Arm Frequency Cap and has been Throttled ... the Pi is doing its job!
RPI 0W seems like it would run kodi videos using a hamster & wheel for power! Quite amazing ... everything seems to power it! Primary finding of this testing - CamperPi is now a RPi 0W and plays HD movies and Duke Nukem using a 5v 550mA power supply!
Unforgettables
(Stuff I should remember but always forget)
Archlinux/Manjaro: Modifying AUR Package builds for RPI
Ghadzooks, why do I keep forgetting this!?!
To build RPI (4/5) packages from AUR:
Change the arch=() line in the PKGBUILD to include 'aarch64'
Fix Raspbian error: 'InRelease' changed its 'Suite' value from 'testing' to 'oldstable'
I keep digging around for the answer when I run into raspbian package install errors like these:
apt-get install xxxxx returns this
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/ncurses/libncurses5_6.1+20181013-2+deb10u2_armhf.deb 404 Not Found [IP: 93.93.128.193 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
If you do as told and try ... apt-get update --fix-missing, you get something like this:
Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Reading package lists... Done
E: Repository 'http://archive.raspberrypi.org/debian buster InRelease' changed its 'Suite' value from 'testing' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
FIX: sudo apt update --allow-releaseinfo-change
Then on with normal update/installs ....
Check for Installable or Installed packages
Find a specific package via apt-cache search <package>
List of ALL installed packages (pipe to grep or page thru) via dpkg -l
SSH: Remove offending key when a IP is reused
ssh-keygen -R <ip>
Regular Expression (Regexp) Stuff
I will always need all the help I can get here ....
This month's fav tool @ https://regex101.com/
Python Regex @ https://www.w3schools.com/python/python_regex.asp
Regular Expression Analyzer @ http://xenon.stanford.edu/~xusch/regexp/
Regexp builder @ https://regexbuildertool.com/
Interesting Regexp Generator @ https://regex-generator.olafneumann.org
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet