[Letux-kernel] thermal madness

Andreas Kemnade andreas at kemnade.info
Fri Sep 13 22:27:11 CEST 2019


On Fri, 13 Sep 2019 21:51:40 +0200
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:

> > Am 13.09.2019 um 21:44 schrieb Andreas Kemnade <andreas at kemnade.info>:
> > 
> > Hi,
> > 
> > I was experimenting a bit a bit with the thermal:
> > 
> > fresh after rebooting and autoidling uarts and loading some modules I
> > made the letux3704 device consume 32mA, so I expect the temperature to
> > being low.  
> 
> Indeed. I usually have the GTA04 up and running with X11 etc. so it is
> significantly warmer.
> 
> > Reading the thermal gives this:
> > 
> > root@(none):/# cat /sys/devices/virtual/thermal/thermal_zone0/temp 
> > 58500
> > root@(none):/# cat /sys/devices/virtual/thermal/thermal_zone0/temp 
> > 47000
> > root@(none):/# cat /sys/devices/virtual/thermal/thermal_zone0/temp 
> > 47000
> > root@(none):/# cat /sys/devices/virtual/thermal/thermal_zone0/temp 
> > 47000
> > root@(none):/# cat /sys/devices/virtual/thermal/thermal_zone0/temp 
> > 47000
> > root@(none):/# cat /sys/devices/virtual/thermal/thermal_zone0/temp 
> > 47000
> > root@(none):/# cat /sys/devices/virtual/thermal/thermal_zone0/temp 
> > 48500
> > root@(none):/# cat /sys/devices/virtual/thermal/thermal_zone0/temp 
> > 48500
> > 
> > That is just the opposite to what Nikolaus was getting. Here it jumps
> > down instead of up and stays stable.  
> 
> Oops!!!
> 
> > My conclusion: the measurements are buffered somewhere/somehow and we
> > are getting something old here.   
> 
> Or there is some other bug in the code...
> 
> I have tried to understand the code a little but it just reads some
> registers... And translates ADC values to celsius.
> 
> And, there is some feature to handle temperature trends. This seems
> to read multiple registers.
> 
> And in some case it may not be possible to read a value and then
> it returns a previous one.
> 
> Hm. What if that situation is true for the first read? But the
> previous is random?
> 
> Another test: I also did run the first cat command in a loop
> 
> for i in 1 2 3 4 5 6 7 8 9 10
> do
> 	cat /sys/devices/virtual/thermal/thermal_zone0/temp
> 	sleep 0.1
> done
> 
some more testing here:
root@(none):/# cpufreq-info 
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq at vger.kernel.org, please.
analyzing CPU 0:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 300 us.
  hardware limits: 300 MHz - 1000 MHz
  available frequency steps: 300 MHz, 600 MHz, 800 MHz, 1000 MHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance
  current policy: frequency should be within 300 MHz and 1000 MHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 600 MHz (asserted by call to hardware).
  cpufreq stats: 300 MHz:94.86%, 600 MHz:2.49%, 800 MHz:0.92%, 1000 MHz:1.73%  (51)
root@(none):/# cd /sys/bus/platform/drivers/omap_uart/
_delay_ms ; echo 3000 >$name ; doners/omap_uart# for name in */power/autosuspend 
root@(none):/sys/bus/platform/drivers/omap_uart# for name in */power/autosuspen
_delay_ms ; do echo 3000 >$name ; doners/omap_uart# for name in */power/autosuspend_                                                                                                          
root@(none):/sys/bus/platform/drivers/omap_uart# 
root@(none):/sys/bus/platform/drivers/omap_uart# cd
w ot@(none):/# sleep 16 ; cat /sys/class/power_supply/bq27000-battery/current_now
32844
rmal/thermal_zone0/temp ; sleep 0.1 ; done 8 9 ; do cat /sys/devices/virtual/the 
58500
47000
47000
48500
48500
48500
48500
48500
48500
48500
root@(none):/# 

That is with
commit d71fc15bce98abf24226f451f192df07ab9d089b
We are seeing 1Ghz here on the letux3704 without any boost.

Regards,
Andreas


More information about the Letux-kernel mailing list