Tab Pro 8.4 + TWRP 2.7.0.2 + CM11 = wrong date & time

Search This thread

Zero-V

Member
Apr 21, 2014
27
4
Hi, I have some weird behavior with date and time in CM11 - I can set it through settings (I can`t use network time, I do it manually), but after reboot it reverts back to 2nd January 2014 :eek: It is not frozen though, it changes in time. Another strange thing that in TWRP time is total different from actual and that reverted in CM11. So I have three "times": original we live in, for CM11 after reboot and for TWRP :eek:

As I can`t find anything about it, I suppose everyone`s time is fine. So can someone with CM11 and TWRP please try to set some wrong time manually and check whether it is changes on reboot? Thanks.

EDIT: While researching, I find this line on dmesg output:
"alarm_set_rtc: Failed to set RTC, time will be lost on reboot"

Found this topic
http://xdaforums.com/showthread.php?t=2480713

So, maybe crpalmer could confirm that all is needed is to recompile kernel with `rtc_write_enable` to `true` flag? :)
 

crpalmer

Inactive Recognized Developer
Mar 25, 2011
2,999
8,280
Hi, I have some weird behavior with date and time in CM11 - I can set it through settings (I can`t use network time, I do it manually), but after reboot it reverts back to 2nd January 2014 :eek: It is not frozen though, it changes in time. Another strange thing that in TWRP time is total different from actual and that reverted in CM11. So I have three "times": original we live in, for CM11 after reboot and for TWRP :eek:

As I can`t find anything about it, I suppose everyone`s time is fine. So can someone with CM11 and TWRP please try to set some wrong time manually and check whether it is changes on reboot? Thanks.

EDIT: While researching, I find this line on dmesg output:
"alarm_set_rtc: Failed to set RTC, time will be lost on reboot"

Found this topic
http://xdaforums.com/showthread.php?t=2480713

So, maybe crpalmer could confirm that all is needed is to recompile kernel with `rtc_write_enable` to `true` flag? :)

My time is correct (via network time services). Why (and how) are you unable to use them?

Can you provide specific steps to reproduce the problem that you are seeing?
 

Zero-V

Member
Apr 21, 2014
27
4
My time is correct (via network time services). Why (and how) are you unable to use them?

Can you provide specific steps to reproduce the problem that you are seeing?
I`m not surprised that your time via network sync is correct. About why - I`ll make long story short: I have no wifi now and will not have for some times in future.

Specific steps are easy enough: set manually time&date in settings, then reboot - time&date are far from what you have set (without network syncing of course).

Can you go to terminal or adb shell and see if that rtc message is there? E.g.
dmesg | grep time
or
adb shell su -c dmesg | grep rtc
 
Last edited:

crpalmer

Inactive Recognized Developer
Mar 25, 2011
2,999
8,280
Hi, I have some weird behavior with date and time in CM11 - I can set it through settings (I can`t use network time, I do it manually), but after reboot it reverts back to 2nd January 2014 :eek: It is not frozen though, it changes in time. Another strange thing that in TWRP time is total different from actual and that reverted in CM11. So I have three "times": original we live in, for CM11 after reboot and for TWRP :eek:

As I can`t find anything about it, I suppose everyone`s time is fine. So can someone with CM11 and TWRP please try to set some wrong time manually and check whether it is changes on reboot? Thanks.

EDIT: While researching, I find this line on dmesg output:
"alarm_set_rtc: Failed to set RTC, time will be lost on reboot"

Found this topic
http://xdaforums.com/showthread.php?t=2480713

So, maybe crpalmer could confirm that all is needed is to recompile kernel with `rtc_write_enable` to `true` flag? :)

I finally got a chance to try this out for you and I think that the reason that the write is disabled is that our hardware PM hardware doesn't have an RTC that can be set.

When I enable the write, it tries it and fails:

Code:
<6>[    7.226332] qcom,qpnp-rtc qpnp-rtc-e1946600: Seconds value to be written to RTC = 1392714221
<3>[    7.226437] qcom,qpnp-rtc qpnp-rtc-e1946600: SPMI write failed
<3>[    7.226443] qcom,qpnp-rtc qpnp-rtc-e1946600: Write to RTC reg failed

which means that there isn't much that I can do to fix it.
 

Zero-V

Member
Apr 21, 2014
27
4
I finally got a chance to try this out for you and I think that the reason that the write is disabled is that our hardware PM hardware doesn't have an RTC that can be set.

When I enable the write, it tries it and fails:

Code:
<6>[    7.226332] qcom,qpnp-rtc qpnp-rtc-e1946600: Seconds value to be written to RTC = 1392714221
<3>[    7.226437] qcom,qpnp-rtc qpnp-rtc-e1946600: SPMI write failed
<3>[    7.226443] qcom,qpnp-rtc qpnp-rtc-e1946600: Write to RTC reg failed

which means that there isn't much that I can do to fix it.

Strange, so there is no way to change hardware clock from OS? Even from stock Samsung`s Android? Maybe from recovery? I mean I think it has to be a way to set it somehow...

EDIT:
Wait, are you saying there is no hardware RTC of any type? I doubt it! Because when rebooted, tablet`s clock is not set to specific date&time, it is go back by some N seconds. And anyway not having RTC in such device is almost impossible imho.
 
Last edited: