How does Octopi/Octoprint determine an "Undevolt" condition

What is the problem?

I have a PI 4B (4G) running Octopi 0.18.0 and Octoprint 1.5.3. I started using the bundled power supply rated at 3A and received undervolt warnings with my 3d Printer. Taped the 5V pin and had problems connecting to the printer. Put a powered USB hub between the PI and printer and things improved but did not resolve. Now I have a "Buck" converter powering the PI from the printer's power supply, it is rated at 5A and the voltage is set to 5.2V (verified). I am still seeing undervolt warnings on the PI and occasionally in Octoprint. When I run "vcgencmd get_throttled", I always see 0x50000 as a response. Is this response stored in the pi or is it actually occuring? The bit flags indicate that throttling and undervolt "Has Occured" not is occuring. Can't find a way to reset flags so I can only "assume" the value is occuring briefly on a reboot. Anybody have experience with this issue? I occasionally see a warning in octoprint after a reboot of undervoltage, but if I reboot again it usually clears.

What did you already try to solve it?

Two different power supplies, tried a powered USB hub, installed a DC-DC Buck Converter, reloaded the octoprint/pi image, upgraded to latest version of octo pi/print, Borrowed a calibrated volt meter.

Have you tried running in safe mode?

Problem is occuring on the PI, on a reboot, and I don't know how to use safe mode with Putty.

Did running in safe mode solve the problem?

Unknown

Complete Logs

octoprint.log

