LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   acpi control prblms-help (https://www.linuxquestions.org/questions/slackware-14/acpi-control-prblms-help-368648/)

arunsri 10-01-2005 01:19 AM

acpi control prblms-help
 
I am running slack 10.1 with kernel 2.6.11. I have a toshiba laptop and have compiled the toshiba extras component as module in the kernel.

I want to control screen brightness , fan nd stuff to get maximum out of the battery. How can I do tht? I tried changing the value in /proc/acpi/toshiba but when I write in the file (as root ofcourse) it displays an error saying "Fsyns failed". Not sure wats goin on!!

Can nebody help me out? also someone pls. lemme kno if they can perform functions like standby, hibernate etc.

thanks
arun

Yalla-One 10-01-2005 02:04 AM

Hi,

As a starting point, make sure that in addition to the toshiba extra component, you have compiled in full ACPI support and CPU Frequency Scaling.

Under make menuconfig go to

Power Management Options (ACPI, APM) -> ACPI :
Select all from AC Adaptor to Processor Thermal Zone

Under Power Management Options (ACPI, APM) -> CPU Frequency Scaling:

Compile it in static (as in ACPI), and get the correct scaling governors as well as make sure you get the correct processor driver. Use dmesg to see what processor you have, and compile it in static under here (I'm on an HP laptop and thus use the Centrino chipset)

Maybe you've already done these things, but your post didn't state exactly what you had done or not, so I thought this would be a good starting point

-Y1

arunsri 10-02-2005 01:03 AM

I already have all of the ACPI settings compiled in to my kernel. but haven set the CPU freq scaling yet. Before doing that, I would like to know which governer should I chose and also can u tell me after I get my kernel recompiled how do I control the power settings? ( because the kernel-doc says setting CPU freq scaling wont automatically control the processor speed, but has to b done by the user).

Yalla-One 10-02-2005 06:52 AM

As for the cpufreq settings they obviously differ according to what kind of hardware you have, but you need to compile in[*] CPU frequency scaling at the very least, and I also recommend getting CPU Frequency translation statistics.
As for the governors, I have added powersave, userspace and ondemand. The last one, "ondemand", is the one I use, and with great success I might add.

In order for this to work you also need to include the correct CPUfreq processor driver. I've got a Centrino laptop, and thus I compiled in Intel Enhanced Speedstep.

As for the second part of your question, you need to decide if you want to decide the CPU frequency in userspace or in kernelspace. I (without remembering exactly why) started off with doing it in kernelspace, and since it works well, I've stuck with it. Thus I use the "ondemand" governor as I compiled in above. For future freedom of choice I left the other (userspace and powersave) in.

In order to change scaling governor and other ACPI-related settings (CPU speed etc), go to /sys/devices/system/cpu/cpu0/cpufreq directory and echo -n "ondemand" > scaling_governor.

In my rc.local I have added this to do it automatically when my system boots:

if [ -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ]; then
echo -n "Setting Scaling Governor : "
echo -n ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand"
fi

Alternatively you can do it in userspace, and find a power daemon called powernowd (google is your friend). It's also a great product, but like I said, I came to like the kernel taking care of it and since it works I stick with it.

This controls my CPU frequency and in turn controls the fan, so my system is nice and cool and gets the job done. Hope this helps, even though it might be slightly on the side of your initial problem

-Y1

arunsri 10-02-2005 04:46 PM

hey thnx for the detailed reply. After I recompiled the kernel wid the necc. configs set, I donot
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor file. Infact I donot have the subdirectory cpufreq under cpu0.

well the configs I chose are:
Default CPU governer - userspace
Then I added performance, powersave and 'ondemand' under userspace govn. section.

arunsri 10-02-2005 04:48 PM

hey also I have a Intel mobile pentium 4 cpu. So I chose all the Intel related drivers to be compiled as modules. Do I need to compile them into the kernel??

arunsri 10-02-2005 05:16 PM

Now I have the cpufreq subdir and all the files under /sys/devices/system/cpu/cpu0/. But I am not able to write into scaling_governer file. The default string 'userspace' appears in it.If I try to write, displays an error saying "error: Fsync failed!". Now wat is this?

SqdnGuns 10-03-2005 06:04 PM

Quote:

Originally posted by Yalla-One
As for the cpufreq settings they obviously differ according to what kind of hardware you have, but you need to compile in[*] CPU frequency scaling at the very least, and I also recommend getting CPU Frequency translation statistics.
As for the governors, I have added powersave, userspace and ondemand. The last one, "ondemand", is the one I use, and with great success I might add.

In order for this to work you also need to include the correct CPUfreq processor driver. I've got a Centrino laptop, and thus I compiled in Intel Enhanced Speedstep.

As for the second part of your question, you need to decide if you want to decide the CPU frequency in userspace or in kernelspace. I (without remembering exactly why) started off with doing it in kernelspace, and since it works well, I've stuck with it. Thus I use the "ondemand" governor as I compiled in above. For future freedom of choice I left the other (userspace and powersave) in.

In order to change scaling governor and other ACPI-related settings (CPU speed etc), go to /sys/devices/system/cpu/cpu0/cpufreq directory and echo -n "ondemand" > scaling_governor.

In my rc.local I have added this to do it automatically when my system boots:

if [ -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ]; then
echo -n "Setting Scaling Governor : "
echo -n ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand"
fi

Alternatively you can do it in userspace, and find a power daemon called powernowd (google is your friend). It's also a great product, but like I said, I came to like the kernel taking care of it and since it works I stick with it.

This controls my CPU frequency and in turn controls the fan, so my system is nice and cool and gets the job done. Hope this helps, even though it might be slightly on the side of your initial problem

-Y1

You 'da man Y1, worked perfectly for me!! :D


All times are GMT -5. The time now is 11:19 PM.