Jump to content

Recommended Posts

Posted (edited)

Hi I just installed armbian on my rockpi 4c+ and wanted to check the temperature so I found that I should be able to run 

cat /etc/armbianmonitor/datasources/soctemp

But that just gives the error cat: /etc/armbianmonitor/datasources/soctemp: No such file or directory

It seems /etc/armbianmonitor/datasources/soctemp is a link to /sys/devices/virtual/thermal/thermal_zone0/temp but I have no /sys/devices/virtual/thermal/thermal_zone0 directory, under thermal I have 

├── cooling_device0
│   ├── cur_state
│   ├── max_state
│   ├── power
│   │   ├── autosuspend_delay_ms
│   │   ├── control
│   │   ├── runtime_active_time
│   │   ├── runtime_status
│   │   └── runtime_suspended_time
│   ├── stats
│   │   ├── reset
│   │   ├── time_in_state_ms
│   │   ├── total_trans
│   │   └── trans_table
│   ├── subsystem -> ../../../../class/thermal
│   ├── type
│   └── uevent
└── cooling_device1
    ├── cur_state
    ├── max_state
    ├── power
    │   ├── autosuspend_delay_ms
    │   ├── control
    │   ├── runtime_active_time
    │   ├── runtime_status
    │   └── runtime_suspended_time
    ├── stats
    │   ├── reset
    │   ├── time_in_state_ms
    │   ├── total_trans
    │   └── trans_table
    ├── subsystem -> ../../../../class/thermal
    ├── type
    └── uevent

 

Guessing this is a bug?

Both cur_state files yield 0 when cat them.

https://paste.armbian.com/ekebicased

 

I'm using the Armbian_v22.05.2_Rockpi-4cplus_bullseye_current_6.1.33_minimal.img image

It seems I can find the same content under /sys/class/thermal/ as under /sys/devices/virtual/thermal/

 

I have also tried to install lm-sensors but it fails to find any sensors to read, after that i tried to use a rolling release, but it never fetched a IP, guessing the boot failed, but as I have no micro hdmi adapter I could not check what failed.

 

Edit 2023-06-27

I downloaded the latest ubuntu server image from https://github.com/radxa/debos-radxa/releases/tag/20230201-0944 and there it seems to work, is there someway I can find what driver/process created the thermal_zone?

After that I tested the latest armbian ubuntu minimal image, sadly it also lacks the /sys/devices/virtual/thermal/

Edited by Peter Andersson
Posted

For some reason I'm not allowed to edit the question any more, so I will add additional content I found here instead...

I tried to compare the loaded kernel modules of both distros but that didn't give me any information.

So next I looked at the device tree using dtc -I fs /sys/firmware/devicetree/base the content has been attached.

It has the following

rockchip-system-monitor {
    compatible = "rockchip,system-monitor";
    rockchip,polling-delay = <0xc8>;
    phandle = <0x15e>;
    rockchip,thermal-zone = "soc-thermal";
};

 

device-tree-radax-ubuntu.txt

Posted
23 hours ago, Peter Andersson said:

For some reason I'm not allowed to edit the question any more,

Editing posts is only possible after a certain period of time after creation in order to prevent abuse. It is perfectly fine to add new information as a fresh posting in this case. Your prudence is appreciated.

Posted (edited)

I ran hwinfo on the distro where things thermal monitoring works as expected and noticed 

rockchip-thermal: /devices/platform/ff260000.tsadc

My guess is that this is the driver that adds the thermal's, but I have no idea what path it points to?

 

 

Edit: I can confirm that the rockchip-thermal does not exist in armbian, and sadly I have no idea how to add it..

Edited by Peter Andersson
Posted
8 hours ago, Peter Andersson said:

the needed drivers or configuration is missing

Exactly, either there is no thermal zone wired-up in the DT or the kernel build configuration lacks the necessary drivers enabled. To exclude the DTB, you can upload yours used in armbian and I can investigate accordingly.

Posted (edited)

usual user, not sure I follow 100%, but what I have found is that the  rk3399-rock-4c-plus.dts and rk3399.dtsi files in the https://github.com/radxa/kernel/tree/linux-5.10-gen-rkr4.1/arch/arm64/boot/dts/rockchip repo are different than the same files in the linux repo.

 

I'm not sure if both are used or if its just the rk3399-rock-4c-plus.dts

 

Would it be safe to compile armbian with the rk3399-rock-4c-plus.dts from radxa? they use a old version of the linux kernel (4.4 if I remember correctly).

If it is could you give me some instruction how I would go about replacing the file locally before building a new image?

 

Edit: it looks like the rk3399-rock-4c-plus.dts uses rk3399.dtsi, rk3399-linux.dtsi and rk3399-t-opp.dtsi

Edited by Peter Andersson
Posted
5 hours ago, Peter Andersson said:

could you give me some instruction

I asked you, as a first step, to upload the rk3399-rock-4c-plus.dtb, which is currently provided by the Armbian OS, to be able to check if the thermal zone is really not wired-up. There's no point in putting effort into fixing something that isn't broken.

Posted (edited)

Sorry for the delay, and thanks for your help and patience Usual user, I'm not 100% sure

My first idea was to look here https://github.com/armbian/linux-rockchip/tree/rockchip-sdk-5.10/arch/arm64/boot/dts/rockchip but that repo does not seem to have a rk3399-rock-4c-plus.dts for some reason.

 

So my guess is that it uses the one in the linux repo? https://raw.githubusercontent.com/torvalds/linux/master/arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts

 

I managed to dump some content using  dtc -I fs -O dts /sys/firmware/devicetree/base I have attached it to the post.

 

From what i can see the armbian has some thermal stuff, but the one from radax has more.

 

 

device-tree-armbian-bookworm.txt

Edited by Peter Andersson

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines