libreboot
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libreboot] Reading the hardware clock


From: Daniel Tarrero
Subject: Re: [Libreboot] Reading the hardware clock
Date: Fri, 29 Jan 2016 13:10:05 +0100

just to agree:

when u first boot, your system clock is out of date (set to 0000 date)
because OS is unable to read the hardware clock.

this tells the system to get the time from internet:
$ ntpd -gg

this other tell the system to put the hardware clock in time given the
(we have just got from internet) system time. You have to run it
twice :S

$ hwclock --systohc

with this commands we are not solving the hw clock issue. We get time
from internet and (try to?) set it in the hardware clock.

******
the problem seem to be related with the way hardware clock is read in
boot time

question 1:

does this command work when computer has just boot? (and is out of date)

$ date
whatever 1970
$ sudo /sbin/hwclock -r

... this should give you some error (paste it)
and this?

$ sudo /sbin/hwclock --directisa -r

if this work we can start shaking it (it means that the system was able
to read the hardware clock using direct ISA reading method). Then the
following instructions will come usefull:

question 2:

is there in your distribution a script launched in the boot secuence
that is on charge of "get the hardware time and set the system time with
it" that should be failing?

"/etc/init.d/hwclock.sh", you can take a look at it

????
has this script the "HWCLOCKPARS=" parameter in the header of the
script? take a look at it

if true, try adding this line to /etc/default/rcS:
HWCLOCKPARS="--directisa"

save and reboot.

this file is read before launching the boot scripts, and contains the
parameters for all this "rcS" scripts.

******

if you have to follow the "generic" instructions (given
_you_dont_have_the hwclock.sh script _or_it_hasnt_the_HWCLOCLPARS_
parameter within its header), double check that the intermediate script
is executable (init scripts should be executables).

in the howto, intermediate script is suggested to be in "/sbin/hwclock"
and you are told to move the original "/sbin/hwclock" to
" /sbin/hwclock.dist" if i understand it right. So the new /sbin/hwclock
should be executable

$ chown root. /sbin/hwclock
$ chmod 755 /sbin/hwclock


******

hope that helps, let us know the resoults!
D


El jue, 28-01-2016 a las 17:09 -0500, Bruno Dantas escribió:
> I am having the same problem. I'm on a Thinkpad T400 with Libreboot and 
> Parabola GNU/Linux-libre. After upgrading to linux-libre 4.3.4, now during 
> every boot I see "rtc_cmos unable to read the hardware clock". When boot 
> finishes and I'm at my desktop, I see that the time is 7 p.m. on December 31, 
> 1969. 
> 
> In a terminal I ran:
> $ sudo ntpd -qg
> $ sudo hwclock --systohc
> 
> I needed to run the second command twice because the first time it gave an 
> error (something about an invalid argument), but second time it works. Time 
> and date are now correct but only until I reboot, when I get the boot-time 
> error and it's 1969 again.
> 
> I tried the generic instructions here 
> (http://www.thinkwiki.org/wiki/Problems_with_hwclock) and rebooted, but no 
> luck. Still have the boot-time error and find myself in 1969. I'm not sure 
> where to go from here.
> 
> My workaround for the time being is to use an older kernel (I downloaded 
> linux-lts-4.1.9-2 and linux-lts-headers-4.1.9-2 from 
> https://archive.archlinux.org/packages/l/linux-lts/ and installed with pacman 
> -U), which is working fine.
> 
> I'd love to go back to the linux-libre kernel. Hopefully either linux-libre 
> or libreboot can be fixed. I'd be very afraid to mess with libreboot itself, 
> however (I probably wouldn't even have the necessary tools).
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]