Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can’t get Real-Time Clock to Work #219

Closed
suksit opened this issue May 4, 2015 · 11 comments
Closed

Can’t get Real-Time Clock to Work #219

suksit opened this issue May 4, 2015 · 11 comments

Comments

@suksit
Copy link

suksit commented May 4, 2015

I installed Raspbian using ua-netinst successfully but when I followed the guide to add RTC to Raspberry Pi B+ (http://www.drewkeller.com/blog/adding-hardware-clock-raspberry-pi-ds3231), it didn’t work.

I got some error when running sudo hwclock --debug saying that it can’t find /dev/rtc.

So I tried to follow the same guide on the official Raspbian image and the RTC was installed successfully. Any ideas/suggestions?

Thanks!

@diederikdehaas
Copy link
Member

Maybe change /etc/default/hwclock and remove the line with HWCLOCKACCESS=no ?
This command is probably also needed update-rc.d fake-hwclock disable
You probably have to reboot afterwards.
I don't have a RTC device myself, so this is only educated guessing.

@suksit
Copy link
Author

suksit commented May 5, 2015

Still didn’t work :/

Thanks for your suggestion, I’ll keep trying to find a solution.

@diederikdehaas
Copy link
Member

Have you tried removing the fake-hwclock altogether?
apt-get remove --purge fake-hwclock

@suksit
Copy link
Author

suksit commented May 5, 2015

Yep I removed fake-hwclock along with editing /etc/default/hwclock.

However, I think I know why the RTC device doesn’t show up. It’s because I don’t have rtc-ds1307.ko in /lib/modules/... directory.

I got the RTC working by running rpi-update to get the latest kernel and modules. Maybe not the correct way to go but it’s the easiest I guess :P

@diederikdehaas
Copy link
Member

and after running rpi-update you do have the rtc-ds1307.ko file?

@diederikdehaas
Copy link
Member

Confirmed:
From /boot/config-3.18.0-trunk-rpi2:
CONFIG_RTC_DRV_DS1307 is not set
with kernel 3.18.12-v7+ zgrep RTC_DRV_DS1307 /proc/config.gz :
CONFIG_RTC_DRV_DS1307=m

@suksit
Copy link
Author

suksit commented May 5, 2015

Yes.

With the fresh install I got only like three .ko files in /lib/module//kernel/drivers/rtc/

After running rpi-update, there are like 10-20 .ko files in /lib/module//kernel/drivers/rtc/

@diederikdehaas
Copy link
Member

I asked for support for the same RTC devices as the raspberrypi.org kernel supports:
https://bugs.launchpad.net/raspbian/+bug/1470679

@diederikdehaas
Copy link
Member

The upstream issue as been resolved and (thus) so is this one.

@suksit Can you verify that that is indeed the case?

@suksit
Copy link
Author

suksit commented Oct 2, 2015

Confirmed that the module is there after a fresh install and RTC clock works as expected.

Thanks for the follow-up :D

@suksit suksit closed this as completed Oct 2, 2015
@diederikdehaas
Copy link
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants