You are not logged in.
Pages: 1
Hello Archers,
Thanks to the excellent wiki, I've successfully installed Arch on three machines so far without having to consult the forums. Now I have a strange problem that's popped up after I tried optimizing the startup and shutdown scripts. This is on a dual-boot system using localtime.
After I start Windows and sync the time, on reboot Arch displays the correct time. (So, the rc.sysinit script is good.) If I then reboot from Arch, however, the hardware clock in the BIOS gets turned back five hours. I've traced the problem to the following line in the rc.shutdown script by inserting "hwclock -r" before and after it:
/sbin/hwclock --systohc --localtime
What's odd is that this command is executed correctly if I issue it from a terminal before shutdown. Moreover, this exact same script (I copied it over to make sure) worked just fine on another dual-boot machine also using localtime. I have tried deleting the adjtime file to no avail. Also, reverting back to the original script did not resolve the matter.
Thanks in advance for any advice.
K
Offline
Gee, 5 hours. Isn't that about how far texas is from GMT during daylight savings?
Windows uses local time and refuses to use GMT. Arch defaults to GMT.
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.utf8"
HARDWARECLOCK="UTC"
USEDIRECTISA="no"
TIMEZONE="America/Los_Angeles"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
The above is an excerpt from my /etc/rc.conf.
You might check to see if you changed HARDWARECLOCK to 'localtime'
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Yes, HARDWARECLOCK is set to "localtime". I meant to say that hwclock turns back five hours on every shutdown, not that it lags Windows by five hours. The time displayed by Windows is the same.
K
Offline
The time displayed by Windows is the same.
Got it
Can you check the TIMEZONE variable? If you are using localtime, I think shutdown is the only place it should come into play.
The only timezone I found that seemed appropriate is US/Central
Edit : Continuing:
What's odd is that this command is executed correctly if I issue it from a terminal before shutdown.
Did you run that as root?
Last edited by ewaller (2010-07-27 03:46:33)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Can you check the TIMEZONE variable?
Thanks for the tip; I've been using "America/Mexico_City" this whole time. Unfortunately, the problem still persists.
Did you run that as root?
Indeed, otherwise it wouldn't run.
K
Offline
Try running `hwclock -r` and `date` to make sure you're indeed using localtime. They should be the same.
Are your other computers dual boot, too?
Offline
Try running `hwclock -r` and `date` to make sure you're indeed using localtime. They should be the same.
Are your other computers dual boot, too?
+1
'date' should give you the timezone, check if it's the right one.
Offline
Try running `hwclock -r` and `date` to make sure you're indeed using localtime. They should be the same.
They both show up as UTC. They didn't match when I first went to check, but after I again synced the time in Windows, they do now (for now, anyway). It's not the correct UTC time, either, since the clock gets turned back on shutdown.
I've checked to make sure that the appropriate /usr/share/zoneinfo file is there.
Are your other computers dual boot, too?
One of them is, also using localtime, and works fine. The other is Arch-only and uses UTC (which, as an aside, I now can't get to display the local time instead of UTC).
K
Offline
My rc.conf
HARDWARECLOCK="localtime"
TIMEZONE="Europe/Warsaw"
[karol@black ~]$ date
śro, 28 lip 2010, 23:16:26 CEST
[karol@black ~]$ hwclock -r
śro, 28 lip 2010, 23:16:31 -0.501674 seconds
I didn't touch rc.* scripts and it's fine as it is.
If I'm reading this right, you have localtime, but you get UTC *but* it's not correct UTC time?
Offline
I didn't touch rc.* scripts and it's fine as it is.
I haven't done anything too drastic to these scripts (most of which is covered here), basically just getting rid of unnecessary blocks of code, a few variables, and if-else statements. The exact same scripts (minus a different hostname for rc.sysinit) worked for my other dual-boot system.
If I'm reading this right, you have localtime, but you get UTC *but* it's not correct UTC time?
Right, and the more times I power off, the worse it gets.
K
Offline
> Right, and the more times I power off, the worse it gets.
A time machine!
> The exact same scripts (minus a different hostname for rc.sysinit) worked for my other dual-boot system.
That's the weird part.
I smell a fresh pie. I am just going AFK and may be some time
Offline
I suspect it's not the scripts per se, but something the scripts depend on (not rc.conf, I don't think).
I smell a fresh pie. I am just going AFK and may be some time
Enjoy, and thanks for stopping by.
K
Offline
Pages: 1