View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 58 posts ] 
Go to page Previous  1, 2, 3, 4  Next

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Still no luck
PostPosted: Tue Feb 20, 2007 10:20 pm 
Offline
Joined: Tue Oct 24, 2006 8:13 pm
Posts: 40
I tried changing the /tmp/alarm line in hwclock.sh; still the day is zero'd after rebooting.

I set /proc/acpi/alarm to todays date, 2-20. I notice that RTC alarm date in bios was [18]. There's no entry in bios for RTC alarm, hour, or minute. Is that odd?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 25, 2007 9:04 am 
Offline
Joined: Tue Feb 14, 2006 4:45 am
Posts: 21
Location: UK
Pairajacks - not sure why you have an RTC day but not time.

When you say the alarm date is [18] is that the 18th? what can you set this too (1-31? or 1-365?).

Maybe have a look through the bios settings and see if there is something that sounds similiar to RTC (wake up alarm / autopower on etc) - might be an idea to check the power settings (I think mines acpi S1 & S3) changing this might give you more options.

Also see if you can get the machine to wake up using the bios settings that will at least tell you it can do it (I think some older motherboards maynot have a RTC alarm at all - or may require a bois upgrade to do it)


Top
 Profile  
 
 Post subject: Re: Still no luck
PostPosted: Mon Feb 26, 2007 2:30 am 
Offline
Joined: Mon Jun 21, 2004 5:28 am
Posts: 700
Location: Germany
pairajacks wrote:
I tried changing the /tmp/alarm line in hwclock.sh; still the day is zero'd after rebooting.

I set /proc/acpi/alarm to todays date, 2-20. I notice that RTC alarm date in bios was [18]. There's no entry in bios for RTC alarm, hour, or minute. Is that odd?
You say the day is zeroed. Is the time set?

Some BIOSes don't support a wakeup date. Only a time. The date on mine always shows jan 01 00, but the time is set correctly. I use mythwelcome's daily wakeup to ensure my next wakeup is in the next 24h.

I suggest you find out what your BIOS supports. Maybe in only supports hours (ex. 18 = 18h or 6pm). If that's the case, then ACPI will only support a wakeup hour (i.e. ignore the date and minute).

_________________
ASUS AT3N7A-I (Atom 330)
TBS 8922 PCI (DVB-S2)


Top
 Profile  
 
PostPosted: Wed Feb 28, 2007 12:29 am 
Offline
Joined: Tue Oct 24, 2006 8:13 pm
Posts: 40
It does seem to keep the time and throw away the date:

After setting the alarm...
root@mythtv:/usr/bin# cat /proc/acpi/alarm
2007-02-25 11:51:04

After reboot ....
root@mythtv:/home/mythtv# cat /proc/acpi/alarm
2007-02-00 11:51:04

I suppose I should set the RTC alarm to "every day" and try the mythwelcome daily wakeup ... I'm on R5d1; isn't mythwelcome only on R5e?

I'm surprised that my motherboard doesn't seem to have full RTC functionality. My motherboard is very new, and recomended by several HTPC threads. It's an ASUS A8N-VM CSM board.

The only choice I have in Bios is under APM Configuration;

Suspend Mode (Auto, S1 pos only, S3 only)
Power On By RTC Alarm
RTC Alarm Date [18] (I can set this to 1-31 or "every day")
System Time 12:30:30


Top
 Profile  
 
PostPosted: Wed Feb 28, 2007 1:52 am 
Offline
Joined: Tue Oct 24, 2006 8:13 pm
Posts: 40
I got the PC to start by entering a time (and date) 15 hours in the future (The system time reported by bios is 15 hours ahead).

However, the wakeup script from an earlier post doesn't seem to work for me. I have no idea what the syntax of these commands are. Also tried the original script from the wiki to no avail.

root@mythtv:/usr/bin# echo "2007-02-28 07:05:04" >/proc/acpi/alarm
root@mythtv:/usr/bin# cat /proc/acpi/alarm
2007-02-28 07:05:04
root@mythtv:/usr/bin# wake.sh
root@mythtv:/usr/bin# cat /proc/acpi/alarm
1943-01-01 00:00:01

Wake.sh
#!/bin/bash

# Script to set wakeup time using acpi alarm
hwclock --systohc

#for testing
#stamp_file=/home/mythtv/timestamp

#convert from stupid time in seconds since 1970
# b=$(date -d "1970-01-01 UTC $2 sec" +%F\ %T)

