2005-01-11 03:21:16

by Shawn Starr

[permalink] [raw]
Subject: [2.6.10][Suspend] - Time problems


When resuming from suspend, I noticed the clock is waay off (its 10:16pm, it
shows 2:34AM EST time). This is even after a reboot the bios now shows wrong
time?

Anyone else notice this recently?

Shawn.


2005-01-12 22:25:31

by Pavel Machek

[permalink] [raw]
Subject: Re: [2.6.10][Suspend] - Time problems

Hi!

> When resuming from suspend, I noticed the clock is waay off (its 10:16pm, it
> shows 2:34AM EST time). This is even after a reboot the bios now shows wrong
> time?

Yes, see for example thread "2.6.10-mm2: swsusp regression
[update]". Nigel has some patch that should fix it...

Pavel

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

2005-01-12 22:54:21

by Pavel Machek

[permalink] [raw]
Subject: Re: [2.6.10][Suspend] - Time problems

Hi!

> > > When resuming from suspend, I noticed the clock is waay off (its 10:16pm,
> it
> > > shows 2:34AM EST time). This is even after a reboot the bios now shows
> wrong
> > > time?
> >
> > Yes, see for example thread "2.6.10-mm2: swsusp regression
> > [update]". Nigel has some patch that should fix it...
>
> Do you mean patches in the "[RFC] Patches to reduce delay in
> arch/kernel/time.c" thread?

I meant this one... (cut&pasted, apply by hand). But it seems to be
included in 2.6.11-rc1. I'm now confused.
Pavel

diff -ruNp 910-original-time-patch-old/arch/i386/kernel/time.c
910-original-time-patch-new/arch/i386/kernel/time.c
--- 910-original-time-patch-old/arch/i386/kernel/time.c 2004-12-27
+++ 910-original-time-patch-new/arch/i386/kernel/time.c 2005-01-08
@@ -343,12 +343,13 @@ static int timer_resume(struct sys_devic
hpet_reenable();
#endif
sec = get_cmos_time() + clock_cmos_diff;
- sleep_length = get_cmos_time() - sleep_start;
+ sleep_length = (get_cmos_time() - sleep_start) * HZ;
write_seqlock_irqsave(&xtime_lock, flags);
xtime.tv_sec = sec;
xtime.tv_nsec = 0;
write_sequnlock_irqrestore(&xtime_lock, flags);
- jiffies += sleep_length * HZ;
+ jiffies += sleep_length;
+ wall_jiffies += sleep_length;
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!

2005-01-12 22:50:03

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [2.6.10][Suspend] - Time problems

On Wednesday, 12 of January 2005 23:24, Pavel Machek wrote:
> Hi!
>
> > When resuming from suspend, I noticed the clock is waay off (its 10:16pm,
it
> > shows 2:34AM EST time). This is even after a reboot the bios now shows
wrong
> > time?
>
> Yes, see for example thread "2.6.10-mm2: swsusp regression
> [update]". Nigel has some patch that should fix it...

Do you mean patches in the "[RFC] Patches to reduce delay in
arch/kernel/time.c" thread?

RJW

--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"

2005-01-13 00:38:39

by Shawn Starr

[permalink] [raw]
Subject: Re: [2.6.10][Suspend] - Time problems

I'll just bump to 2.6.11-rc1, Rafael, not that one

In either case, it won't be a problem in a few moments. :)

Shawn.

On January 12, 2005 17:50, Pavel Machek wrote:
> Hi!
>
> > > > When resuming from suspend, I noticed the clock is waay off (its
> > > > 10:16pm,
> >
> > it
> >
> > > > shows 2:34AM EST time). This is even after a reboot the bios now
> > > > shows
> >
> > wrong
> >
> > > > time?
> > >
> > > Yes, see for example thread "2.6.10-mm2: swsusp regression
> > > [update]". Nigel has some patch that should fix it...
> >
> > Do you mean patches in the "[RFC] Patches to reduce delay in
> > arch/kernel/time.c" thread?
>
> I meant this one... (cut&pasted, apply by hand). But it seems to be
> included in 2.6.11-rc1. I'm now confused.
> Pavel
>
> diff -ruNp 910-original-time-patch-old/arch/i386/kernel/time.c
> 910-original-time-patch-new/arch/i386/kernel/time.c
> --- 910-original-time-patch-old/arch/i386/kernel/time.c 2004-12-27
> +++ 910-original-time-patch-new/arch/i386/kernel/time.c 2005-01-08
> @@ -343,12 +343,13 @@ static int timer_resume(struct sys_devic
> hpet_reenable();
> #endif
> sec = get_cmos_time() + clock_cmos_diff;
> - sleep_length = get_cmos_time() - sleep_start;
> + sleep_length = (get_cmos_time() - sleep_start) * HZ;
> write_seqlock_irqsave(&xtime_lock, flags);
> xtime.tv_sec = sec;
> xtime.tv_nsec = 0;
> write_sequnlock_irqrestore(&xtime_lock, flags);
> - jiffies += sleep_length * HZ;
> + jiffies += sleep_length;
> + wall_jiffies += sleep_length;
> return 0;
> }

2005-03-28 07:51:58

by Shawn Starr

[permalink] [raw]
Subject: [2.6.12-rc1] suspend to Disk success - T42 laptop


Hello Pavel, I can now suspend to disk on the laptop with 2.6.12-rc1. There is
no failures anymore. It resumes perfectly.

Thank you.

Shawn.

2005-03-29 11:39:01

by Pavel Machek

[permalink] [raw]
Subject: Re: [2.6.12-rc1] suspend to Disk success - T42 laptop

Hi!

> Hello Pavel, I can now suspend to disk on the laptop with 2.6.12-rc1. There is
> no failures anymore. It resumes perfectly.

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

2005-03-31 17:00:02

by Stefan Seyfried

[permalink] [raw]
Subject: Re: [2.6.12-rc1] suspend to Disk success - T42 laptop

Pavel Machek wrote:
> Hi!
>
>> Hello Pavel, I can now suspend to disk on the laptop with 2.6.12-rc1. There is
>> no failures anymore. It resumes perfectly.
>
> No video hacks needed? Good.

suspend to disk. !(suspend to RAM).

:-)

Stefan