Laptop ATI CPU & HDD Control Code
Brought to you by:
eviltuxlover
--------------------------------------------------------------- LACH - Laptop ATI CPU & HDD Control --------------------------------------------------------------- * This program was made for battery saving in my laptop and CPU overheating management by using of linux kernel CPUFreq and ACPI functions. This is made by putting the CPU at the lower required speed and spinning down the HDD to save some minutes of battery. * I've programmed this like a hobbie (who the hell has programming as an hobbie) so, if something isn't in the best way I realy thank people that mail me with ideas for some of the algorithms and functions implementations. * Also implemented a radeon clock scaling function so we can slow down things here to get less power consuption. * Also i've implemented a TCP daemon for non-root user's can change the CPU speed withou having to be root. This option will be disabled by default for security reasons, when it is 100% functional it will be added as default configuration. * The makefile now implements arquitecture compiler optimizations, see makefile before compile. * In my Pentium4 laptop i'm getting some lag to get the CPU up getting the app's some slow response until lach get's cpu speed up. This doesn't happens in pentium M possibly because of the clock modulation being diferent. Need to tune the thresholds by doing some policy changes. * Using version 2.6.16 linux kernel in my p4 with HT the cpu that had cpufreq enabled became the cpu1 instead of cpu0 so i needed to implement a way to detect that. It's a little rubbish but i think it will work. Also i'm gettin a lot of latency in procFS making IO access slower. * Also in the 2.6.16 some pentium4 are locked at 2GHz minimum because the N60 intel errata. There's some workaround that can be done but not recomended. * See lach-ati.c for oficial GPU scaling. * LACH's network protocol is in development, it's possible to remote monitor computer status and change some of the policies. It would be great to have a GUI in KDE or GNOME with suport for multiple computer status/control. The next step would be changing the socket programming to a non-blocking socket or a thread, so i can remove the need for 2 process. This will take some time. * After version 0.5.5 were added --performance and --battery policys wich make lach has a better response or a more paranoical battery powersave mode. --------------------------------------------------------------- * So for this to work you'll need: - Linux kernel >=2.6.20 with: (recomended) - CPUFreq module (with userspace governor and you clock modulator) - ACPI (with all options) - proc filesystem (mounted in /proc) - sys filesistem (mounted in /sys) - hddtemp (to get HDD temp) - hdparm (to set HDD in spindown mode) - modprobe (to load modules) * For ATI Cards reported to work (see lach-ati.c for more info): --------------------------------------------------------------- For instaling: # make # make install * The program is instaled in /usr/bin/lach. --------------------------------------------------------------- Enjoy! P.S. - If anything reply to gothicknight@gmail.com