Enabling power saving for the KT600

From MythTV Official Wiki
Revision as of 01:26, 19 November 2011 by Wagnerrp (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The http://www.daniel.nofftz.net/linux/Athlon-Powersaving-HOWTO.html page describes setpcihacks for different chipsets.

This is for the KT600 only

I create this script in `/etc/init.d/cool`

#! /bin/sh

N=/etc/init.d/cool

set -e

case "$1" in
  start)
        # Turn on Athlon powersaving for KT600 chipsets
        # from http://www.daniel.nofftz.net/linux/Athlon-Powersaving-HOWTO.html
        setpci -v -H1 -s 0:0.0 D2=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D2) | 0x80)))
        setpci -v -H1 -s 0:0.0 D5=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D5) | 0x02)))
        ;;
  stop|reload|restart|force-reload)
        setpci -v -H1 -s 0:0.0 D2=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D2) & 0x7f)))
        setpci -v -H1 -s 0:0.0 D5=$(printf %x $((0x$(setpci -H1 -s 0:0.0 D5) & 0xfd)))
        ;;
**)
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0
Then run
update-rc.d cool defaults 80

to enable it.