> Anybody have problems with apm on Sony Vaio? I've got an F370 and
> whenever I suspend (using apm --suspend) or hibernate to disk (using
> Fn-F12) everything works just dandy -- no problems with X or pcmcia
> ethernet -- except that the system time is always screwed up. (It seems
> to set itself to the same date but the time always sets itself to
> something approximately 5 hours earlier.)
> Also, apm --standby doesn't work at all, but that doesn't really bother
> me, since standby mode does not sound too useful.
> Sent via Deja.com http://www.deja.com/
> Before you buy.
According to manuals (SAG, man.hwclock, etc.), Linux keeps 2 kinds of
times - hardware clock time and system time.
System time is in UTC (GMT) format which is derived from hw-clock and zone
info. When the system starts, it converts hw-clock time to system time and
keeps it for operating. For APM, apm kernel driver is supposed to reset
the system time reading hw-clock (at least for RH 6.1 in my son's Dell
Inspiron 3500) after resuming. However, it doesn't work that way, and I
have suspicion that the fact apm driver is compiled with UTC=yes makes
Linux think the hw-clock is in UTC format even if I set UTC=no in the
configuration. That's why I am getting 6 hours (5 hours in your case)
earlier.
To solve this problem, since I am not that savvy to compile new kernel, I
used apmd proxy service.
The sample proxy is not in apmd package which must be anyway installed,
but in the source RPM.
1. Install apmd and set it to run.
2. Edit apmd_proxy sample to be suitable for your system and copy to
/etc/apmd_proxy.
--- I remove the lines invoking hwclock in sub-script update_clock,
and put the line
hwclock --hctosys
since I don't use UTC because of Windoze installed in the laptop.
3. Tested with apm -S or apm -s, and got the correct time.
If you need a little more details, please post it. I or other people will
try to come up with more ideas.
Cheers.