Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,732,310 Members 44,984 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
Zero-V
Old
#1  
Junior Member - OP
Thanks Meter 3
Posts: 14
Join Date: Apr 2014
Default Tab Pro 8.4 + TWRP 2.7.0.2 + CM11 = wrong date & time

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 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

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://forum.xda-developers.com/show....php?t=2480713

So, maybe crpalmer could confirm that all is needed is to recompile kernel with `rtc_write_enable` to `true` flag?
 
crpalmer
Old
#2  
Senior Member
Thanks Meter 1944
Posts: 1,491
Join Date: Mar 2011

 
DONATE TO ME
Quote:
Originally Posted by Zero-V View Post
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 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

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://forum.xda-developers.com/show....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
Old
(Last edited by Zero-V; 21st April 2014 at 01:23 AM.)
#3  
Junior Member - OP
Thanks Meter 3
Posts: 14
Join Date: Apr 2014
Quote:
Originally Posted by crpalmer View Post
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
 
crpalmer
Old
#4  
Senior Member
Thanks Meter 1944
Posts: 1,491
Join Date: Mar 2011

 
DONATE TO ME
Quote:
Originally Posted by Zero-V View Post
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 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

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://forum.xda-developers.com/show....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
Old
(Last edited by Zero-V; 21st April 2014 at 10:15 PM.)
#5  
Junior Member - OP
Thanks Meter 3
Posts: 14
Join Date: Apr 2014
Quote:
Originally Posted by crpalmer View Post
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.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes