Manually set time and date reverts to Automatically on restart (Ubuntu Phone)

Bug #1390120 reported by jtd
50
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Bill Filler
lxc-android-config (Ubuntu)
Fix Released
High
Ken VanDine
systemd (Ubuntu)
Invalid
High
Unassigned
systemd-shim (Ubuntu)
Fix Released
High
Ken VanDine
ubuntu-system-settings (Ubuntu)
Invalid
Critical
Unassigned

Bug Description

1a - On OS build #6 (Channel: ubuntu-touch/ubuntu-rtm/14.09), I open "Time & Date" settings and select "Manually" under "Set the time and date:"
2a - I set the time manually from Old_Time to New_Time and wait for New_Time to display in the "Date Time Indicator" at top-right
3a - Then restart Ubuntu Phone and "Date Time Indicator" shows New_Time for 10 seconds and then reverts to Old_Time
4a - Time & Date settings agree with Old_Time and "Automatically" has been selected under "Set the time and date:"

Tags: avengers clock
affects: ubuntu-clock-app → ubuntu-system-settings
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, settings call the systemd interface which changes the configuration but that's not persistant. I looks like a ntpdate or systemd request to store the configuration and restore it on boot

affects: ubuntu-system-settings → systemd
affects: systemd → systemd (Ubuntu)
Revision history for this message
Martin Pitt (pitti) wrote :

What kind of systemd interface is system-settings calling to enable/disable automatic time? At the moment we install ntpdate, which hooks itself into /etc/dhcp/dhclient-exit-hooks.d which isn't configurable. timedatectl's set-ntp command is for a local NTP server like ntpd or chronyd, but we don't install any on the phone.

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-system-settings (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

@Martin, settings call org.freedesktop.timedate1 SetNTP(), so I guess that panel is just doing nothing useful when selecting automatic update?

Changed in ubuntu-system-settings (Ubuntu):
importance: Undecided → High
Changed in systemd (Ubuntu):
importance: Undecided → High
status: Incomplete → Invalid
Revision history for this message
Iain Lane (laney) wrote : Re: [Bug 1390120] Re: Manually set time and date reverts to Automatically on restart (Ubuntu Phone)

On Thu, Feb 12, 2015 at 01:30:08PM -0000, Sebastien Bacher wrote:
> @Martin, settings call org.freedesktop.timedate1 SetNTP(), so I guess
> that panel is just doing nothing useful when selecting automatic update?

Can you verify this bug?

I first had to cherry-pick

  https://github.com/desrt/systemd-shim/commit/6c3d9756be9075a0053f7e11e97da3f39b69781e

otherwise the setting wasn't effective (check for 'NTP enabled: n/a' in
timedatectl, should be no or yes), but after that manual was persistent
and also time wasn't reset on reboot as you'd expect would happen if
ntpdate was unconditionally called.

This was all on vivid. I'm not sure why it would be different on RTM,
except that you shouldn't need the cherry-pick there since systemd is
older.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Revision history for this message
Sebastien Bacher (seb128) wrote :

Unsure what's going on there, but on my rtm bq device automatic doesn't reverts

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

On krillin/vivid this is the opposite behaviour. "Manual" is set by default after a fresh flash, if the user set it to "Automatic" and reboot, it's back to "Manual" upon reboot.

Revision history for this message
Trev Cobbett (nysosis) wrote :

It also reverts to 'automatic' after connecting to a wi-fi network (not sure if part of this bug, or should raise as separate bug, but it's the same behaviour issue)

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Bumping importance on this

We should also decide on the proper default which I would assume to be Automatically

Changed in ubuntu-system-settings (Ubuntu):
assignee: nobody → Ken VanDine (ken-vandine)
importance: High → Critical
Changed in canonical-devices-system-image:
assignee: nobody → Bill Filler (bfiller)
importance: Undecided → High
milestone: none → ww22-2015
status: New → Confirmed
Changed in systemd-shim (Ubuntu):
status: New → Confirmed
Changed in ubuntu-system-settings (Ubuntu):
status: Confirmed → Invalid
Changed in systemd-shim (Ubuntu):
importance: Undecided → High
Revision history for this message
Bill Filler (bfiller) wrote :

I'm testing the silo and don't really understand what is supposed to happen. I first set my timezone, and even though the setting is set to Manual the time adjusts correctly to my current timezeone.

Seems like problem 1 is the default setting should be Automatic if it's going to use that behavior.

Problem 2, I press manual and change the date and time. It correctly updates. Then I switch back to Automatic. Nothing happens. I would expect the date/time to go back to the automatic time based on my timezone.

Problem 3, there seems to be no way to change the time back to the correct time without having to manually set it back

Revision history for this message
Ken VanDine (ken-vandine) wrote :

The bug isn't really about changing the time, it's about changing automatic and manual. We've figured out that this fix is only part of the problem. This works well if the device is read/write but it still doesn't persist after reboot. We need to figure out where the daemon is writing the state to and add it to the white list for writable paths.

Changed in lxc-android-config (Ubuntu):
importance: Undecided → Critical
importance: Critical → High
assignee: nobody → Ken VanDine (ken-vandine)
Changed in systemd-shim (Ubuntu):
assignee: nobody → Ken VanDine (ken-vandine)
Changed in ubuntu-system-settings (Ubuntu):
assignee: Ken VanDine (ken-vandine) → nobody
Changed in lxc-android-config (Ubuntu):
status: New → In Progress
Changed in systemd-shim (Ubuntu):
status: Confirmed → In Progress
Changed in canonical-devices-system-image:
status: Confirmed → Fix Released
Changed in lxc-android-config (Ubuntu):
status: In Progress → Fix Committed
Changed in systemd-shim (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Iain Lane (laney) wrote :

On Fri, May 22, 2015 at 04:18:50PM +0100, Iain Lane wrote:
> On Fri, May 22, 2015 at 03:01:43PM -0000, Pat McGowan wrote:
> > ** Changed in: canonical-devices-system-image
> > Status: Confirmed => Fix Released
>
> I'm not sure what that means but if it means that it's supposed to be
> fixed then it's not yet. I only uploaded one piece to wily. I think
> seb128 is handling the rest (+ vivid/overlay).

Thought this was a different bug. Disregard. :)

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc-android-config - 0.223

---------------
lxc-android-config (0.223) vivid; urgency=medium

  [ Oliver Grawert ]
  * usr/bin/tethering: reloading config to get tethering working again

  [Alfonso Sanchez-Beato]
  * fix regression with NM setting DEVICE_IFACE to "ril_0" instead of
    "/ril_0" (LP: #1454625)

 -- Ken VanDine <email address hidden> Wed, 20 May 2015 13:17:34 -0400

Changed in lxc-android-config (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd-shim - 9-1bzr3

---------------
systemd-shim (9-1bzr3) wily; urgency=medium

  * debian/patches/lp1390120.patch
    - Cherrypicked: Use the ntp support for 'systemd-timesyncd.service'
      too (LP: #1390120)

 -- Ken VanDine <email address hidden> Mon, 18 May 2015 10:43:32 -0400

Changed in systemd-shim (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.