2021-03-24 06:14:47,390 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity state is currently: offline
2021-03-24 06:14:47,391 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to 8.8.8.8:53 is not working
2021-03-24 06:14:47,391 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org is not working
2021-03-24 06:14:47,397 - octoprint.startup - INFO - We don't appear to be online, not fetching plugin blacklist
2021-03-24 06:14:47,483 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2021-03-24 06:14:49,352 - octoprint.startup - INFO - Added settings overlay from plugin firmware_check
2021-03-24 06:14:49,358 - octoprint.plugin.core - INFO - Found 26 plugin(s) providing 26 mixin implementations, 53 hook handlers
2021-03-24 06:14:49,470 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2021-03-24 06:14:49,495 - octoprint.server - INFO - Intermediary server started
2021-03-24 06:14:49,511 - octoprint.filemanager.storage - INFO - Initializing the file metadata for /home/pi/.octoprint/uploads...
2021-03-24 06:14:49,513 - octoprint.filemanager.storage - INFO - ... file metadata for /home/pi/.octoprint/uploads initialized successfully.
2021-03-24 06:14:49,515 - octoprint.server - INFO - Added new permission from plugin action_command_notification: PLUGIN_ACTION_COMMAND_NOTIFICATION_SHOW (needs: "Need(method='role', value='plugin_action_command_notification_show')")
2021-03-24 06:14:49,516 - octoprint.server - INFO - Added new permission from plugin action_command_notification: PLUGIN_ACTION_COMMAND_NOTIFICATION_CLEAR (needs: "Need(method='role', value='plugin_action_command_notification_clear')")
2021-03-24 06:14:49,517 - octoprint.server - INFO - Added new permission from plugin action_command_prompt: PLUGIN_ACTION_COMMAND_PROMPT_INTERACT (needs: "Need(method='role', value='plugin_action_command_prompt_interact')")
2021-03-24 06:14:49,517 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_READ (needs: "Need(method='role', value='plugin_announcements_read')")
2021-03-24 06:14:49,517 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_MANAGE (needs: "Need(method='role', value='plugin_announcements_read'), Need(method='role', value='plugin_announcements_manage')")
2021-03-24 06:14:49,518 - octoprint.server - INFO - Added new permission from plugin appkeys: PLUGIN_APPKEYS_ADMIN (needs: "Need(method='role', value='plugin_appkeys_admin')")
2021-03-24 06:14:49,518 - octoprint.server - INFO - Added new permission from plugin backup: PLUGIN_BACKUP_ACCESS (needs: "Need(method='role', value='plugin_backup_access')")
2021-03-24 06:14:49,518 - octoprint.server - INFO - Added new permission from plugin firmware_check: PLUGIN_FIRMWARE_CHECK_DISPLAY (needs: "Need(method='role', value='plugin_firmware_check_display')")
2021-03-24 06:14:49,519 - octoprint.server - INFO - Added new permission from plugin logging: PLUGIN_LOGGING_MANAGE (needs: "Need(method='role', value='plugin_logging_manage')")
2021-03-24 06:14:49,519 - octoprint.server - INFO - Added new permission from plugin pi_support: PLUGIN_PI_SUPPORT_STATUS (needs: "Need(method='role', value='plugin_pi_support_check')")
2021-03-24 06:14:49,519 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_MANAGE (needs: "Need(method='role', value='plugin_pluginmanager_manage')")
2021-03-24 06:14:49,519 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_INSTALL (needs: "Need(method='role', value='plugin_pluginmanager_install'), Need(method='role', value='plugin_pluginmanager_manage')")
2021-03-24 06:14:49,520 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_CHECK (needs: "Need(method='role', value='plugin_softwareupdate_check')")
2021-03-24 06:14:49,520 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_UPDATE (needs: "Need(method='role', value='plugin_softwareupdate_update')")
2021-03-24 06:14:49,520 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_CONFIGURE (needs: "Need(method='role', value='plugin_softwareupdate_configure')")
2021-03-24 06:14:49,532 - octoprint.printer.standard - INFO - Using print time estimator provided by PrintTimeGenius
2021-03-24 06:14:50,210 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python3 -m pip" as command to invoke pip
2021-03-24 06:14:50,793 - octoprint.util.pip - INFO - Version of pip is 20.3.3
2021-03-24 06:14:50,795 - octoprint.util.pip - INFO - pip installs to /home/pi/oprint/lib/python3.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2021-03-24 06:14:50,795 - octoprint.util.pip - INFO - ==> pip ok -> yes
2021-03-24 06:14:50,914 - octoprint.plugins.softwareupdate - INFO - Loaded version cache from disk
2021-03-24 06:14:50,941 - octoprint.plugins.PrintJobHistory - INFO - Start initializing
2021-03-24 06:14:50,942 - octoprint.plugins.PrintJobHistory.DatabaseManager - INFO - Init DatabaseManager
2021-03-24 06:14:50,942 - octoprint.plugins.PrintJobHistory.DatabaseManager - INFO - Using database in: /home/pi/.octoprint/data/PrintJobHistory/printJobHistory.db
2021-03-24 06:14:50,943 - octoprint.plugins.PrintJobHistory.DatabaseManager - INFO - Check if database-scheme upgrade needed.
2021-03-24 06:14:50,976 - octoprint.plugins.PrintJobHistory.DatabaseManager - INFO - Done DatabaseManager.createDatabase
2021-03-24 06:14:50,976 - octoprint.plugins.PrintJobHistory.CameraManager - INFO - Init CameraManager
2021-03-24 06:14:50,977 - octoprint.plugins.PrintJobHistory.CameraManager - INFO - Snapshot-Folder:/home/pi/.octoprint/data/PrintJobHistory/snapshots
2021-03-24 06:14:50,977 - octoprint.plugins.PrintJobHistory.CameraManager - INFO - Done CameraMenager
2021-03-24 06:14:50,978 - octoprint.plugins.PrintJobHistory - INFO - Done initializing
2021-03-24 06:14:51,074 - octoprint.plugin.core - INFO - Initialized 26 plugin implementation(s)
2021-03-24 06:14:51,091 - octoprint.plugin.core - INFO - 26 plugin(s) registered with the system:
|  Action Command Notification Support (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/action_command_notification
|  Action Command Prompt Support (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/action_command_prompt
|  Announcement Plugin (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/announcements
|  Anonymous Usage Tracking (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/tracking
|  Application Keys Plugin (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/appkeys
|  Backup & Restore (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/backup
|  Core Wizard (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/corewizard
|  Discovery (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/discovery
|  DisplayLayerProgress Plugin (1.25.4) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_DisplayLayerProgress
|  Error Tracking (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/errortracking
|  Filament Manager (1.7.2) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_filamentmanager
|  File Check (2021.2.23) (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_file_check
|  Firmware Check (2021.2.4) (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_firmware_check
|  GCode Viewer (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/gcodeviewer
|  HeaterTimeout (0.0.3) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_HeaterTimeout
|  Logging (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/logging
|  Navbar Temperature Plugin (0.14) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_navbartemp
|  Pi Support Plugin (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/pi_support
|  Plugin Manager (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/pluginmanager
|  Preheat Button (0.7.1) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_preheat
|  PrintJobHistory (1.10.0) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_PrintJobHistory
|  PrintTimeGenius Plugin (2.2.7) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_PrintTimeGenius
|  Resource Monitor (0.3.2) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_resource_monitor
|  Software Update (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/softwareupdate
|  Themeify (1.2.2) = /home/pi/oprint/lib/python3.7/site-packages/octoprint_themeify
|  Virtual Printer (bundled) = /home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/virtual_printer
Prefix legend: ! = disabled, # = blacklisted, * = incompatible
2021-03-24 06:14:51,095 - octoprint.plugins.pi_support - DEBUG - Retrieving throttle state via "/usr/bin/vcgencmd get_throttled"
2021-03-24 06:14:51,116 - octoprint.environment - INFO - Detected environment is Python 3.7.3 under Linux (linux). Details:
|  hardware:
|      cores: 4
|      freq: 1500.0
|      ram: 4013580288
|  os:
|      bits: 32
|      id: linux
|      platform: linux
|  plugins:
|      pi_support:
|          model: Raspberry Pi 4 Model B Rev 1.2
|          octopi_version: 0.18.0
|          throttle_state: '0x0'
|  python:
|      pip: 20.3.3
|      version: 3.7.3
|      virtualenv: /home/pi/oprint
2021-03-24 06:14:51,126 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/webassets...
2021-03-24 06:14:51,146 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/.webassets-cache...
2021-03-24 06:14:51,748 - octoprint.server - INFO - Shutting down intermediary server...
2021-03-24 06:14:52,004 - octoprint.server - INFO - Intermediary server shut down
2021-03-24 06:14:52,005 - octoprint.events - INFO - Processing startup event, this is our first event
2021-03-24 06:14:52,006 - octoprint.events - INFO - Adding 1 events to queue that were held back before startup event
2021-03-24 06:14:52,010 - octoprint.filemanager - INFO - Adding backlog items from all storage types to analysis queue...
2021-03-24 06:14:52,011 - octoprint.server - INFO - Autoconnect on startup is configured, trying to connect to the printer...
2021-03-24 06:14:52,013 - octoprint.filemanager - INFO - Added 0 items from storage type "local" to analysis queue
2021-03-24 06:14:52,034 - octoprint.server - INFO - Trying to connect to configured serial port None
2021-03-24 06:14:52,058 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2021-03-24 06:14:52,068 - octoprint.server.util.watchdog - INFO - Running initial scan on watched folder...
2021-03-24 06:14:52,069 - octoprint.server.util.watchdog - INFO - ... initial scan done.
2021-03-24 06:14:52,082 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 4 port/baudrate candidates: /dev/ttyUSB0@115200, /dev/ttyUSB0@250000, /dev/ttyS0@115200, /dev/ttyS0@250000
2021-03-24 06:14:52,082 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyUSB0, baudrate 115200
2021-03-24 06:14:52,083 - octoprint.util.comm - INFO - Connecting to port /dev/ttyUSB0, baudrate 115200
2021-03-24 06:14:52,098 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-03-24 06:14:52,101 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-24 06:14:52,127 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting serial connection" to "Operational"
2021-03-24 06:14:52,132 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-24 06:14:52,880 - octoprint.plugins.discovery - INFO - Registered 'OctoPrint instance on octopi._http._tcp.local.' for _http._tcp.local.
2021-03-24 06:14:53,690 - octoprint.plugins.discovery - INFO - Registered 'OctoPrint instance on octopi._octoprint._tcp.local.' for _octoprint._tcp.local.
2021-03-24 06:14:53,693 - octoprint.plugins.pi_support - DEBUG - Retrieving throttle state via "/usr/bin/vcgencmd get_throttled"
2021-03-24 06:14:53,694 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance on octopi for SSDP
2021-03-24 06:14:53,742 - octoprint.server - INFO - Listening on http://127.0.0.1:5000
2021-03-24 06:14:53,805 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2021-03-24 06:14:54,395 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python3 -m pip" as command to invoke pip
2021-03-24 06:14:54,396 - octoprint.util.pip - INFO - pip installs to /home/pi/oprint/lib/python3.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2021-03-24 06:14:54,396 - octoprint.util.pip - INFO - ==> pip ok -> yes
2021-03-24 06:14:54,424 - octoprint.plugins.softwareupdate - INFO - Minimum free storage across all update relevant locations is 25.5GB. That is considered sufficient for updating.
2021-03-24 06:14:54,424 - octoprint.plugins.softwareupdate - INFO - Not fetching check overlays, we are offline
2021-03-24 06:14:54,808 - octoprint.server.util.sockjs - INFO - New connection from client: ::ffff:192.168.1.100
2021-03-24 06:14:54,999 - octoprint.server.util.flask - INFO - Passively logging in user Sean from ::ffff:192.168.1.100
2021-03-24 06:14:55,000 - octoprint.access.users - INFO - Logged in user: Sean
2021-03-24 06:14:55,011 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2021-03-24 06:14:55,047 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity changed from offline to online
2021-03-24 06:14:56,500 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python3 -m pip" as command to invoke pip
2021-03-24 06:14:56,501 - octoprint.util.pip - INFO - pip installs to /home/pi/oprint/lib/python3.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2021-03-24 06:14:56,501 - octoprint.util.pip - INFO - ==> pip ok -> yes
2021-03-24 06:14:56,578 - octoprint.plugins.softwareupdate - INFO - Saved version cache to disk
2021-03-24 06:14:56,595 - octoprint.plugins.HeaterTimeout - INFO - Starting up...
2021-03-24 06:14:56,604 - octoprint.plugins.PrintJobHistory - INFO - Plugin-State: PreHeat=enabled DisplayLayerProgress=enabled filamentmanager=enabled ultimakerformat=missing PrusaSlicerThumbnails=missing
2021-03-24 06:14:56,682 - octoprint.plugins.pi_support - DEBUG - Retrieving throttle state via "/usr/bin/vcgencmd get_throttled"
2021-03-24 06:14:56,742 - octoprint.server.util.sockjs - INFO - User Sean logged in on the socket from client ::ffff:192.168.1.100
2021-03-24 06:14:56,752 - octoprint.plugins.themeify - INFO - Themeify initialized.
2021-03-24 06:14:56,923 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'base_url': 'http://192.168.1.111/', 'path': '/', 'query_string': 'l10n=en'}
2021-03-24 06:14:56,955 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2021-03-24 06:14:57,334 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 8}
2021-03-24 06:14:58,041 - octoprint.plugins.tracking - INFO - Sent tracking event pong, payload: {'version': '1.5.3', 'os': 'linux', 'bits': 32, 'python': '3.7.3', 'pip': '20.3.3', 'cores': 4, 'freq': 1500.0, 'ram': 4013580288, 'pi_model': 'Raspberry Pi 4 Model B Rev 1.2', 'octopi_version': '0.18.0', 'plugins': 'themeify:1.2.2,printjobhistory:1.10.0,preheat:0.7.1,resource_monitor:0.3.2,printtimegenius:2.2.7,navbartemp:0.14,heatertimeout:0.0.3,filamentmanager:1.7.2,displaylayerprogress:1.25.4'}
2021-03-24 06:14:58,414 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2021-03-24 06:14:58,569 - octoprint.plugins.pi_support - DEBUG - Retrieving throttle state via "/usr/bin/vcgencmd get_throttled"
2021-03-24 06:14:58,667 - octoprint.plugins.tracking - INFO - Sent tracking event startup, payload: {'version': '1.5.3', 'os': 'linux', 'bits': 32, 'python': '3.7.3', 'pip': '20.3.3', 'cores': 4, 'freq': 1500.0, 'ram': 4013580288, 'pi_model': 'Raspberry Pi 4 Model B Rev 1.2', 'octopi_version': '0.18.0'}
2021-03-24 06:15:08,494 - octoprint.server.preemptive_cache - INFO - ... done in 11.57s
2021-03-24 06:15:11,157 - octoprint.server.util.flask - INFO - Passively logging in user Sean from ::ffff:192.168.1.100
2021-03-24 06:15:11,157 - octoprint.access.users - INFO - Logged in user: Sean
2021-03-24 06:15:11,249 - octoprint.server.util.sockjs - INFO - Client connection closed: ::ffff:192.168.1.100
2021-03-24 06:15:11,444 - octoprint.server.util.flask - INFO - Passively logging in user Sean from ::ffff:192.168.1.100
2021-03-24 06:15:11,444 - octoprint.access.users - INFO - Logged in user: Sean
2021-03-24 06:15:11,889 - octoprint.server.util.sockjs - INFO - New connection from client: ::ffff:192.168.1.100
2021-03-24 06:15:12,061 - octoprint.server.util.flask - INFO - Passively logging in user Sean from ::ffff:192.168.1.100
2021-03-24 06:15:12,062 - octoprint.access.users - INFO - Logged in user: Sean
2021-03-24 06:15:13,275 - octoprint.plugins.pi_support - DEBUG - Retrieving throttle state via "/usr/bin/vcgencmd get_throttled"
2021-03-24 06:15:13,294 - octoprint.plugins.pi_support - WARNING - This Raspberry Pi is reporting problems that might lead to bad performance or errors caused by overheating or insufficient power.
!!! UNDERVOLTAGE REPORTED !!! Make sure that the power supply and power cable are capable of supplying enough voltage and current to your Pi.
2021-03-24 06:15:13,543 - octoprint.server.util.sockjs - INFO - User Sean logged in on the socket from client ::ffff:192.168.1.100
2021-03-24 06:15:14,501 - octoprint.plugins.tracking - INFO - Sent tracking event system_unthrottled, payload: {'throttled_now': False, 'throttled_past': True, 'throttled_mask': 327680, 'throttled_voltage_now': False, 'throttled_voltage_past': True, 'throttled_overheat_now': False, 'throttled_overheat_past': False}

Additional information about your setup

Octo Pi V 0.18.0
Octoprint V 1.5.3
I am using this 3.5" Display (3.5inch RPi Display - LCD wiki)
Octodash

It is stored in the pi - the red led starts blinking if is occurring right now otherwise you can check when it happened in dmesg.

We have those problems with buck converters all the time. I guess it's either the cables you're using or the connectors on the gpio pins having a bad connection.

Which printer are you using?

I'm using shielded #18awg 2 conductor wire between the Printer power supply and converter, and converter to USB-C connector soldered at end. The wire, the components have been tested using a calibrated voltage meter and the loss is negligible <.03 VDC and the source to the PI has been 5.1-5.2VDC and the problem continues. I don't have anything on the GPIO pins except the display. I have used 5 different USB cables (no ferrites, 1 ferrite and 2 ferrite configs) and added a powered USB hub, the problem has not gone away.

I am trying to find out if the flag can be reset, so I can determine if there is a problem or I'm seeing inaccurate information. After a reboot, the VCGENCMD command always returns 0x50000, so am I still having an issue or is this a stuck flag? Can I reset this flag so I can see if the problem is still occurring? I have literally replaced every external component to the PI and I still am plagued by this warning.

Not that I'm aware of.

You still have an issue

Did you check in dmesg when it happened?

[ 15.758737] Under-voltage detected! (0x00050005)
[ 22.003188] Voltage normalised (0x00000000)

I don't have an O-scope, but a fluke hasn't recorded a drop in input voltage. 5.1VDC +/- .03.

There isn't anything left to replace.... except the PI

The β‰ˆ 7 seconds should be long enough to see a drop on the Fluke.

Are you sure that the USB-C connector isn't the problem?

Also, if you want to measure something closer to internal voltage, measure between the 5v and gnd GPIO pins - it's not clear where you're measuring at the moment but that would show you closer to what the Pi sees.

The supplied switched USB power supply, an Apple charger AND a buck converter with a soldered USB-C all bad? I'm not a lucky person, but that seems too unlikely that everything used all have the same problem. I've used a powered USB hub between the PI and the printer and USB camera, still no change, so it's cant be a USB device. The problem occurred before the display was added and still exists, so not likely it is causing the problem. Octoprint occasionally reports on initial start but a reboot clears the warning. I really can't understand what is causing the PI to have an issue, but then be fine. The problem seemed better before I did the python 3/.18/1.53 upgrade, but don't believe software is causing this unless it lowered a threshold somewhere, but nothing I have found. I have no faith in the PI platform at this point since, this issue seems to be more phantom than substance and I have invested a lot of quality parts to have the problem continue. I'm reluctant to buy/borrow and O-Scope to capture anything on the input voltage, if it's occurring faster than the Fluke can record.

GPIO is blocked by display, and before we blame it, this has been occurring before the display was added. I am measuring the voltage at the USB-c connector, input to the PI.

As far as I know (just to give some numbers/evidence to it) the undervoltage detection is done by a specific circuit in the Pi, it trips at ~4.6v and sends the signal. I am not aware of this being a configurable threshold, more one that is set by the hardware circuit design itself.

To state the obvious, this is an intermittent issue that only seems to occur on boot to the Pi. It's entirely possible that you won't see this the other side of the connector - which is why I suggested GPIO. I know it is 'in principle' broken, but this is for a very small amount of time. Once the voltage normalises there won't be any further throttling of the system. What I'm trying to say, is that maybe you can just ignore it since you have tried a lot of things and it still won't go away.

1 Like

That was my feeling, except that Octoprint is logging that the event has occurred. I can't tell if it is affecting the print, even though the lightning bolt isn't showing octoprint.log is showing an event occurred. I wanted to see if it was possible to reset after the initial boot, so I can see if it is actually occurring or if it's something caused during the initialization. I have monitored the power input meticulously and despite replacing everything and even raising the input voltage to 5.2VDC I still see this message. Unfortunately I can't see how low the PI measured since it doesn't seem to log the value, so I have to take it's word that it occurred. I'm more inclined to believe it's a bug somewhere since I can't quantify the problem with any external measurements. And even if I could, I can't raise the input voltage anymore or risk damaging the PI. I might make a connector for the GPIO header for my fluke probes, but I'm beginning to think this is a false report caused by the software pausing or not initializing correctly.

It will only affect the print if it is sustained or active during the print. dmesg is the most accurate source of information for when the voltage goes up and down - OctoPrint is just reading vcgencmd get_throttled periodically.

There is vcgencmd measure_volts but this is not the same thing that trips the undervoltage circuits. I don't think it is that useful. There's nothing in the software that measures and calculates it as far as I know, it is a single signal from the hardware of the Pi that is either undervoltage or no undervoltage.

Dmesg just reported it again on an Idle printer, so everything just sitting while I'm typing here and the PI reports an undervolt, Octoprint whish is also open and running - idle, did not report the event.

[ 901.848256] Under-voltage detected! (0x00050005)
[ 906.008540] Voltage normalised (0x00000000)

I tried using the vcgencmd voltage parameters, but since I don't know what voltage and where I haven't had any success on using them.

Chiming in. I actually have had undervoltage issues for a while with a stable ATX supply. My problem was that the supply while in spec for 5VSB @ 4.8V was on the lower end for a Pi. I ended up hooking up my scope on my power distribution block(closer to the supply) and at the Pi GPIO header(where I power). When the motors turned on I saw a wild amount of noise on the block side and some reached out to the GPIO side. So far my fix has been to throw in a cap(5000uF - what i had on hand) at the 5V on the GPIO header and haven't had an issue thus far though it's only been a few days.

1 Like

OK, hadn't consider noise. I just happened to have a bunch of ferrites I can put on the input cables, they didn't help on the USB cable side. I will give it a shot. The 24V power supply in the printer is stable so I know it isn't causing an issue of the buck converter and it's output is stable as well. Haven't scoped anything, but your suggestion has some possibilities.

Ok, so now I've added a ferrite on the power supply and PI sides of the buck converter. Voltages are stable. I never knew about DMESG before, but I have been running dmesg -T and it appears I am seeing a 6 second event once every hour(ish). The print was idle for two events and printing for another. I have the PI out of it's case, the stock fan removed and several externally powered fans blowing on it.

[Wed Mar 24 08:37:16 2021] Under-voltage detected! (0x00050005)
[Wed Mar 24 08:37:23 2021] Voltage normalised (0x00000000)
[Wed Mar 24 08:37:24 2021] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[Wed Mar 24 08:52:02 2021] Under-voltage detected! (0x00050005)
[Wed Mar 24 08:52:07 2021] Voltage normalised (0x00000000)
[Wed Mar 24 09:42:10 2021] Under-voltage detected! (0x00050005)
[Wed Mar 24 09:42:16 2021] Voltage normalised (0x00000000)
[Wed Mar 24 10:51:10 2021] Under-voltage detected! (0x00050005)
[Wed Mar 24 10:51:14 2021] Voltage normalised (0x00000000)

dmesg -T -w | grep --line-buffered -i 'voltage' if you wanna watch for it live :slight_smile:

Thanks, that is useful. I'm just this side of inept with the command line, but can follow directions. What does the last digit in the event "5" mean? Why is it not just a 0 or 1 flag?

Convert the hex into binary then match the individual bits.

See vcgencmd get_throttled

Actually just decoding it now looks like you got:

Under-voltage detected
Arm frequency capped
Arm frequency capping has occurred
Soft temperature limit has occurred

The PI is printing at the moment, but there are several fans blowing on it, it's outside of a case on a non-conductive pad, and the fluke is showing there has been no change to the input voltage. This thing is really a pain. I am giving the PI more than the minimum and just less than the maximum, yet it still has a problem. There just isn't anything more I can do for it, since more is greater than the USB-C spec and "supposedly" dangerous to the PI. I'm not overclocking or running anything abnormal. The only hardware I've added it the 3.5" TFT display. The only USB devices are a Logitech C310 camera and my printer. Tried putting them on a powered USB hub and it made no difference to this power warning. This thing is either generating the error itself or has a design/component failure. I just can't figure out which.