Results 1 to 9 of 9
Discuss OS X / semthex kernel loses 20 seconds each minute? at the AppleTV 1 - Hackint0sh.org; I've noticed that under OS X, my AppleTV's clock runs slow. Very, very slow. It ...
  1. #1
    Newbie Array

    Join Date
    Jun 2007
    Posts
    5
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Question OS X / semthex kernel loses 20 seconds each minute?

    I've noticed that under OS X, my AppleTV's clock runs slow. Very, very slow. It loses one second out of every three.
    This is too much for ntpd to keep up; ntpd throws in the towel. Now I have a silly script to check the time on another computer and (frequently!) reset the AppleTV's time, but this is only a crude stop-gap measure.
    How prevalent is this? I've noticed this with two different AppleTV's, purchased about a month apart. My set-up:
    • OS X Server 10.4.8
    • semthex SSE3-emulating kernel
    • graphics drivers updated from OS X 10.4.9

    The odd thing is that the lost time is not constant/regular. It will lose a second here, three seconds there, etc. The average is one second out of every three.
    I suspect either the power management or processor sleeping logic is unhappy, or the SSE3 emulation takes a big toll. Any ideas or suggestions?



  2. #2
    Newbie Array

    Join Date
    Jun 2007
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I also notice this problem, any solution there?
    How to write a script to auto update time?

  3. #3
    Newbie Array

    Join Date
    Jun 2007
    Posts
    5
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I chose a risky, extreme solution.

    Since I have another server with accurate time, I have a process started on the other server via an ssh connection. The process kicks out the time whenever the other server starts a new minute. On the AppleTV, I use that time to set the AppleTV's time.

    There are much better, less risky ways to set the clock based on another server. There are complications with just using ntpd, and with using date.

  4. #4
    Newbie Array

    Join Date
    Mar 2007
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I had mentioned this issue a month or so ago, but haven't heard anything...
    In addition, where are the source code files semthex promised to release, so that the communiy can fix this?

    I'm dying to have this fixed and see a possible update to a 10.4.9 kernel.

    I'm not sure, but the ratio of time lost looks like a 133 to 100 mhz bus conversion, or similar. Either way, I was using my appletv as a server, but it was too unreliable to correct the time repeatedly, and letting it go was unrealistic.

  5. #5
    Newbie Array

    Join Date
    Jun 2007
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Anyone can write the step by step to show how to automantic sync to time server?
    Thanks!


  6. #6
    Newbie Array

    Join Date
    Jun 2007
    Posts
    5
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    My lame solution:
    • copy this to an editor
    • change the variables to point to some server with ssh on your network
    • save as a script file
    • make it executable
    • accept the fact that it's really, really bad to shift the clock forward 20 seconds every minute
    • and run it as root.
    (change ^M to a single carriage return)

    Code:
    #!/bin/sh
    
    # Execute a timer loop on a remote host. Locally read the time reported
    # by the remote, using it to set the local time.  Time is set locally
    # at most once per minute.
    #
    # Assumes the current user has authority to set the clock.
    #
    # Status updates on each timer loop.  May not be friendly to all
    # terminals.
    #
    # Tolerance of +-2s controlled by ${tolerance}.
    #
    # Requires user intervention when SSH keys are not in place for
    # automatic login.
    
    remotehost=192.168.1.2
    remoteuser=someremoteuser
    tolerance=2
    
    # date [-nu] [-r seconds] [+format]
    #     %Y    is replaced by the year with century as a decimal number.
    #     %m    is replaced by the month as a decimal number (01-12).
    #     %d    is replaced by the day of the month as a decimal number (01-31).
    #     %H    is replaced by the hour (24-hour clock) as a decimal number
    #           (00-23).
    #     %M    is replaced by the minute as a decimal number (00-59).
    #     %S    is replaced by the second as a decimal number (00-60).
    
    date
    ssh ${remoteuser}@${remotehost} \
    '   while sleep 1
        do
            date +"%Y %m %d %H %M %S %s" | sed -e ''s,0\([0-9]\),\1,g'' | ( \
                read yr mo dy h m s e
                if [ $s -eq 0 -a \( $h -ne 0 -o $m -ne 0 \) ]
                then
                    echo $yr $mo $dy $h $m $e
                    sleep 57
                fi \
            )
        done ' | \
        while read yr mo dy h m e
        do
            date +"%s %c" | ( \
                read le lf
                delta=$(( le - e ))
                if [ $delta -gt ${tolerance} -o $delta -lt -${tolerance} ]
                then
                    # date [-u] mmddhhmm[[cc]yy]
                   echo -n "$lf -> `date $mo$dy$h$m$yr`   (${delta})       ^M"
                else
                   echo -n "$lf (${delta} - within ${tolerance} seconds)       ^M"
                fi \
            )
        done
    The output should be similar to this. The last line should get replaced whenever the clock is reset.
    Code:
    osxtv:~ root# ./fix-time.sh
    Thu Jul 19 14:11:51 PDT 2007
    Password:
    stty: stdin isn't a terminal
    Sun Jul 22 22:51:40 2007 -> Sun Jul 22 22:52:00 PDT 2007   (-20)

  7. #7
    Advanced Array

    Join Date
    Oct 2006
    Posts
    41
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Sounds like your fsb is set incorrectly add fsb=(whatever your fsb is) into apple.boot.plist

  8. #8
    Newbie Array

    Join Date
    Jun 2007
    Posts
    5
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Did semthex include fsb=xxx in the sse3 emu kernel? or the -y/-g/-z flag style?

    http://www.***********.com/blog/arch...-by-mifki.html

    I'll try out fsb=xxx.

  9. #9
    Newbie Array

    Join Date
    Jun 2007
    Posts
    5
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    In com.apple.Boot.plist, I tried fsb=133, fsb=100, -y, and -g . I also tried the nvram approach -
    Code:
    sudo nvram boot-args="fsb=100 -g srv=1"
    No dice. Still losing 20 seconds per minute.

 

 

Similar Threads

  1. Use semthex's kernel to run sse3 apps on aTV OS?
    By jphelp321 in forum AppleTV 1
    Replies: 0
    Last Post: 12-22-2007, 11:49 PM
  2. Semthex's opinion about efi
    By erhnam in forum Tiger
    Replies: 5
    Last Post: 04-22-2007, 02:19 PM
  3. Semthex makes the news :p
    By SnaRf in forum AppleTV 1
    Replies: 0
    Last Post: 04-09-2007, 06:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 06:25 PM.
twitter, follow us!