FC3: Power Management on Sharp MM20
Frank
FIR at Frank.net
Thu Nov 18 00:19:05 UTC 2004
Years ago I was comfy with *nix, but that was years ago and much has
changed. I've recently switched my laptop from Windows to FC3 as part
of a plan to reverse the trend. It's been a rough ride.
Sound isn't working, but that's not a high priority for me. Power
management isn't working, and that really matters a lot. I need to slow
down the processor when I'm on battery or my battery life sucks.
I have acpid recognizing the AC_adaptor events, and I'm running the
following script (borrowed from somewhere and modified to add debug info.)
------
CPUNODE=/dev/cpu/0
LOGFILE=/var/log/acpid
MYNAME=$0
_log()
{
echo "[`date`]" $MYNAME $* >> $LOGFILE
}
_cmd()
{
$* || (_log COMMAND FAILED: $*;exit 1)
}
_log $*
if [ ! -d $CPUNODE ]; then
_cmd mkdir /dev/cpu
_cmd mkdir /dev/cpu/0
fi
if [ ! -c /dev/cpu/0/cpuid ]; then
_cmd mknod /dev/cpu/0/cpuid c 203 0
fi
if [ ! -c /dev/cpu/0/msr ]; then
_cmd mknod /dev/cpu/0/msr c 202 0
fi
case "$4" in
00000001)
#echo "brightness: 7" > /proc/acpi/toshiba/lcd
_cmd longrun -f performance
_cmd longrun -s 0 100
;;
00000000)
#echo brightness: 1 > /proc/acpi/toshiba/lcd
_cmd longrun -f economy
_cmd longrun -s 0 0
;;
*)
echo "Usage: ac [00000000|00000001]"
exit 1
esac
exit 0
---------
Here's what I see in /var/log/acpid when I unplug the adapter and plug
it back in:
[Wed Nov 17 19:15:32 2004] received event "ac_adapter AC 00000080 00000000"
[Wed Nov 17 19:15:32 2004] notifying client 3616[500:500]
[Wed Nov 17 19:15:32 2004] executing action "/etc/acpi/ac_adaptor
ac_adapter AC 00000080 00000000"
[Wed Nov 17 19:15:32 2004] BEGIN HANDLER MESSAGES
[Wed Nov 17 19:15:33 EST 2004] /etc/acpi/ac_adaptor ac_adapter AC
00000080 00000000
longrun: error opening /dev/cpu/0/cpuid: No such device or address
[Wed Nov 17 19:15:33 EST 2004] /etc/acpi/ac_adaptor COMMAND FAILED:
longrun -f economy
longrun: error opening /dev/cpu/0/cpuid: No such device or address
[Wed Nov 17 19:15:33 EST 2004] /etc/acpi/ac_adaptor COMMAND FAILED:
longrun -s 0 0
[Wed Nov 17 19:15:33 2004] END HANDLER MESSAGES
[Wed Nov 17 19:15:33 2004] action exited with status 0
[Wed Nov 17 19:15:33 2004] completed event "ac_adapter AC 00000080 00000000"
[Wed Nov 17 19:15:35 2004] received event "ac_adapter AC 00000080 00000001"
[Wed Nov 17 19:15:35 2004] notifying client 3616[500:500]
[Wed Nov 17 19:15:35 2004] executing action "/etc/acpi/ac_adaptor
ac_adapter AC 00000080 00000001"
[Wed Nov 17 19:15:35 2004] BEGIN HANDLER MESSAGES
[Wed Nov 17 19:15:35 EST 2004] /etc/acpi/ac_adaptor ac_adapter AC
00000080 00000001
longrun: error opening /dev/cpu/0/cpuid: No such device or address
[Wed Nov 17 19:15:35 EST 2004] /etc/acpi/ac_adaptor COMMAND FAILED:
longrun -f performance
longrun: error opening /dev/cpu/0/cpuid: No such device or address
[Wed Nov 17 19:15:35 EST 2004] /etc/acpi/ac_adaptor COMMAND FAILED:
longrun -s 0 100
[Wed Nov 17 19:15:35 2004] END HANDLER MESSAGES
[Wed Nov 17 19:15:35 2004] action exited with status 0
[Wed Nov 17 19:15:35 2004] completed event "ac_adapter AC 00000080 00000001"
The device node in question does exist, but I get the same "No device or
address" error if I try to cat it. What more do I need to do to make
this work?
And a related question:
If I cat /proc/cpuinfo and it tells me a certain speed, is that the
maximum speed of the processor or the current speed?
I hope somebody can help. I've been googling and wrestling with this
for a week now.
Frank.
More information about the fedora-list
mailing list