#convert from stupid time in seconds since 1970
b=$(date -ud "1970-01-01 UTC $2 sec" +%F\ %T\ %z)
# write the time to a test file
#echo $1\ $2 \$b >$stamp_file

#write wakeup time to acpi alarm
echo $b>/proc/acpi/alarm


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 28, 2007 3:14 am 
Offline
Joined: Mon Jun 21, 2004 5:28 am
Posts: 700
Location: Germany
1. The loss of the day/month/year in BIOS is exactly what I see. It is one of the biggest disappointments I had with my MB. It can be fixed by setting a daily wakeup in mythwelcome. I have a cron job that performs backups, nxtvepg grabs, etc. during the wakeup, so it has turned out okay.

2. I believe that mythwelcome was added in 0.19. It might be R5D1. If not, it might be possible to install it.

3. wake.sh has to be passed the wakeup time as a parameter. The first parameter is ignored and the second parameter is the wakeup time in seconds since 1970. To test it:

a) find out the time now "date +%s" and add 600 (10 min) to it.

b) Use this number to call wake.sh. Ex. "wake.sh asdf 1172653859"

Cheers,

Allen

_________________
ASUS AT3N7A-I (Atom 330)
TBS 8922 PCI (DVB-S2)


Top
 Profile  
 
PostPosted: Wed Feb 28, 2007 4:25 pm 
Offline
Joined: Wed Apr 28, 2004 10:42 pm
Posts: 405
Location: Bendigo, Victoria, Australia
pairajacks wrote:
II'm on R5d1; isn't mythwelcome only on R5e?

I am using R5D1 and mythwelcome is installed but isn't used by default. You need to change the startup scripts to run mythwelcome instead of mythfrontend.

tohc1 has instructions is this post:
http://mysettopbox.tv/phpBB2/viewtopic. ... 0150#80150

_________________
Paul Turpie
-------------
<--Is your location in your profile? Why not?


Top
 Profile  
 
PostPosted: Wed Feb 28, 2007 4:35 pm 
Offline
Joined: Wed Apr 28, 2004 10:42 pm
Posts: 405
Location: Bendigo, Victoria, Australia
pairajacks wrote:
I got the PC to start by entering a time (and date) 15 hours in the future (The system time reported by bios is 15 hours ahead).

What timezone are you in? (Your profile is missing location info.)
I thought you could only be 12hours +/- GMT (or 13 with Daylight savings.)

_________________
Paul Turpie
-------------
<--Is your location in your profile? Why not?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 28, 2007 11:18 pm 
Offline
Joined: Sat Sep 02, 2006 1:46 pm
Posts: 44
pairajacks,

I have the exact same mobo as you, and I have the ACPI wakeup working with it. It sounds like you almost have it, but the time is off. I wasn't able to use the script from the wiki as-is either. This is how a modified it to work for me.

Code:
#!/bin/bash
stamp_file=/home/mythtv/timestamp
echo $1\ $2 > $stamp_file
# Read the date in the locale time format and add the time-zone info to the stamp_file
datum=$(/bin/date -f $stamp_file +%F\ %T\ %z)
echo $datum > $stamp_file
# reinterpret this in utc and write to alarm
utcdatum=$(/bin/date -u -f $stamp_file +%F\ %T)
echo $utcdatum > $stamp_file
rm -f $stamp_file
echo $utcdatum >/proc/acpi/alarm


Hope this helps.

