BBAI cpu governor stuck at 400mhz

all the governors seem to have the same range 400-400.

I try doing

sudo cpufreq-set -g userspace
sudo cpufreq-set -f 1.50Ghz
sudo cpufreq-info

but to no avail…

$ sudo cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1
  CPUs which need to have their frequency coordinated by software: 0 1
  maximum transition latency: 460 us.
  hardware limits: 400 MHz - 1.50 GHz
  available frequency steps: 400 MHz, 1000 MHz, 1.18 GHz, 1.50 GHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 400 MHz and 400 MHz.
                  The governor "userspace" may decide which speed to use
                  within this range.
  current CPU frequency is 400 MHz (asserted by call to hardware).
  cpufreq stats: 400 MHz:98.35%, 1000 MHz:0.00%, 1.18 GHz:0.00%, 1.50 GHz:1.65%  (2)
analyzing CPU 1:
  driver: cpufreq-dt
  CPUs which run at the same hardware frequency: 0 1
  CPUs which need to have their frequency coordinated by software: 0 1
  maximum transition latency: 460 us.
  hardware limits: 400 MHz - 1.50 GHz
  available frequency steps: 400 MHz, 1000 MHz, 1.18 GHz, 1.50 GHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 400 MHz and 400 MHz.
                  The governor "userspace" may decide which speed to use
                  within this range.
  current CPU frequency is 400 MHz (asserted by call to hardware).
  cpufreq stats: 400 MHz:98.35%, 1000 MHz:0.00%, 1.18 GHz:0.00%, 1.50 GHz:1.65%  (2)

I do have good cooling and the temperatures seem fine:

$ /opt/scripts/device/x15/test_thermal.sh
------------------------------------------------------------------------------------------------
|Thermal zone           |temp   |mode           |cdev0_type     |cdev1_type
------------------------------------------------------------------------------------------------
|cpu_thermal            |39400  |enabled        |thermal-cpufreq-0      |                       |passive:55000|critical:85000|
|gpu_thermal            |39800  |enabled        |               |                       |critical:85000|
|core_thermal           |40200  |enabled        |               |                       |critical:85000|
|dspeve_thermal         |38600  |enabled        |               |                       |critical:85000|
|iva_thermal            |39000  |enabled        |               |                       |critical:85000|
------------------------------------------------------------------------------------------------
|Cooling type           |state  |max_state      |
------------------------------------------------------------------------------------------------
|59000000.bb2d          |0      |6              |
|thermal-cpufreq-0      |0      |3              |
------------------------------------------------------------------------------------------------

I have a bit further understanding now.

sudo cpufreq-set -g ondemand
sudo cpufreq-set -u 1.5Ghz

This works and the CPU goes to 1.5Ghz now.

However my changes to the ondemand governor are reset on reboot, and the governor itself reverts to ‘batterysave’

I put together a dashboard in node-red to get some better visibility:

image

the flow to do this is here:

