* daylight saving makes computer wake up late
@ 2007-04-08 12:12 Morten Friesgaard
2007-04-08 14:10 ` Henrique de Moraes Holschuh
0 siblings, 1 reply; 6+ messages in thread
From: Morten Friesgaard @ 2007-04-08 12:12 UTC (permalink / raw)
To: linux-acpi
Hi.
I'm running a mythbox, and ever since we had our yearly change of
daylight savings (summer time) my computer wakes up late. At first it
was only an hour, then I set the time with hwclock (realised that
CLOCK_SYSTOHC="no"), now it is 2 hours late. And it is really precise
(1-2 hours later), and it is certainly because of daylight savings.
Any ideas?
Regards,
Morten
# rc-update show | grep acpi
acpid | default
# clock settings
CLOCK="UTC"
TIMEZONE="Europe/Copenhagen"
CLOCK_SYSTOHC="yes"
#uname -a
Linux mythbox 2.6.18-gentoo-r6 #1 SMP Wed Jan 31 15:40:25 CET 2007
i686 AMD Sempron(tm) Processor 3000+ AuthenticAMD GNU/Linux
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: daylight saving makes computer wake up late
2007-04-08 12:12 daylight saving makes computer wake up late Morten Friesgaard
@ 2007-04-08 14:10 ` Henrique de Moraes Holschuh
2007-04-08 18:18 ` Morten Friesgaard
0 siblings, 1 reply; 6+ messages in thread
From: Henrique de Moraes Holschuh @ 2007-04-08 14:10 UTC (permalink / raw)
To: Morten Friesgaard; +Cc: linux-acpi
On Sun, 08 Apr 2007, Morten Friesgaard wrote:
> I'm running a mythbox, and ever since we had our yearly change of
> daylight savings (summer time) my computer wakes up late. At first it
> was only an hour, then I set the time with hwclock (realised that
> CLOCK_SYSTOHC="no"), now it is 2 hours late. And it is really precise
> (1-2 hours later), and it is certainly because of daylight savings.
>
> Any ideas?
My guess is that you have to set ACPI wake times to *exactly* the time zone
you use your RTC in. Typically UTC, but semi-broken MS-compatible setups
use the local time zone.
The kernel can know the timezone, but almost nobody ever sets that right,
and it is not summer-time aware anyway (too complex). It is best to just
keep everything UTC as far as the kernel goes, *including* the RTC.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: daylight saving makes computer wake up late
2007-04-08 14:10 ` Henrique de Moraes Holschuh
@ 2007-04-08 18:18 ` Morten Friesgaard
2007-04-08 19:50 ` Dominique Michel
0 siblings, 1 reply; 6+ messages in thread
From: Morten Friesgaard @ 2007-04-08 18:18 UTC (permalink / raw)
To: Henrique de Moraes Holschuh; +Cc: linux-acpi
I'm not sure what to do, how do I make these changes?
when I run the following it gives me somewhat the same values, but it
seems the BIOS clock i different (?!)
# hwclock ; date
Sun Apr 8 20:13:56 2007 -0.069330 seconds
Sun Apr 8 20:13:55 CEST 2007
it worked before daylight savings, is it something I can ignore and
still get it to wake up the corret time?
should I change
TIMEZONE="Europe/Copenhagen"
to
TIMEZONE="UTC"
??
/Morten
On 08/04/07, Henrique de Moraes Holschuh <hmh@hmh.eng.br> wrote:
> On Sun, 08 Apr 2007, Morten Friesgaard wrote:
> > I'm running a mythbox, and ever since we had our yearly change of
> > daylight savings (summer time) my computer wakes up late. At first it
> > was only an hour, then I set the time with hwclock (realised that
> > CLOCK_SYSTOHC="no"), now it is 2 hours late. And it is really precise
> > (1-2 hours later), and it is certainly because of daylight savings.
> >
> > Any ideas?
>
> My guess is that you have to set ACPI wake times to *exactly* the time zone
> you use your RTC in. Typically UTC, but semi-broken MS-compatible setups
> use the local time zone.
>
> The kernel can know the timezone, but almost nobody ever sets that right,
> and it is not summer-time aware anyway (too complex). It is best to just
> keep everything UTC as far as the kernel goes, *including* the RTC.
>
> --
> "One disk to rule them all, One disk to find them. One disk to bring
> them all and in the darkness grind them. In the Land of Redmond
> where the shadows lie." -- The Silicon Valley Tarot
> Henrique Holschuh
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: daylight saving makes computer wake up late
2007-04-08 18:18 ` Morten Friesgaard
@ 2007-04-08 19:50 ` Dominique Michel
2007-04-14 10:06 ` Morten Friesgaard
0 siblings, 1 reply; 6+ messages in thread
From: Dominique Michel @ 2007-04-08 19:50 UTC (permalink / raw)
To: Morten Friesgaard, linux-acpi
Le Sun, 8 Apr 2007 20:18:28 +0200,
"Morten Friesgaard" <friesgaard@gmail.com> a écrit :
> I'm not sure what to do, how do I make these changes?
>
> when I run the following it gives me somewhat the same values, but it
> seems the BIOS clock i different (?!)
> # hwclock ; date
> Sun Apr 8 20:13:56 2007 -0.069330 seconds
> Sun Apr 8 20:13:55 CEST 2007
>
> it worked before daylight savings, is it something I can ignore and
> still get it to wake up the corret time?
>
> should I change
> TIMEZONE="Europe/Copenhagen"
>
> to
> TIMEZONE="UTC"
> ??
>
> /Morten
>
You must have 2 things:
CLOCK="UTC"
TIMEZONE="Europe/Copenhagen"
The first one tell the OS that the rtc use UTC time, the second one at it must
convert the UTC time into Europe/Copenhagen time to get the current system
time.
On gentoo I also have an option that set the Hardware Clock to the current
System Time during shutdown:
CLOCK_SYSTOHC="yes"
Some linux distributions use CLOCK="local" because, I guess, they are
thinking at it is best to do so when you are double booting with windows. It is
wrong because when the rtc use local time, the system have to change the time
in the rtc (read in the hardware) when the daylight is changing, and each OS
will change the time in the rtc.
So, you will get the correct time after booting the first OS, a shift of one
hour after booting the second OS, and so on. It is much simpler to use UTC
with all the OS in the box, and that even with window$ (it is an option in the
register base, I don't remember where but a google search will give you the
reference.)
With CLOCK="UTC", the time in the rtc (in the hardware) will never change, the
OS will just interpret it with the value of TIMEZONE.
Ciao,
Dominique
>
> On 08/04/07, Henrique de Moraes Holschuh <hmh@hmh.eng.br> wrote:
> > On Sun, 08 Apr 2007, Morten Friesgaard wrote:
> > > I'm running a mythbox, and ever since we had our yearly change of
> > > daylight savings (summer time) my computer wakes up late. At first it
> > > was only an hour, then I set the time with hwclock (realised that
> > > CLOCK_SYSTOHC="no"), now it is 2 hours late. And it is really precise
> > > (1-2 hours later), and it is certainly because of daylight savings.
> > >
> > > Any ideas?
> >
> > My guess is that you have to set ACPI wake times to *exactly* the time zone
> > you use your RTC in. Typically UTC, but semi-broken MS-compatible setups
> > use the local time zone.
> >
> > The kernel can know the timezone, but almost nobody ever sets that right,
> > and it is not summer-time aware anyway (too complex). It is best to just
> > keep everything UTC as far as the kernel goes, *including* the RTC.
> >
> > --
> > "One disk to rule them all, One disk to find them. One disk to bring
> > them all and in the darkness grind them. In the Land of Redmond
> > where the shadows lie." -- The Silicon Valley Tarot
> > Henrique Holschuh
> >
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Dominique Michel
--
N.B.: Tous les emails que je reçois sont filtrés par spamassassin avant de me
parvenir.
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: daylight saving makes computer wake up late
2007-04-08 19:50 ` Dominique Michel
@ 2007-04-14 10:06 ` Morten Friesgaard
[not found] ` <20070414184639.79fb4835@localhost>
0 siblings, 1 reply; 6+ messages in thread
From: Morten Friesgaard @ 2007-04-14 10:06 UTC (permalink / raw)
To: Dominique Michel; +Cc: linux-acpi
Hi again.
I have the following settings:
CLOCK="UTC"
TIMEZONE="Europe/Copenhagen"
CLOCK_SYSTOHC="yes"
but still nothing works correctly, so until it is fixed, i going to
use the following script (now it works)
hope anyone else can benefit from it :)
/Morten
------------------------------------------------------------------------
#script /usr/sbin/mythsettime
#sudo chmod u+x /usr/sbin/mythsettime
d=$1
t=$2
#AT=`cat /proc/acpi/alarm`
RT=`date -d "${d} ${t} 2 hours ago" +'%Y-%m-%d %H:%M:%S'`
echo $RT > /home/mythtv/myth.time
echo $RT > /proc/acpi/alarm
#echo $AT
------------------------------------------------------------------------
On 08/04/07, Dominique Michel <dominique.michel@citycable.ch> wrote:
> Le Sun, 8 Apr 2007 20:18:28 +0200,
> "Morten Friesgaard" <friesgaard@gmail.com> a écrit :
>
> > I'm not sure what to do, how do I make these changes?
> >
> > when I run the following it gives me somewhat the same values, but it
> > seems the BIOS clock i different (?!)
> > # hwclock ; date
> > Sun Apr 8 20:13:56 2007 -0.069330 seconds
> > Sun Apr 8 20:13:55 CEST 2007
> >
> > it worked before daylight savings, is it something I can ignore and
> > still get it to wake up the corret time?
> >
> > should I change
> > TIMEZONE="Europe/Copenhagen"
> >
> > to
> > TIMEZONE="UTC"
> > ??
> >
> > /Morten
> >
>
> You must have 2 things:
>
> CLOCK="UTC"
> TIMEZONE="Europe/Copenhagen"
>
> The first one tell the OS that the rtc use UTC time, the second one at it must
> convert the UTC time into Europe/Copenhagen time to get the current system
> time.
>
> On gentoo I also have an option that set the Hardware Clock to the current
> System Time during shutdown:
>
> CLOCK_SYSTOHC="yes"
>
> Some linux distributions use CLOCK="local" because, I guess, they are
> thinking at it is best to do so when you are double booting with windows. It is
> wrong because when the rtc use local time, the system have to change the time
> in the rtc (read in the hardware) when the daylight is changing, and each OS
> will change the time in the rtc.
>
> So, you will get the correct time after booting the first OS, a shift of one
> hour after booting the second OS, and so on. It is much simpler to use UTC
> with all the OS in the box, and that even with window$ (it is an option in the
> register base, I don't remember where but a google search will give you the
> reference.)
>
> With CLOCK="UTC", the time in the rtc (in the hardware) will never change, the
> OS will just interpret it with the value of TIMEZONE.
>
> Ciao,
> Dominique
>
> >
> > On 08/04/07, Henrique de Moraes Holschuh <hmh@hmh.eng.br> wrote:
> > > On Sun, 08 Apr 2007, Morten Friesgaard wrote:
> > > > I'm running a mythbox, and ever since we had our yearly change of
> > > > daylight savings (summer time) my computer wakes up late. At first it
> > > > was only an hour, then I set the time with hwclock (realised that
> > > > CLOCK_SYSTOHC="no"), now it is 2 hours late. And it is really precise
> > > > (1-2 hours later), and it is certainly because of daylight savings.
> > > >
> > > > Any ideas?
> > >
> > > My guess is that you have to set ACPI wake times to *exactly* the time zone
> > > you use your RTC in. Typically UTC, but semi-broken MS-compatible setups
> > > use the local time zone.
> > >
> > > The kernel can know the timezone, but almost nobody ever sets that right,
> > > and it is not summer-time aware anyway (too complex). It is best to just
> > > keep everything UTC as far as the kernel goes, *including* the RTC.
> > >
> > > --
> > > "One disk to rule them all, One disk to find them. One disk to bring
> > > them all and in the darkness grind them. In the Land of Redmond
> > > where the shadows lie." -- The Silicon Valley Tarot
> > > Henrique Holschuh
> > >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
> --
> Dominique Michel
>
> --
> N.B.: Tous les emails que je reçois sont filtrés par spamassassin avant de me
> parvenir.
>
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: daylight saving makes computer wake up late
[not found] ` <20070414184639.79fb4835@localhost>
@ 2007-04-18 17:15 ` Morten Friesgaard
0 siblings, 0 replies; 6+ messages in thread
From: Morten Friesgaard @ 2007-04-18 17:15 UTC (permalink / raw)
To: Dominique Michel, linux-acpi
Hi again.
when I installed Gentoo i copied the timezone with
# cp /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime
last week i did a diff on the files, and the differed, so I changed it
to a symbolic link
# ln -sf /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime
well I still got the same problem...
Don't see any way to solve it but my temporary script...
/Morten
On 14/04/07, Dominique Michel <dominique.michel@citycable.ch> wrote:
> Le Sat, 14 Apr 2007 12:06:49 +0200,
> "Morten Friesgaard" <friesgaard@gmail.com> a écrit :
>
> > Hi again.
> >
> > I have the following settings:
> > CLOCK="UTC"
> > TIMEZONE="Europe/Copenhagen"
> > CLOCK_SYSTOHC="yes"
> >
> On gentoo, I also have to copy one file as /etc/localtime. It the file
> in /usr/zoneinfo that correspond to your local time. Don't copy the files
> in /usr/zoneinfo/Etc, but the one that correspond to your geographical
> location, as example /usr/zoneinfo/Europe/London and rename it
> to /etc/localtime.
>
> But those settings can differ between different distributions. If it still
> doesn't work, take a look in the doc or in a forum for your distribution. Some
> bios also have a setting for this.
>
> Dominique
>
> > but still nothing works correctly, so until it is fixed, i going to
> > use the following script (now it works)
> >
> > hope anyone else can benefit from it :)
> > /Morten
> >
> > ------------------------------------------------------------------------
> > #script /usr/sbin/mythsettime
> > #sudo chmod u+x /usr/sbin/mythsettime
> >
> > d=$1
> > t=$2
> >
> > #AT=`cat /proc/acpi/alarm`
> > RT=`date -d "${d} ${t} 2 hours ago" +'%Y-%m-%d %H:%M:%S'`
> >
> > echo $RT > /home/mythtv/myth.time
> > echo $RT > /proc/acpi/alarm
> > #echo $AT
> > ------------------------------------------------------------------------
> >
> >
> > On 08/04/07, Dominique Michel <dominique.michel@citycable.ch> wrote:
> > > Le Sun, 8 Apr 2007 20:18:28 +0200,
> > > "Morten Friesgaard" <friesgaard@gmail.com> a écrit :
> > >
> > > > I'm not sure what to do, how do I make these changes?
> > > >
> > > > when I run the following it gives me somewhat the same values, but it
> > > > seems the BIOS clock i different (?!)
> > > > # hwclock ; date
> > > > Sun Apr 8 20:13:56 2007 -0.069330 seconds
> > > > Sun Apr 8 20:13:55 CEST 2007
> > > >
> > > > it worked before daylight savings, is it something I can ignore and
> > > > still get it to wake up the corret time?
> > > >
> > > > should I change
> > > > TIMEZONE="Europe/Copenhagen"
> > > >
> > > > to
> > > > TIMEZONE="UTC"
> > > > ??
> > > >
> > > > /Morten
> > > >
> > >
> > > You must have 2 things:
> > >
> > > CLOCK="UTC"
> > > TIMEZONE="Europe/Copenhagen"
> > >
> > > The first one tell the OS that the rtc use UTC time, the second one at it
> > > must convert the UTC time into Europe/Copenhagen time to get the current
> > > system time.
> > >
> > > On gentoo I also have an option that set the Hardware Clock to the current
> > > System Time during shutdown:
> > >
> > > CLOCK_SYSTOHC="yes"
> > >
> > > Some linux distributions use CLOCK="local" because, I guess, they are
> > > thinking at it is best to do so when you are double booting with windows.
> > > It is wrong because when the rtc use local time, the system have to change
> > > the time in the rtc (read in the hardware) when the daylight is changing,
> > > and each OS will change the time in the rtc.
> > >
> > > So, you will get the correct time after booting the first OS, a shift of one
> > > hour after booting the second OS, and so on. It is much simpler to use UTC
> > > with all the OS in the box, and that even with window$ (it is an option in
> > > the register base, I don't remember where but a google search will give you
> > > the reference.)
> > >
> > > With CLOCK="UTC", the time in the rtc (in the hardware) will never change,
> > > the OS will just interpret it with the value of TIMEZONE.
> > >
> > > Ciao,
> > > Dominique
> > >
> > > >
> > > > On 08/04/07, Henrique de Moraes Holschuh <hmh@hmh.eng.br> wrote:
> > > > > On Sun, 08 Apr 2007, Morten Friesgaard wrote:
> > > > > > I'm running a mythbox, and ever since we had our yearly change of
> > > > > > daylight savings (summer time) my computer wakes up late. At first it
> > > > > > was only an hour, then I set the time with hwclock (realised that
> > > > > > CLOCK_SYSTOHC="no"), now it is 2 hours late. And it is really precise
> > > > > > (1-2 hours later), and it is certainly because of daylight savings.
> > > > > >
> > > > > > Any ideas?
> > > > >
> > > > > My guess is that you have to set ACPI wake times to *exactly* the time
> > > > > zone you use your RTC in. Typically UTC, but semi-broken MS-compatible
> > > > > setups use the local time zone.
> > > > >
> > > > > The kernel can know the timezone, but almost nobody ever sets that
> > > > > right, and it is not summer-time aware anyway (too complex). It is
> > > > > best to just keep everything UTC as far as the kernel goes, *including*
> > > > > the RTC.
> > > > >
> > > > > --
> > > > > "One disk to rule them all, One disk to find them. One disk to bring
> > > > > them all and in the darkness grind them. In the Land of Redmond
> > > > > where the shadows lie." -- The Silicon Valley Tarot
> > > > > Henrique Holschuh
> > > > >
> > > > -
> > > > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> > > > the body of a message to majordomo@vger.kernel.org
> > > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > >
> > >
> > > --
> > > Dominique Michel
> > >
> > > --
> > > N.B.: Tous les emails que je reçois sont filtrés par spamassassin avant de
> > > me parvenir.
> > >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
> --
> Dominique Michel
>
> --
> N.B.: Tous les emails que je reçois sont filtrés par spamassassin avant de me
> parvenir.
>
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-04-18 17:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-08 12:12 daylight saving makes computer wake up late Morten Friesgaard
2007-04-08 14:10 ` Henrique de Moraes Holschuh
2007-04-08 18:18 ` Morten Friesgaard
2007-04-08 19:50 ` Dominique Michel
2007-04-14 10:06 ` Morten Friesgaard
[not found] ` <20070414184639.79fb4835@localhost>
2007-04-18 17:15 ` Morten Friesgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox