linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Hibernation and time and dhcp
@ 2004-10-20 18:45 Michal Semler
  2004-10-21 12:06 ` Stefan Schweizer
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michal Semler @ 2004-10-20 18:45 UTC (permalink / raw)
  To: linux-kernel

Hi guys,

with 2.6.9 hibernation to disk finally works! Thanks
To ram it still don't work, system starts with lcd disabled - but it is 
another story.

I have now this problem - when I hibernate and then system is started up in 
other company, it don't update time and shows still for example 14:00 - when 
I rehibernate for example in 20:00 - could you ask bios for current time? 
It's better to have bad time about few seconds instead of hours.

Same problem with dhcp - it should ask for IP when rehibernate.

Thanks for fixing

Michal

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hibernation and time and dhcp
  2004-10-20 18:45 Hibernation and time and dhcp Michal Semler
@ 2004-10-21 12:06 ` Stefan Schweizer
  2004-10-21 12:31 ` Denis Vlasenko
  2004-10-21 23:01 ` Pavel Machek
  2 siblings, 0 replies; 7+ messages in thread
From: Stefan Schweizer @ 2004-10-21 12:06 UTC (permalink / raw)
  To: cijoml; +Cc: linux-kernel

hibernate.conf:

### clock
SaveClock yes


OnResume 20  dhcpcd -n



On Wed, 20 Oct 2004 20:45:24 +0200, Michal Semler <cijoml@volny.cz> wrote:
> Hi guys,
> 
> with 2.6.9 hibernation to disk finally works! Thanks
> To ram it still don't work, system starts with lcd disabled - but it is
> another story.
> 
> I have now this problem - when I hibernate and then system is started up in
> other company, it don't update time and shows still for example 14:00 - when
> I rehibernate for example in 20:00 - could you ask bios for current time?
> It's better to have bad time about few seconds instead of hours.
> 
> Same problem with dhcp - it should ask for IP when rehibernate.
> 
> Thanks for fixing
> 
> Michal
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hibernation and time and dhcp
  2004-10-20 18:45 Hibernation and time and dhcp Michal Semler
  2004-10-21 12:06 ` Stefan Schweizer
@ 2004-10-21 12:31 ` Denis Vlasenko
  2004-10-21 23:13   ` Michal Semler
  2004-10-21 23:01 ` Pavel Machek
  2 siblings, 1 reply; 7+ messages in thread
From: Denis Vlasenko @ 2004-10-21 12:31 UTC (permalink / raw)
  To: cijoml, linux-kernel

On Wednesday 20 October 2004 21:45, Michal Semler wrote:
> Hi guys,
> 
> with 2.6.9 hibernation to disk finally works! Thanks
> To ram it still don't work, system starts with lcd disabled - but it is 
> another story.
> 
> I have now this problem - when I hibernate and then system is started up in 
> other company, it don't update time and shows still for example 14:00 - when 
> I rehibernate for example in 20:00 - could you ask bios for current time? 
> It's better to have bad time about few seconds instead of hours.
> 
> Same problem with dhcp - it should ask for IP when rehibernate.

These should be handled in userspace. You can put together
some simple shell script to do it with (hwclock or ntpdate) and [u]dhcp*
--
vda


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hibernation and time and dhcp
  2004-10-20 18:45 Hibernation and time and dhcp Michal Semler
  2004-10-21 12:06 ` Stefan Schweizer
  2004-10-21 12:31 ` Denis Vlasenko
@ 2004-10-21 23:01 ` Pavel Machek
  2004-10-21 23:20   ` Pavel Machek
  2 siblings, 1 reply; 7+ messages in thread
From: Pavel Machek @ 2004-10-21 23:01 UTC (permalink / raw)
  To: Michal Semler; +Cc: linux-kernel

Hi!

> with 2.6.9 hibernation to disk finally works! Thanks
> To ram it still don't work, system starts with lcd disabled - but it is 
> another story.
> 
> I have now this problem - when I hibernate and then system is started up in 
> other company, it don't update time and shows still for example 14:00 - when 
> I rehibernate for example in 20:00 - could you ask bios for current time? 
> It's better to have bad time about few seconds instead of hours.
> 
> Same problem with dhcp - it should ask for IP when rehibernate.

Known bug and I posted patch at least to acpi list few hours ago.

									Pavel


