FedoraForum.org - Fedora Support Forums and Community
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Location
    Front Royal, Va
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HDAPS on F11???

    Has anyone tried to get HDAPS running with F11 yet?

    I get so far as to apply the new drivers from the latest tp_smapi, but the start script they recommend on the Ubuntu how-to doesn't apply to F11. Not sure if I should just copy the hdapsd binary to /etc/init.d or if anyone else has a good script for it.

  2. #2
    Join Date
    Mar 2004
    Location
    Front Royal, Va
    Posts
    124
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I made excellent progress this weekend and almost have a perfect, working implementation of HDPAS on F11.

    Here's the content of a post I put up elsewhere. Hope it helps:

    While it's Memorial Day weekend, I couldn't help myself but to try to
    get HDAPS working on F11. It took a bit of searching and some
    modifications and if anyone would like to clean things up in the efforts
    of packaging for OC, I would welcome that.

    Here's what I did:

    1. You need 3 things to get started, tp_smapi, hdapsd and
    gnome-hdaps-applet. Here's where I found the sources:

    > > http://sourceforge.net/project/showf...kage_id=171579

    > > http://sourceforge.net/project/showf...kage_id=308030

    > > http://www.zen24593.zen.co.uk/hdaps/

    2. In compiling tp_smapi, they recommend you remove hdaps.ko,
    thinkpad_ec.ko and tp_smapi.ko. After you've built and installed all 3,
    you need to add the following to /etc/modprobe.d/local.conf:

    > > # enable thinkpad_ec
    > > options thinkpad_ec force_io=1
    > >
    > > # option to correctly set tilting through hdaps sensor
    > > options hdaps invert=1

    3. Now the glue to pull it all together. I could not find how modules
    are loaded in F11 and when I do, I will do things proper, however, for
    the time being, I'm loading hdaps from /etc/rc.local. None of the above
    provides an init script, so I found one from 2006, but it did not work.
    I modified it as follows:

    > > [SMcMackin@localhost modprobe.d]$ more /etc/init.d/hdapsd
    > > #!/bin/bash
    > > #
    > > # /etc/rc.d/init.d/hdapsd
    > > #
    > > # Starts the hdapsd daemon
    > > #
    > > # chkconfig: 345 95 5
    > > # description: Monitors harddrive accleration and momentarily parks
    > > # disk head to protect against a possible crash from excessive
    > > # jerks.
    > > # processname: hdapsd
    > >
    > > # Source function library.
    > > . /etc/init.d/functions
    > >
    > > test -x /usr/sbin/hdapsd || exit 0
    > >
    > > RETVAL=0
    > >
    > > #
    > > # See how we were called.
    > > #
    > >
    > > prog="hdapsd"
    > > dev="sda"
    > > thresh="15"
    > >
    > > start() {
    > > /usr/sbin/hdapsd -f -d sda -s 15 -a -y -b
    > >
    > > # modprobe hdaps
    > > # # Check if hdapsd is already running
    > > # if [ ! -f /var/lock/subsys/hdapsd ]; then
    > > # echo -n $"Starting $prog: "
    > > # for thisdev in $dev; do
    > > # if [ -w "/sys/block/$thisdev/queue/protect" ]; then
    > > # /usr/sbin/hdapsd -f -d $thisdev -s $thresh -a -y -b
    > > # echo -n "$thisdev "
    > > # fi
    > > # done
    > > # RETVAL=$?
    > > # [ $RETVAL -eq 0 ] && touch /var/lock/subsys/hdapsd
    > > # [ $RETVAL -eq 0 ] && success $"hdapsd startup" || failure $"hdapsd
    > > startup"
    > > # echo
    > > # fi
    > > # return $RETVAL
    > > }
    > >
    > > stop() {
    > > echo -n $"Stopping $prog: "
    > > killproc /usr/sbin/hdapsd
    > > RETVAL=$?
    > > [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/hdapsd
    > > echo
    > > return $RETVAL
    > > }
    > >
    > > pause() {
    > > echo -n $"Temporarily pausing $prog: "
    > > killproc /usr/sbin/hdapsd -SIGUSR1
    > > RETVAL=$?
    > > echo
    > > return $RETVAL
    > > }
    > >
    > > restart() {
    > > stop
    > > start
    > > }
    > >
    > > reload() {
    > > restart
    > > }
    > >
    > > status_hdaps() {
    > > status /usr/sbin/hdapsd
    > > }
    > >
    > > case "$1" in
    > > start)
    > > start
    > > ;;
    > > stop)
    > > stop
    > > ;;
    > > reload|restart)
    > > restart
    > > ;;
    > > condrestart)
    > > if [ -f /var/lock/subsys/hdapsd ]; then
    > > restart
    > > fi
    > > ;;
    > > condpause)
    > > if [ -f /var/lock/subsys/hdapsd ]; then
    > > pause
    > > fi
    > > ;;
    > > status)
    > > status_hdaps
    > > ;;
    > > *)
    > > echo $"Usage: $0 {start|stop|restart|condrestart|status|condpause}"
    > > exit 1
    > > esac
    > >
    > > exit $?
    > > exit $RETVAL

    That's that...

    Add the gnome-hdaps-applet to your panel and reboot. You may want to
    play with the sensitivity settings or other components of hdapsd, but
    this is certainly a start.

    In Ubuntu Jaunty, they make this much easier, but not as easy as
    installing some packages and done. Still some modifications required.

    Have fun...

Similar Threads

  1. Thinkpad HDAPS Kernel Patch for 2.6.23.9
    By SiriusStarr in forum Hardware
    Replies: 3
    Last Post: 18th January 2008, 04:58 AM
  2. HDAPS - Thinkpad
    By erlend_oyen in forum Hardware
    Replies: 1
    Last Post: 12th April 2007, 12:18 AM
  3. hdaps problem
    By hsJc in forum Hardware
    Replies: 0
    Last Post: 16th December 2006, 03:26 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •