Friday, July 07, 2006

Grokking the source

Back in the 'good old days' if you wanted to tweak a program on your system you downloaded the source from the author (if you hadn't already), made your changes and were done. It isn't quite as straightforward these days.

I'm trying to tweak cpufreq to idle down the CPU when the laptop lid is closed. Normally that would be a good use of the acpid event system. Execpt that my lid only generated an even when its closed, not when it is opened back up! So I'm going to add an option to cpufreq to check the lid status in /proc/acpi/button/lid/LID/state and when its closed set the CPU to its minimum frequency. Should be easy, right?

Nope. Not when you are running Fedora Core and their modified version of cpufreq. Apparently their startup script passes it a nice level (-n ). This wouldn't be so bad except that it gets passed by the daemon function and doesn't appear in my debugging echos. Arrgh.

So, I guess I'll do things the 'redhat way' and create a new diff for my changes and rebuild it as a rpm.

Progress? Maybe. But I'm starting to feel like a unix curmudgeon.

No comments: