Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP Zero-V

21st April 2014, 01:46 AM   |  #1  
OP Junior Member
Thanks Meter: 3
 
18 posts
Join Date:Joined: Apr 2014
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?
21st April 2014, 01:54 AM   |  #2  
Senior Member
Thanks Meter: 2,766
 
1,854 posts
Join Date:Joined: Mar 2011
Donate to Me
Quote:
Originally Posted by Zero-V

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?
21st April 2014, 02:09 AM   |  #3  
OP Junior Member
Thanks Meter: 3
 
18 posts
Join Date:Joined: Apr 2014
Quote:
Originally Posted by crpalmer

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 by Zero-V; 21st April 2014 at 02:23 AM.
21st April 2014, 08:57 PM   |  #4  
Senior Member
Thanks Meter: 2,766
 
1,854 posts
Join Date:Joined: Mar 2011
Donate to Me
Quote:
Originally Posted by Zero-V

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.
21st April 2014, 09:32 PM   |  #5  
OP Junior Member
Thanks Meter: 3
 
18 posts
Join Date:Joined: Apr 2014
Quote:
Originally Posted by crpalmer

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 by Zero-V; 21st April 2014 at 11:15 PM.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes