Tiny Core Extensions > TCE Q&A Forum

cpufreq, cant get it to work.

(1/3) > >>

pema:
I have installed cpufreq and hwmon but my cpu fan is still trying to spin out of the box. Using a laptop with AMD K6 cpu. Googled around and tried several commands and settings but no success. Is there any boot code or script for this ? The laptop-mode start reports its started. Noted some scripts are looking for files in /usr/sbin but I believe I backed them all up. Tips and support appreciated.

Juanito:
You may need the acpi "fan" module loaded to control the fan on your machine - I'm not at a tc machine at the moment, but if I recall correctly, "fan" is not in the base, it is in one of the kernel module extensions.

You could try starting the acpi and cpufreq daemons in terminal windows in "foreground" mode (see the acpi/cpufreqd --help for the exact command) - this may throw out some hints as to what the problem might be.

I don't have an amd machine to test, but on my intel speedstep laptop, one of the parameters cpufreq uses to control the cpu speed is to keep the temperature below a certain value - it's noticeable that when cpufreq is not loaded, the fan comes on a lot more often (my machine does not use the acpi "fan" module).

You could also play around with the temperature setting in the cpufreq conf file to see if that stops the fan coming on as often.

Note that in the default set-up for laptop-mode, the only thing it is controlling is the hd(s) - i.e. it will put the hd(s) into standby mode if they are not accessed for something like 5mins.

Edit: you could try:
--- Code: ---$ tce-load /path-to-file/hwmon-cpufreq-2.6.26.tcem
$ sudo modprobe fan
$ lsmod

Module                  Size  Used by
fan                     4996  0
...
battery                11012  0 [loaded at boot]
ac                      4996  0 [loaded at boot]

$ tce-load /path-to-file/cpufreq.tcel
$ sudo acpid -d -f
--- End code ---
..and see what you get when you disconnect/re-connect the power cord and when the fan starts/stops. This should tell you whether acpi controls the fan or not. If nothing shows up, we can move onto troubleshooting cpufreqd in a similar fashion.

pema:
@ juanito. Thank you for reply. Posting outputs here since Im not really sure what Im doing. (btw is there any small tool/prog for copying text from terminal to texteditor ?)
-sudo acpid -f gives nothing, just waiting for getting back to prompt and Im interrupting with cltr-c after a few minutes.
-sudo cpufreq -D gives output, short context:
* pmu/apm unit, no such file or dir
* remote control enabled
* unknown sensor plugin, nobody handles it
* unable to calculate absolute values for all profiles
* unable to normalize frequencies for all profiles
* unable to write pid file /var/run/cpufreqd.pid

- cant find any temperature settings in /etc/cpufreqd.conf
- battery is dead, if i pull the cord the fans stops with the computer.
- after modprobes, lsmod lists lot of modules as fan etc but cant find any cpu or temperature.
- sudo acpid -d -f gives parsing of  conf files for events lm_lid, lm_battery, lm_ac_adapter, all 3 rules loaded.

Cpufan is constantly running when computer is active, shuts off when computer is idle for a couple of minutes, no variation fan speed as with ubuntu. Googled around and saw people are turning off acpi at boot, what would control cpu and fan then ? Hope text is understandable.
//P

Juanito:
To cut & paste text from a terminal window, highlight it in the terminal window, click in the text editor and then either click with the 3rd mouse button to paste or (if you don't have a 3rd mouse button) click both mouse buttons at the same time to paste.

"sudo acpid -f" doesn't work for me either - as you say, "sudo acpid -f -d" is required. If you get a message about parsing the acpi event files, then I believe this shows acpid is working. I understand you cannot disconnect the power cord, but you could try briefly pressing the power button or closing/opening the lid to see if you get an acpi message shown after "sudo acpid -f -d".

Did you load the cpufreq modules as follows:
--- Code: ---$ sudo modprobe acpi-cpufreq
$ sudo modprobe cpufreq_conservative
$ sudo modprobe cpufreq_ondemand
$ sudo modprobe cpufreq_powersave
$ sudo modprobe cpufreq_userspace

$ lsmod
Module                  Size  Used by
cpufreq_userspace       4004  0
cpufreq_powersave       2688  0
cpufreq_ondemand        7180  0
cpufreq_conservative     6792  0
acpi_cpufreq            7436  0
freq_table              4256  2 cpufreq_ondemand,acpi_cpufreq
fan                     4996  0
...
battery                11012  0
ac
--- End code ---
Note that I believe "acpi-cpufreq" has superceded the cpu-specific modules.

You can then try the following in a new terminal window (with acpid still running in the other window):

--- Code: ---$ sudo cpufreqd -D -V5
apm_init                 : /proc/apm: No such file or directory
load_plugin_list         : discarded plugin apm
pmu_init                 : /proc/pmu/info: No such file or directory
load_plugin_list         : discarded plugin pmu
tau_init                 : /proc/cpuinfo file found
nforce2_post_conf        : Unconfigured, exiting.
plugins_post_conf        : Unable to configure plugin nforce2_atxp1, removing
cpufreqd_set_profile     : Profile "Performance High" set for CPU0

[disconnect power cord]
cpufreqd_set_profile     : Profile "On Demand High" set for CPU0

reconnect power cord]
cpufreqd_set_profile     : Profile "Performance High" set for CPU0
--- End code ---
Note that "-V6" and "-V7" will give even more data, you might want to try this to capture the data in a file to make it easier to check:
--- Code: ---$ script cpufreqd_log
$ sudo cpufreqd -D -V7
yada..yada
<ctrl-d>
beaver cpufreqd_log &
--- End code ---

As you say, you will not be able to disconnect the power cord as in my example, but you could wait and see what happens with the fan.

Note that the part of cpufreqd.conf controlling the temperature is:
--- Code: ---# CPU Too hot!
[Rule]
name=CPU Too Hot
acpi_temperature=55-100
cpu_interval=50-100
profile=Performance Low
[/Rule]
--- End code ---
i.e. if the temperature exceeds 55degC, the "Performance Low" profile will be followed.

Good luck and let me know how you get on.

pema:
I have really been struggling with this one but do not have any smart to say. For my computer the only cpu freq driver I can load is powernow-k7,
sudo modprobe acpi-cpufreq gives "error inserting acpi_cpufreq, device or resource busy", but I can see module is available at /lib/modules etc...

Command cpufreqd -D -V7 is "not found".

After "sudo modprobe cpufreq_ondemand" I still have "performance" as governor when doing "cat scaling_governor" in /sys/devices/system/cpu/cpu0/cpufreq, but lsmod shows correct driver and governor. Where is "performance" launched as governor ? It is not listed in laptop-mode config files.
Played around with temperature settings in cpu_freq.conf but could not notice any major difference.

During time I´ve been playing with the crunch bang ubuntu derivate and cpu-throttling works perfect with the powernowd tool.
Unfortunately I removed my tcl when playing with cb, and now I cant get laptop-mode started allthough I have the tce hwmon-cpufreq and cpufreq.tcel modules loaded, there is no laptop-mode prog in sbin or bin, could there be a dependency problem preventing laptop-mode-tools working properly ?
Any ideas ?

Navigation

[0] Message Index

[#] Next page

Go to full version