Kernel default frequency scaling governor

Discussion about U-Boot and the kernel.

Kernel default frequency scaling governor

Postby agongon » Sat May 25, 2013 3:52 pm

Hi all, not quite sure if this is the place to post this.

I've got my beaglebone black a few days ago. I had some troubles powering it up since it's USB powered and as it seems the default boot-up governor is set to "performance". I had to get a PSU.

So I have two questions. The firs one is why does the AL-ARM kernel default to performance when its set to ondemand on the rest of platforms? And the second one is if there is any way to change the governor for the boot process which doesn't require to build a custom kernel. Its a pitty I cant plug my board via USB on the go and play with it without trouble.

PS: I know how to change it once the system is up and running. I want to change it for the boot process.
agongon
 
Posts: 5
Joined: Sat May 25, 2013 3:28 pm

Re: Kernel default frequency scaling governor

Postby WarheadsSE » Sat May 25, 2013 10:26 pm

try cpufreq.governor=ondemand
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Kernel default frequency scaling governor

Postby agongon » Sun May 26, 2013 10:19 am

$this->bbcode_second_pass_quote('WarheadsSE', 't')ry cpufreq.governor=ondemand

This will change the governor once the system is booted up (and I run it manually or a script does it for me). Or am I wrong? Right now I've got /etc/cpufreq-bench.conf configured to switch to "ondemand" once the service is run.

As I understood it from other threads on the forum, the default governor set in the kernel itself. I'm looking for a way to change it before the system even starts booting, like a UBoot parameter or the sort...
agongon
 
Posts: 5
Joined: Sat May 25, 2013 3:28 pm

Re: Kernel default frequency scaling governor

Postby WarheadsSE » Sun May 26, 2013 6:20 pm

I understand that. I was saying try using that in the kernel command line
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Kernel default frequency scaling governor

Postby agongon » Wed May 29, 2013 6:59 pm

$this->bbcode_second_pass_quote('WarheadsSE', 'I') understand that. I was saying try using that in the kernel command line

Oh sorry, I misunderstood. I documented my self on uBoot kernel argument passing and tried adding optargs="cpufreq.governor=ondemand" at the end of uEnv.txt without luck. Nothing worked. I think it's because I dont have "cpufrequtils" installed, but cpupower instead.

So, what kernel module can I use to change the frequency?* as "cpufreq" seems not to be installed. But this should be completely independent from what I have installed, since it should be a kernel module. I'm completely lost at this point.

*I've already intensively googled with no luck.
agongon
 
Posts: 5
Joined: Sat May 25, 2013 3:28 pm

Re: Kernel default frequency scaling governor

Postby pepedog » Wed May 29, 2013 9:31 pm

I can't test this, btw
On the raspberry pi you can do this
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Do cpu1 too for the beagle bone I presume.
So following https://wiki.archlinux.org/index.php/Systemd#Temporary_files pick an early service
/etc/tmpfiles.d/nameofchosenservice.conf
$this->bbcode_second_pass_code('', 'w /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - - - - ondemand
w /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - - - - ondemand')
Hope it is early enough
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Kernel default frequency scaling governor

Postby agongon » Thu May 30, 2013 6:34 pm

$this->bbcode_second_pass_quote('pepedog', '/')etc/tmpfiles.d/nameofchosenservice.conf
$this->bbcode_second_pass_code('', 'w /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - - - - ondemand')

I tested this and it works, but not soon enough. Power consumption is still to high during the boot process, even using "powersave" instead of "ondemand", causing the board to shutdown when USB-powered.
agongon
 
Posts: 5
Joined: Sat May 25, 2013 3:28 pm
Top

Re: Kernel default frequency scaling governor

Postby kmihelich » Wed Jun 12, 2013 2:47 am

The latest bootloader tarball available on the installation page has a fix in the uEnv.txt for allowing >500mA through the mini-USB port.

You can also add this to your current uEnv.txt by adding the following command to uenvcmd:
$this->bbcode_second_pass_code('', 'i2c mw 0x24 1 0x3e')

To make it look like this:
$this->bbcode_second_pass_code('', 'uenvcmd=run findfdt; if test $board_name = A335BNLT; then i2c mw 0x24 1 0x3e; setenv mmcde.....')

However, because we know it can draw over 500mA, we recommend using a USB charger that can supply more than this as opposed to a port on a computer.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm


Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 6 guests