Re: [gentoo-user] Scheduled wakeup from suspend to ram

2010-01-12 Thread Frank Steinmetzger
Am Sonntag, 10. Januar 2010 schrieb Daniel Pielmeier:
 Frank Steinmetzger schrieb am 10.01.2010 18:11:
  Hi Group
 
  one of the very last things I still need Win***s for is to wake me up in
  the morning: I set up a task schedule to launch a playlist with Winamp.
  Do you know of any way to let my laptop go on again automatically after I
  put it to sleep in its RAM?
 
  In case it helps: I'm running 32 bit i686, version 2.6.30.
 
  TIA

 You can use the real time clock to wake up from suspend to ram.

 # Set alarm to 0
 echo 0  /sys/class/rtc/rtc0/wakealarm
 # Set new alarm time
 date '+%s' -d '+5 minutes'  /sys/class/rtc/rtc0/wakealarm
 # Suspend to ram
 echo mem /sys/power/state

 If you don't have /sys/class/rtc/rtc0/wakealarm you need to enable rtc
 support in your kernel.

Thanks for the hint, that sounds promising. However, I didn’t 
have /sys/classes/rtc and since I didn’t know what I need for my ICH-7 
chipset, I compiled everything I could find under Device Drivers/RTC. Then I 
loaded all those modules, but apart from an empty directory /sys/classes/rtc, 
the only reaction at all that I got in my syslog was:

kernel: rtc_cmos: probe of 00:07 failed with error -16

:(
Well, I’ll dig into it further...
-- 
Gruß | Greetings | Qapla'
I decided to go on a strict diet. I cut out alcohol, all fats
and sugar. In two weeks I lost 14 days. - Tim Maia


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Scheduled wakeup from suspend to ram

2010-01-11 Thread Stroller


On 10 Jan 2010, at 22:09, Alan McKinnon wrote:

...
This was my reaction, too, but c'mon, Linux's sleep functionality  
must

have a rewake feature, mustn't it?


I dunno. Think about this - in suspend, nothing is working and no  
user-code is
running. The only power consumed is what is needed to refresh RAM.  
That must

be there otherwise the content goes away if you try and resume.

So what part of the machine is powered to be able to wake it up? PCs  
don't
have alarm clocks, the on-board clock can't usually do it, so the  
only option
is for some code to be running, polling the time and cause the  
system to wake

up. Which is exactly what suspend does not do.


PCs have a BIOS feature that allows them to be woken at a specific  
time. I think you can use Linux to set that time, then hibernate; I'm  
not sure about sleep. It's certainly common amongst MythTV users to  
set their machines to go into a low-power mode and then wake them in  
time to record a TV show, but I don't know the mechanics.


Other posts may be more informative.

Stroller.



[gentoo-user] Scheduled wakeup from suspend to ram

2010-01-10 Thread Frank Steinmetzger
Hi Group

one of the very last things I still need Win***s for is to wake me up in the 
morning: I set up a task schedule to launch a playlist with Winamp. Do you 
know of any way to let my laptop go on again automatically after I put it to 
sleep in its RAM?

In case it helps: I'm running 32 bit i686, version 2.6.30.

TIA
-- 
Gruß | Greetings | Qapla'
Press any key to continue, or any other key to quit.


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Scheduled wakeup from suspend to ram

2010-01-10 Thread Alan McKinnon
On Sunday 10 January 2010 19:11:52 Frank Steinmetzger wrote:
 Hi Group
 
 one of the very last things I still need Win***s for is to wake me up in
  the morning: I set up a task schedule to launch a playlist with Winamp. Do
  you know of any way to let my laptop go on again automatically after I put
  it to sleep in its RAM?
 
 In case it helps: I'm running 32 bit i686, version 2.6.30.
 
 TIA
 

Sounds like a classic case of being WAAAY too complicated. 

Have you considered buying a cheap alarm clock?
Or setting your phone to play a tune for an alarm?

-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] Scheduled wakeup from suspend to ram

2010-01-10 Thread Frank Steinmetzger
Am Sonntag, 10. Januar 2010 schrieb Alan McKinnon:
 On Sunday 10 January 2010 19:11:52 Frank Steinmetzger wrote:
  Hi Group
 
  one of the very last things I still need Win***s for is to wake me up in
   the morning: I set up a task schedule to launch a playlist with Winamp.
  Do you know of any way to let my laptop go on again automatically after I
  put it to sleep in its RAM?
 
  In case it helps: I'm running 32 bit i686, version 2.6.30.
 
  TIA

 Sounds like a classic case of being WAAAY too complicated.

 Have you considered buying a cheap alarm clock?
 Or setting your phone to play a tune for an alarm?

The phone serves as alarm clock by blaring out lout sounds that need to be 
pressed away. :o)
-- 
Gruß | Greetings | Qapla'
Concious smokers drink decaf.


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Scheduled wakeup from suspend to ram

2010-01-10 Thread Stroller


On 10 Jan 2010, at 18:45, Alan McKinnon wrote:

On Sunday 10 January 2010 19:11:52 Frank Steinmetzger wrote:
one of the very last things I still need Win***s for is to wake me  
up in
the morning: I set up a task schedule to launch a playlist with  
Winamp. Do
you know of any way to let my laptop go on again automatically  
after I put

it to sleep in its RAM?

In case it helps: I'm running 32 bit i686, version 2.6.30.