-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hibernation and time and dhcp
  2004-10-21 12:31 ` Denis Vlasenko
@ 2004-10-21 23:13   ` Michal Semler
  2004-10-22 16:56     ` Denis Vlasenko
  0 siblings, 1 reply; 7+ messages in thread
From: Michal Semler @ 2004-10-21 23:13 UTC (permalink / raw)
  To: Denis Vlasenko; +Cc: linux-kernel

Dne čt 21. října 2004 14:31 Denis Vlasenko napsal(a):
> On Wednesday 20 October 2004 21:45, Michal Semler wrote:
> > Hi guys,
> >
> > with 2.6.9 hibernation to disk finally works! Thanks
> > To ram it still don't work, system starts with lcd disabled - but it is
> > another story.
> >
> > I have now this problem - when I hibernate and then system is started up
> > in other company, it don't update time and shows still for example 14:00
> > - when I rehibernate for example in 20:00 - could you ask bios for
> > current time? It's better to have bad time about few seconds instead of
> > hours.
> >
> > Same problem with dhcp - it should ask for IP when rehibernate.
>
> These should be handled in userspace. You can put together
> some simple shell script to do it with (hwclock or ntpdate) and [u]dhcp*
> --
> vda

Yes, it's possible, but many programs crashes when time is moved about hours 
or days. And till time they will be repaired, we should ask for time BIOS to 
have little time difference.

Michal

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hibernation and time and dhcp
  2004-10-21 23:01 ` Pavel Machek
@ 2004-10-21 23:20   ` Pavel Machek
  0 siblings, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2004-10-21 23:20 UTC (permalink / raw)
  To: Michal Semler; +Cc: linux-kernel

Hi!

> > with 2.6.9 hibernation to disk finally works! Thanks
> > To ram it still don't work, system starts with lcd disabled - but it is 
> > another story.
> > 
> > I have now this problem - when I hibernate and then system is started up in 
> > other company, it don't update time and shows still for example 14:00 - when 
> > I rehibernate for example in 20:00 - could you ask bios for current time? 
> > It's better to have bad time about few seconds instead of hours.
> > 
> > Same problem with dhcp - it should ask for IP when rehibernate.
> 
> Known bug and I posted patch at least to acpi list few hours ago.

Here it is...

							Pavel

--- clean/arch/i386/kernel/time.c	2004-10-01 00:29:59.000000000 +0200
+++ linux/arch/i386/kernel/time.c	2004-10-19 15:16:14.000000000 +0200
@@ -319,7 +319,7 @@
 	return retval;
 }
 
-static long clock_cmos_diff;
+static long clock_cmos_diff, sleep_start;
 
 static int time_suspend(struct sys_device *dev, u32 state)
 {
@@ -328,6 +328,7 @@
 	 */
 	clock_cmos_diff = -get_cmos_time();
 	clock_cmos_diff += get_seconds();
+	sleep_start = get_cmos_time();
 	return 0;
 }
 
@@ -335,10 +336,13 @@
 {
 	unsigned long flags;
 	unsigned long sec = get_cmos_time() + clock_cmos_diff;
+	unsigned long sleep_length = get_cmos_time() - sleep_start;
+
 	write_seqlock_irqsave(&xtime_lock, flags);
 	xtime.tv_sec = sec;
 	xtime.tv_nsec = 0;
 	write_sequnlock_irqrestore(&xtime_lock, flags);
+	jiffies += sleep_length * HZ;
 	return 0;
 }
 


-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hibernation and time and dhcp
  2004-10-21 23:13   ` Michal Semler
@ 2004-10-22 16:56     ` Denis Vlasenko
  0 siblings, 0 replies; 7+ messages in thread
From: Denis Vlasenko @ 2004-10-22 16:56 UTC (permalink / raw)
  To: cijoml; +Cc: linux-kernel

On Friday 22 October 2004 02:13, Michal Semler wrote:

> > These should be handled in userspace. You can put together
> > some simple shell script to do it with (hwclock or ntpdate) and [u]dhcp*
> 
> Yes, it's possible, but many programs crashes when time is moved about hours 
> or days. And till time they will be repaired, we should ask for time BIOS to 
> have little time difference.

Those programs are buggy.
--
vda


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-10-22 17:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-20 18:45 Hibernation and time and dhcp Michal Semler
2004-10-21 12:06 ` Stefan Schweizer
2004-10-21 12:31 ` Denis Vlasenko
2004-10-21 23:13   ` Michal Semler
2004-10-22 16:56     ` Denis Vlasenko
2004-10-21 23:01 ` Pavel Machek
2004-10-21 23:20   ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).