[{"id":"c83590b1.7dc0a","type":"group","z":"1084e511.8c158b","name":"CPU Temperature and frequency","style":{"stroke":"#92d04f","fill":"#c8e7a7","label":true,"color":"#000000"},"nodes":["f9064f62.4773f","f59c5589.698998","9ac69f2d.1e40c","6abc740c.6255cc","6bcb9737.f63cc8","805bbb02.d85578","41208556.20988c","c993103d.b3f38","c034db21.08bdb8","8e4f5110.42ee9","32e5ecfa.099da4","dcfeaac0.cb9428","f619ac30.0f20b","cca81dcc.d174c"],"x":14,"y":39,"w":1252,"h":342},{"id":"f9064f62.4773f","type":"file in","z":"1084e511.8c158b","g":"c83590b1.7dc0a","name":"","filename":"/sys/devices/virtual/thermal/thermal_zone0/temp","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":480,"y":180,"wires":[["32e5ecfa.099da4"]]},{"id":"f59c5589.698998","type":"inject","z":"1084e511.8c158b","g":"c83590b1.7dc0a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"2","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":180,"wires":[["f9064f62.4773f","805bbb02.d85578","8e4f5110.42ee9","cca81dcc.d174c","f619ac30.0f20b","dcfeaac0.cb9428"]]},{"id":"9ac69f2d.1e40c","type":"calculator","z":"1084e511.8c158b","g":"c83590b1.7dc0a","name":"","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"1000","round":true,"decimals":"2","x":970,"y":260,"wires":[["6abc740c.6255cc","6bcb9737.f63cc8"]]},{"id":"6abc740c.6255cc","type":"ui_gauge","z":"1084e511.8c158b","g":"c83590b1.7dc0a","name":"","group":"773c095b.363e98","order":0,"width":0,"height":0,"gtype":"gage","title":"temperature","label":"C","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1130,"y":240,"wires":[]},{"id":"6bcb9737.f63cc8","type":"ui_chart","z":"1084e511.8c158b","g":"c83590b1.7dc0a","name":"","group":"773c095b.363e98","order":1,"width":0,"height":0,"label":"Temperature Chart","chartType":"line","legend":"false","xformat":"auto","interpolate":"cubic","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"10","removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#0a90f0","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":1150,"y":280,"wires":[[]]},{"id":"805bbb02.d85578","type":"exec","z":"1084e511.8c158b","g":"c83590b1.7dc0a","command":"cpufreq-info","addpay":"","append":"-f","useSpawn":"false","timer":"1","oldrc":false,"name":"","x":370,"y":100,"wires":[["c993103d.b3f38"],[],[]]},{"id":"41208556.20988c","type":"ui_gauge","z":"1084e511.8c158b","g":"c83590b1.7dc0a","name":"","group":"8013c6d5.2c3668","order":0,"width":0,"height":0,"gtype":"gage","title":"CPU clock","label":"Mhz","format":"{{value}}","min":0,"max":"2000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1130,"y":80,"wires":[]},{"id":"c993103d.b3f38","type":"calculator","z":"1084e511.8c158b","g":"c83590b1.7dc0a","name":"","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"1000","round":true,"decimals":"2","x":920,"y":100,"wires":[["41208556.20988c","c034db21.08bdb8"]]},{"id":"c034db21.08bdb8","type":"ui_chart","z":"1084e511.8c158b","g":"c83590b1.7dc0a","name":"","group":"8013c6d5.2c3668","order":1,"width":0,"height":0,"label":"CPU Freq chart","chartType":"line","legend":"false","xformat":"auto","interpolate":"cubic","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"5","removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#0a90f0","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":1140,"y":120,"wires":[[]]},{"id":"8e4f5110.42ee9","type":"file in","z":"1084e511.8c158b","g":"c83590b1.7dc0a","name":"","filename":"/sys/devices/virtual/thermal/thermal_zone1/temp","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":480,"y":220,"wires":[["32e5ecfa.099da4"]]},{"id":"32e5ecfa.099da4","type":"change","z":"1084e511.8c158b","g":"c83590b1.7dc0a","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"filename","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":260,"wires":[["9ac69f2d.1e40c"]]},{"id":"dcfeaac0.cb9428","type":"file in","z":"1084e511.8c158b","g":"c83590b1.7dc0a","name":"","filename":"/sys/devices/virtual/thermal/thermal_zone2/temp","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":480,"y":260,"wires":[["32e5ecfa.099da4"]]},{"id":"f619ac30.0f20b","type":"file in","z":"1084e511.8c158b","g":"c83590b1.7dc0a","name":"","filename":"/sys/devices/virtual/thermal/thermal_zone3/temp","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":480,"y":300,"wires":[["32e5ecfa.099da4"]]},{"id":"cca81dcc.d174c","type":"file in","z":"1084e511.8c158b","g":"c83590b1.7dc0a","name":"","filename":"/sys/devices/virtual/thermal/thermal_zone4/temp","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":480,"y":340,"wires":[["32e5ecfa.099da4"]]},{"id":"773c095b.363e98","type":"ui_group","name":"Default","tab":"44151fad.aeeb6","order":1,"disp":true,"width":"10","collapse":false},{"id":"8013c6d5.2c3668","type":"ui_group","name":"Clock Speed","tab":"44151fad.aeeb6","order":2,"disp":true,"width":"10","collapse":false},{"id":"44151fad.aeeb6","type":"ui_tab","name":"${HOSTNAME}","icon":"dashboard","disabled":false,"hidden":false}]