WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: CPU clock setup issue  (Read 3336 times)

Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
CPU clock setup issue
« on: November 09, 2015, 02:57:16 PM »
I've found issue with the cpu clock setup at RPi B with the TC7.0. I'm not able to reduce the clock below 700MHz with the:
Code: (bash) [Select]
sudo chown tc /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 400000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
The value is limited to 700MHz as a minimum and it may be only increased.
The only way how to go down it to use the arm_freq_min in the config.txt, but it reduce the speed during the boot, before the
arm_freq take a place. It makes 1-2 sec. delay.
This was working well at TC6.0.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: CPU clock setup issue
« Reply #1 on: November 10, 2015, 01:22:53 AM »
piCore 7.0 kernels with with performance default CPU frequency governor, same way as piCore 6.x


Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
Re: CPU clock setup issue
« Reply #2 on: November 10, 2015, 05:56:38 PM »
Hi Béla,

yes, that's correct. Performance is fine, but there need to be something different in the config what disables to override the config.txt armcpu_freq_min with the "echo 400000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq". Even I enable the access with chown tc. Write doesn't report any error, but it's not changed.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: CPU clock setup issue
« Reply #3 on: November 11, 2015, 01:58:10 AM »
Why do you want to override config.txt setting? Setting invalid frequency is omitted. I'm not sure 400MHz is a valid value, check with cpufreq-info

Regular way is to use cpufreq-set from cpufreq-utils.tcz
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
Re: CPU clock setup issue
« Reply #4 on: November 11, 2015, 07:47:43 AM »
As I've explained before. I need boot as fast as possible and than reduce the frequency to save battery energy. At TC6 I'm using even 100MHz clock and everything works well. When I use armcpu_freq_min=400 in the config.txt, than it slows down the boot speed.

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 404
Re: CPU clock setup issue
« Reply #5 on: November 11, 2015, 08:10:24 AM »
My understanding is setting Overclock governor to Performance means cpuinfo_cur_freq equals cpuinfo_max_freq all the time.
Setting the Overclock governor is dynamic, so you play around without a reboot.

scaling_available_governors: conservative ondemand userspace powersave performance

I think you need ondemand (or powersave??)

Have you tried this? This sets turbo mode for 30 seconds. This probably doesn't do much if Overclock governor is set to Performance though.
initial_turbo=30 #Does not affect warranty and speeds up boot.

I haven't tried powersave or initial_turbo myself.

More info here: http://haydenjames.io/raspberry-pi-2-overclock/

regards
Greg

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: CPU clock setup issue
« Reply #6 on: November 11, 2015, 08:15:23 AM »
As I've explained before. I need boot as fast as possible and than reduce the frequency to save battery energy. At TC6 I'm using even 100MHz clock and everything works well. When I use armcpu_freq_min=400 in the config.txt, than it slows down the boot speed.

If minimum=400 MHz and maximum=800 MHz with performance governor, CPU will run on 800 MHz. Are you saying that there is a bug in 4.0.y kernel, related to cpu frequency scaling?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline jgrulich

  • Sr. Member
  • ****
  • Posts: 341
    • GRULICH DESIGN - R&D Lab.
Re: CPU clock setup issue
« Reply #7 on: November 12, 2015, 07:24:31 AM »
Don't know if it's really bug, or it is some "improvement", but it's different compared to 3.12 kernel which works.
It's strange, but if I change the min. frequency after boot and set powersave governor, the boot is faster than when set min freq. in config.txt, even when used turbo.

I've tried this config fo TC7:

Code: (bash) [Select]
arm_freq_min=400
arm_freq=1000
core_freq=500
sdram_freq=600
over_voltage=6
initial_turbo=60

with this modification in bootlocal.sh:

Code: (bash) [Select]
echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

When I use this config on TC6:

Code: (bash) [Select]
arm_freq=1000
core_freq=500
sdram_freq=600
over_voltage=6

with this modification in bootlocal.sh:

Code: (bash) [Select]
echo 400000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

The TC6 is 2 sec. faster at boot with the same SD card, same config of the initrd file (build from scratch from TC7 repo).