Bypassing Low Voltage Warning in OctoPrint
Say what now?!
Octoprint has a built-in module “Pi Support” that gives warnings if something’s up with your ‘Pis power supply or if it’s been “throttled” any time since system boot-up.
Very clever … but what happens if your sweet old Raspberry Pi 3+ Model B has a faulty MxL7704 power management chip, say one that reports low 5V_SYS even though it’s fine? Let’s just imagine you’ve already hooked a laboratory voltmeter and scope up to your R’Pi to verify this sad state of affairs.
Here’s a script that will bypass the warning. It should go without saying that using this is NOT a good idea but who am I to judge?
#!/bin/sh VCGENCMD="/opt/vc/bin/vcgencmd" ANYTHING_BUT_THROTTLED=`$VCGENCMD $* | sed 's/\(throttled=\).*/\10x0/'` echo $ANYTHING_BUT_THROTTLED exit $?
Use your favorite editor to create the script somewhere tidy like
and make it executable using ~/scripts/vcgencmd-bypass
chmod a+x vcgencmd-bypass.
Now all you have to do is point Settings => Pi Support => Advanced options to this script rather than the default /usr/bin/vcgencmd
executable; Like so …
Why you naughty hacker you!
The script allows all vcgencmd
commands through, changing only the likes of any
output to throttled=0x50000
.throttled=0x
0
Now of course, that same faulty chip is going to tell Raspbian to throttle even when it shouldn’t … or is it? Turns out that in my case, the glitch only seems to occur once during boot-up. I am guessing around the time the first I2C initialization event occurs. I have benchmarked the Pi to death trying to get it to produce
(Currently throttled) with no or should I say only joy.throttled=0x4
In case you’re wondering what made me suspect a faulty chip … well that would be connecting a 4 Amp power supply the wrong way around, directly to the PCB, bypassing the fuse etc. That seemed to outright kill the Pi but a few hours later when I plugged it in one last time before trashing it … YIPPEE! It worked again. I guess the chip cooled down? Or maybe there’s another self-resetting fuse somewhere that saved the day (almost). *shrug*
Have fun!
Thanks so much for this. I couldn’t bypass it even though it was showing correct voltage on my (admittedly cheap Amazon) multimeter so this is just what I needed.