Author Topic: Suspend Problems, Poss Solution  (Read 2264 times)

kclayton

  • Newbie
  • *
  • Posts: 19
    • View Profile
Suspend Problems, Poss Solution
« on: May 16, 2005, 07:42:02 am »
Hi all,

Got an 860 a couple of weeks ago after a few years w/5500.    Running rc9.1 and its quite awesome.    This is what I've been looking out of a handheld . . more of a micro laptop.  Great work.  Now I was humming along when I had a firefox induced lockup (out of memory?) and after that/ when I'd suspend, the clcok/date would reset to the install date X input would lock up and I'd have to remove the battery to restart.

Searching the forum makes this sound like a consistent prob across RCs.   Lots of suggested tweaks to apm but nothing worked for me.  Googling lead to a zdebian tidbit about the hardware clock and sethwclock.   After removing the battery/ it appears the hwclock is reset and date --set doesn't modfy that.  After a crash/battery removal, I was doing date --set and all seemed fine but on a suspend, when the z woke up, X would check the hw clock in some fashion (now reset b/c of battery pull) and it must be comparing the time to the time on some lock file/or something.  Current time in hw is now earlier than lock file time and I'm guessing X fraks and game over.

After a battery pull, I've done date --set then sethwclock and suspend works normally and without issue once again

Hope this helps . . cheers Keith

gervin23

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • http://
Suspend Problems, Poss Solution
« Reply #1 on: August 11, 2005, 05:24:54 pm »
this solution worked nicely with rc10 and my c860. X froze after every suspend because the clock changed back x days upon resume.

my solution was to load ntpdate through a startup script and add sethwclock:
Code: [Select]
-----------------------------------------------------------------
/etc/rc.d/init.d/ntpdate
-----------------------------------------------------------------
#!/bin/bash

#
# /etc/rc.d/init.d/S65ntpdate - Start the inetd daemon(s).
#

# Comment out the following exit line to enable this script.
# exit 0

# Source function library.
. /etc/rc.d/init.d/functions

CLIENT="/usr/bin/ntpdate"
TIMESERVER="-b -u pool.ntp.org"

case "$1" in

    start)
        msg -n "Starting ntpdate:"
        exec $CLIENT $TIMESERVER 2>/dev/null >/dev/null
        exec sethwclock -systohc
        msg
       ;;

    stop)
       ;;

    restart)
        $0 stop
        sleep 1
        $0 start
       ;;

    *)
        echo "Usage: $0 (start|stop|restart)"            
        exit 1
       ;;

esac    

exit 0
-----------------------------------------------------------------