Sounds like a classic case of being WAAAY too complicated.

Have you considered buying a cheap alarm clock?
Or setting your phone to play a tune for an alarm?


This was my reaction, too, but c'mon, Linux's sleep functionality must  
have a rewake feature, mustn't it?


Stroller.



Re: [gentoo-user] Scheduled wakeup from suspend to ram

2010-01-10 Thread Alan McKinnon
On Sunday 10 January 2010 23:40:57 Stroller wrote:
 On 10 Jan 2010, at 18:45, Alan McKinnon wrote:
  On Sunday 10 January 2010 19:11:52 Frank Steinmetzger wrote:
  one of the very last things I still need Win***s for is to wake me
  up in
  the morning: I set up a task schedule to launch a playlist with
  Winamp. Do
  you know of any way to let my laptop go on again automatically
  after I put
  it to sleep in its RAM?
 
  In case it helps: I'm running 32 bit i686, version 2.6.30.
 
  Sounds like a classic case of being WAAAY too complicated.
 
  Have you considered buying a cheap alarm clock?
  Or setting your phone to play a tune for an alarm?
 
 This was my reaction, too, but c'mon, Linux's sleep functionality must
 have a rewake feature, mustn't it?

I dunno. Think about this - in suspend, nothing is working and no user-code is 
running. The only power consumed is what is needed to refresh RAM. That must 
be there otherwise the content goes away if you try and resume.

So what part of the machine is powered to be able to wake it up? PCs don't 
have alarm clocks, the on-board clock can't usually do it, so the only option 
is for some code to be running, polling the time and cause the system to wake 
up. Which is exactly what suspend does not do.

Wake-on-LAN can do it, but that's not what the OP wants.

-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] Scheduled wakeup from suspend to ram

2010-01-10 Thread Daniel Pielmeier
Frank Steinmetzger schrieb am 10.01.2010 18:11:
 Hi Group
 
 one of the very last things I still need Win***s for is to wake me up in the 
 morning: I set up a task schedule to launch a playlist with Winamp. Do you 
 know of any way to let my laptop go on again automatically after I put it to 
 sleep in its RAM?
 
 In case it helps: I'm running 32 bit i686, version 2.6.30.
 
 TIA

You can use the real time clock to wake up from suspend to ram.

# Set alarm to 0
echo 0  /sys/class/rtc/rtc0/wakealarm
# Set new alarm time
date '+%s' -d '+5 minutes'  /sys/class/rtc/rtc0/wakealarm
# Suspend to ram
echo mem /sys/power/state

If you don't have /sys/class/rtc/rtc0/wakealarm you need to enable rtc
support in your kernel.

-- 
Daniel Pielmeier



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Scheduled wakeup from suspend to ram

2010-01-10 Thread Renat Golubchyk
On Mon, 11 Jan 2010 00:09:48 +0200 Alan McKinnon
alan.mckin...@gmail.com wrote:
 On Sunday 10 January 2010 23:40:57 Stroller wrote:
  This was my reaction, too, but c'mon, Linux's sleep functionality
  must have a rewake feature, mustn't it?
 
 I dunno. Think about this - in suspend, nothing is working and no
 user-code is running. The only power consumed is what is needed to
 refresh RAM. That must be there otherwise the content goes away if
 you try and resume.
 
 So what part of the machine is powered to be able to wake it up? PCs
 don't have alarm clocks, the on-board clock can't usually do it, so
 the only option is for some code to be running, polling the time and
 cause the system to wake up. Which is exactly what suspend does not
 do.

Windows can do that and BIOS has such settings too. Those are
power management settings like suspend to RAM after X minutes,
hibernate after Y minutes. In order to hibernate it has to wake up
first, so there must be some place where a timer is set.

And I have seen it done on Linux. I just never tried it myself.


Cheers,
Renat

-- 
Probleme kann man niemals mit derselben Denkweise loesen,
durch die sie entstanden sind.
  (Einstein)


signature.asc
Description: PGP signature


Re: [gentoo-user] Scheduled wakeup from suspend to ram

2010-01-10 Thread Alan McKinnon
On Monday 11 January 2010 00:36:57 Renat Golubchyk wrote:
 On Mon, 11 Jan 2010 00:09:48 +0200 Alan McKinnon
 
 alan.mckin...@gmail.com wrote:
  On Sunday 10 January 2010 23:40:57 Stroller wrote:
   This was my reaction, too, but c'mon, Linux's sleep functionality
   must have a rewake feature, mustn't it?
 
  I dunno. Think about this - in suspend, nothing is working and no
  user-code is running. The only power consumed is what is needed to
  refresh RAM. That must be there otherwise the content goes away if
  you try and resume.
 
  So what part of the machine is powered to be able to wake it up? PCs
  don't have alarm clocks, the on-board clock can't usually do it, so
  the only option is for some code to be running, polling the time and
  cause the system to wake up. Which is exactly what suspend does not
  do.
 
 Windows can do that and BIOS has such settings too. Those are
 power management settings like suspend to RAM after X minutes,
 hibernate after Y minutes. In order to hibernate it has to wake up
 first, so there must be some place where a timer is set.
 
 And I have seen it done on Linux. I just never tried it myself.

Interesting. I haven't looked into that stuff in years, I must be way behind 
the times then :-)

-- 
alan dot mckinnon at gmail dot com