gordon77
Posts: 5077
Joined: Sun Aug 05, 2012 3:12 pm

RTC not working in Jessie

Wed Oct 21, 2015 12:11 pm

My RTC used to work in Wheezy doing this setup www.cjemicros.co.uk/rpi-rtc , but in Jessie no luck.

I have removed all the stuff I had added to /etc/rc.local
and modified /boot/config.txt to include

dtoverlay=i2c-rtc,ds1307
dtparam=i2c_arm=on

otherwise it's as default

Any thoughts why it won't work ?

Gordon

fruit-uk
Posts: 609
Joined: Wed Aug 06, 2014 4:19 pm
Location: Suffolk, UK

Re: RTC not working in Jessie

Thu Oct 29, 2015 7:52 pm

I have it working, as metioned in viewtopic.php?f=45&t=124573&p=836198&hi ... tc#p836198
but I'll add details here too as the thread title is more appropriate.

I have no idea whether it's a good way to do it or just a bodge - I'm sure that those who know will soon say if it's not a good method ;)

As you've done, enable i2c and your RTC in config.txt
Add relevant modules to /etc/modules I have

Code: Select all

i2c-dev
i2c-bcm2708
rtc-ds1307
then following advice on http://afterthoughtsoftware.com/products/rasclock
comment out

Code: Select all

if [ -e /run/systemd/system ] ; then
    exit 0
fi
in /lib/udev/hwclock-set
then set, read and save hwclock

Hope it works for you

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: RTC not working in Jessie

Thu Oct 29, 2015 8:00 pm

It's not a "bodge" if it works, it's a "work-around for a new feature". I've got to sit down with my B+ that has the RTC and study what's failing so I can report it on the kernel github.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

fruit-uk
Posts: 609
Joined: Wed Aug 06, 2014 4:19 pm
Location: Suffolk, UK

Re: RTC not working in Jessie

Thu Oct 29, 2015 8:49 pm

Well, it's still working after several more boots so I'm happy with that.

RTC and Pis seem to have been ongoing issue, many sorted it satisfactorily under wheezy but others still had problems - and there has never been one place to find answers.

It would be really useful to have it sorted once and for all - at least for those of us with RTCs - though I appreciate it's not an issue, and could perhaps be considered a waste of effort, by those who don't

Edit: just a bit of further information...
Before I commented out those lines hwclock was being written to somewhere between shutdown and login as 'hwclock -r' after login always came back with no valid data

Return to “Raspberry Pi OS”