BPi-R3 NVME temperature sensor

Hi all,

I have short question about BPi-R3: Anybody tried to enable CONFIG_NVME_HWMON=y kernel conf option to get NVME temperatures directly with /sys/class/hwmon and sensors?

It is available since linux kernel version 5.5 but i don’t know how it is supported on archs and devices different than x86. ‘Big’ distros have it enabled and it makes nvme temperature monitoring much easier than using smartctl or nvme-cli.

Thanks :slight_smile:

i have not tested it yet, but i guess this is not specific to bananapi and should work…i would say just test if it works :wink: and report back…then i can add this option to my defconfig


Can confirm, works fine, for me at least, didn’t it test it for stability etc., but it just reads temperature. :slight_smile: Any chance that this option could land in upstream OpenWRT? :slight_smile:

Some config and output, maybe it will be helpful: sensors output"

Adapter: PCI adapter
Composite:    +53.9°C

for installed ssd 01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951 (rev 01)

and /sys/class/nvme

root@OpenWrt:/sys/class/nvme/nvme0# ls
address            dev                firmware_rev       kato               ng0n1              nvme0n1            queue_count        reset_controller   sqsize             subsysnqn          transport
cntlid             device             hwmon4             model              numa_node          power              rescan_controller  serial             state              subsystem          uevent
root@OpenWrt:/sys/class/nvme/nvme0# ls hwmon4
device       name         of_node      power        subsystem    temp1_alarm  temp1_input  temp1_label  uevent
root@OpenWrt:/sys/class/nvme/nvme0# cat hwmon4/temp1_input

build for Linux OpenWrt 5.15.118 #0 SMP Mon Jun 26 11:20:39 2023 aarch64 GNU/Linux OpenWRT v23.05.0-rc2 sources, just CONFIG_NVME_HWMON=y

# NVME Support
# CONFIG_NVME_FC is not set
# CONFIG_NVME_TCP is not set
# end of NVME Support
1 Like

Agreed, that should be enabled by default.

Great idea, I’ve enabled it in my defconfig…

This setting is already enabled in master branch OpenWRT for x86/64 platform, as I understand.

Can someone enable it for 23.05 OpenWRT version too?

Will this be implemented in 23.05.x OpenWRT builds by default?

Hello Eric, can you please post step buy step procedure on how to do that?

@NsinghP How to do what?

How to configure it in defcong

I only use my own ArchLinux images … You need instructions for this image?

Sorry, That will not work, I need to figure out a way to monitor SSD temp on OpenWrt and BPi-R3. I have already cut a hole in the bottom of case to let some air in.

then just enable the kernel-options and rebuild via make kernel_menuconfig as stated here: https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem

you can also modify defconfig in openwrt…here is the defconfig (here 6.1): https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/mediatek/filogic/config-6.1;h=36cb9c1e4e6be8d145e208ec0c53795d99d16c56;hb=HEAD

if using linux 5.15 use the other defconfig in same folder and add the missing options before building openwrt