Skip to content

Proper way to get voltage and log VALUES into dmesg #5584

Closed
@evrial

Description

@evrial

Describe the bug

https://github.com/raspberrypi/linux/blob/rpi-6.1.y/drivers/hwmon/raspberrypi-hwmon.c#L52

When diagnosing the problem with voltage this message doesn't make much sense when reading dmesg. We need to read the voltage value, not meaningless junk!!! Also what about overvoltage?
Also we need to read voltage from lm-sensors, not this:

$ sensors
cpu_thermal-virtual-0
Adapter: Virtual device
temp1:        +54.5°C  (crit = +110.0°C)

rpi_volt-isa-0000
Adapter: ISA adapter
in0:              N/A

Steps to reproduce the behaviour

Attach the USB SSD drive and write large files, undervoltage happens

Device (s)

Raspberry Pi 4 Mod. B

System

DietPi actual
vcgencmd version
Mar 17 2023 10:50:56
Copyright (c) 2012 Broadcom
version 82f3750a65fadae9a38077e3c2e217ad158c8d54 (clean) (release) (start_cd)

Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

Logs

[Aug28 17:07] hwmon hwmon1: Undervoltage detected!
[  +8.063930] hwmon hwmon1: Voltage normalised
[ +14.112012] hwmon hwmon1: Undervoltage detected!
[  +4.032014] hwmon hwmon1: Voltage normalised
[Aug28 17:29] hwmon hwmon1: Undervoltage detected!
[  +4.026423] hwmon hwmon1: Voltage normalised
[ +12.095992] hwmon hwmon1: Undervoltage detected!
[  +4.032175] hwmon hwmon1: Voltage normalised
[ +18.143830] hwmon hwmon1: Undervoltage detected!
[  +2.016073] hwmon hwmon1: Voltage normalised
[Aug28 17:30] hwmon hwmon1: Undervoltage detected!
[  +4.017547] hwmon hwmon1: Voltage normalised
[Aug28 17:43] hwmon hwmon1: Undervoltage detected!
[  +2.015996] hwmon hwmon1: Voltage normalised
[Aug28 17:44] hwmon hwmon1: Undervoltage detected!
[  +4.031950] hwmon hwmon1: Voltage normalised
[  +4.031982] hwmon hwmon1: Undervoltage detected!
[  +4.032196] hwmon hwmon1: Voltage normalised
[Aug28 17:45] hwmon hwmon1: Undervoltage detected!
[  +2.015987] hwmon hwmon1: Voltage normalised
[  +6.048030] hwmon hwmon1: Undervoltage detected!
[  +4.032009] hwmon hwmon1: Voltage normalised
[Aug28 18:00] hwmon hwmon1: Undervoltage detected!
[  +4.032007] hwmon hwmon1: Voltage normalised
[Aug28 18:11] hwmon hwmon1: Undervoltage detected!
[  +4.032082] hwmon hwmon1: Voltage normalised
[Aug28 18:12] hwmon hwmon1: Undervoltage detected!
[  +2.015998] hwmon hwmon1: Voltage normalised
[Aug28 18:53] hwmon hwmon1: Undervoltage detected!
[  +2.015991] hwmon hwmon1: Voltage normalised

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions