sipeed / LonganPi-3H-SDK

LonganPi 3H SDK
GNU General Public License v3.0
28 stars 14 forks source link

Kernel requires CONFIG_THERMAL to be disabled to boot #16

Open pixdrift opened 7 months ago

pixdrift commented 7 months ago

Hi Sipeed developers, thanks for all your work on this!

I am doing some work to get this board configuration into Armbian as a community supported board, and along the way I have found an issue with the thermal configuration.

If the kernel configuration has CONFIG_THERMAL=y, it appears the temperature sensors on the Sipeed LonganPi 3H report incorrect temperature readings and trigger a thermal shutdown in early boot (when the CPU/GPU is cold).

I also booted the LPI3H_20240110_SD.img available on the Sipeed website and note that it does not have thermal configured in the kernel, and also doesn't report any temperature information through lm-sensors.

root@lpi3h-5396:/# uname -a
Linux lpi3h-5396 6.7.0-rc3+ #1 SMP PREEMPT Wed Dec 20 10:17:59 UTC 2023 aarch64 GNU/Linux
root@lpi3h-5396:/# sensors
No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.

Turning thermal configuration on for kernel and booting the image triggers and immediate thermal shutdown when the kernel loads.

Starting kernel ...

done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems
done.
[    2.498172] thermal thermal_zone0: gpu-thermal: critical temperature reached, shutting down
[    2.506572] reboot: HARDWARE PROTECTION shutdown (Temperature too high)
[    2.519090] reboot: Power down

done.

Is there a patch available (or being developed) that implements the CPU/GPU temperature sensors for this board? I am a little concerned running it (especially in early development) without visibility of the system temperatures.

Thanks :)

wu-yue-yu commented 7 months ago

No patch yet. We'll check this later.

wu-yue-yu commented 6 months ago

The thermal driver has some problem with mainline kernel now, it reads the wrong temprature of H618, so the kernel won't boot with thermal enabled successfully. If there's a solutions comes up, we will update the patch to this repo immediately.

ateaford commented 6 months ago

I have also tried all of the images and all of them except the LPI3H_20240110_SD.img image causes the Lpi3h to freeze up under ANY load sometimes even just booting. In my case though the Lpi3h is pretty hot to touch even with heat sinks