Update: I just checked the MythTV wiki page (http://www.mythtv.org/wiki/index.php/ACPI_Wakeup), and the script looks almost like mine. I could have swore that I changed it! I guess it got updated after I read it awhile back.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 8:45 pm 
Offline
Joined: Sat Jan 28, 2006 10:20 am
Posts: 32
Location: Hannover, Germany
Hello!
I tried a lot of settings and scripts now but it is not working. Motherboard is a Asus M2NPV-VM.
When I use your script from this posting directly (I named it acpialarm), it works - for example:
Code:
# sudo ./acpialarm 1 1173148724
# cat /proc/acpi/alarm
2007-03-06 03:38:44

But when I use the mythshutdown command from the mythwelcome-settings, it doesn't change anything:
Code:
# sudo mythshutdown --setwakeup "2007-03-06 20:10:00"
# cat /proc/acpi/alarm
2007-03-06 03:38:44

Of course I typed it in mythtv-setup and restarted the backend.
Any ideas?

_________________
Hauppauge WinTV Nova-S Plus PCI HowTo:
http://www.knoppmythwiki.org/index.php? ... SPlusHowTo


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 10:57 pm 
Offline
Joined: Wed Apr 28, 2004 10:42 pm
Posts: 405
Location: Bendigo, Victoria, Australia
kwbolte wrote:
Hello!
I tried a lot of settings and scripts now but it is not working. Motherboard is a Asus M2NPV-VM.
When I use your script from this posting directly (I named it acpialarm), it works - for example:
Code:
# sudo ./acpialarm 1 1173148724
# cat /proc/acpi/alarm
2007-03-06 03:38:44

But when I use the mythshutdown command from the mythwelcome-settings, it doesn't change anything:
Code:
# sudo mythshutdown --setwakeup "2007-03-06 20:10:00"
# cat /proc/acpi/alarm
2007-03-06 03:38:44

Of course I typed it in mythtv-setup and restarted the backend.
Any ideas?

The --setwakeup command just records that time in the database somewhere. It is the --shutdown option that actually sets the wakeup time.
Yes it is weird and it makes it a pain to test as it shuts down immediately after setting the time. You can try using the -v verbose argument for more information about whats happening.

The MythTV wiki article on mythwelcome has more info

_________________
Paul Turpie
-------------
<--Is your location in your profile? Why not?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 11:19 pm 
Offline
Joined: Sat Sep 02, 2006 1:46 pm
Posts: 44
kwbolte wrote:
Hello!
I tried a lot of settings and scripts now but it is not working. Motherboard is a Asus M2NPV-VM.
When I use your script from this posting directly (I named it acpialarm), it works - for example:
Code:
# sudo ./acpialarm 1 1173148724
# cat /proc/acpi/alarm
2007-03-06 03:38:44

But when I use the mythshutdown command from the mythwelcome-settings, it doesn't change anything:
Code:
# sudo mythshutdown --setwakeup "2007-03-06 20:10:00"
# cat /proc/acpi/alarm
2007-03-06 03:38:44

Of course I typed it in mythtv-setup and restarted the backend.
Any ideas?


I just learned alot by fixing up my setup. I originally messed up by setting the wakeup time directly with my script. This works O.K., but you can't use the daily wakeup feature in mythwelcome. You need to use mythshutdown. Now I know why everyone else's script was refering to that "seconds since 1970" format -- that's what mythshutdown uses. The next thing I figured out is that mythshutdown only accepts one time format (yyyy-mm-ddThh:mm:ss -- this was in an earlier post). Looks like your code fragment isn't using the right format. If you change the format in mythtv-setup, I think it will work. (At least, it is for me now)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 08, 2007 4:45 am 
Offline
Joined: Sat Jan 28, 2006 10:20 am
Posts: 32
Location: Hannover, Germany
jbm2131 wrote:
The next thing I figured out is that mythshutdown only accepts one time format (yyyy-mm-ddThh:mm:ss -- this was in an earlier post). Looks like your code fragment isn't using the right format. If you change the format in mythtv-setup, I think it will work. (At least, it is for me now)

Thank you, this and switching from UTC to local time made it to wake up finally. So now the next problems are coming ...

_________________
Hauppauge WinTV Nova-S Plus PCI HowTo:
http://www.knoppmythwiki.org/index.php? ... SPlusHowTo


Top
 Profile  
 
PostPosted: Wed Mar 21, 2007 12:49 am 
Offline
Joined: Tue Oct 24, 2006 8:13 pm
Posts: 40
Could it be that the Myth nvram-wakeup Command isn't getting the permission? (If I log on as root, I can get the PC to wake with:
/home/mythtv/wake_kl.sh x 1174457982

But as myth user:
sh-3.00$ sudo /home/mythtv/wake_kl.sh x 1174457982

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Password:


Top
 Profile  
 
PostPosted: Wed Mar 21, 2007 1:01 am 
Offline
Joined: Tue Oct 24, 2006 8:13 pm
Posts: 40
Seems to be a permissions problem.... ???? Aren't the myth-setup and mythwelcome commands (mythshutdown, etc) run from user mythtv?

As mythtv user, the following command is not allowed. Why?
sh-3.00$ sudo mythshutdown --shutdown

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Password:
Sorry, user mythtv is not allowed to execute '/usr/sbin/mythshutdown --shutdown' as root on mythtv.
sh-3.00$


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ] 
Go to page Previous  1, 2, 3, 4  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu