You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a dual-boot system with both Windows 10 and Ubuntu. Each OS uses a different way of storing the time in the machine. Linux uses UTC, and Windows uses the local time-zone, which is US Pacific Time for me.
Ubuntu sets the time sometime during startup. I have set Windows up to do the same. When switching back and forth between the two, an interesting issue happens. Specifically, when I boot Windows, then boot to Ubuntu (20.04.3), autosuspend nearly instantly suspends the machine. If I reboot Ubuntu one more time, with the time already being correct from the start of the boot process, everything behaves as intended - no instant suspend.
I think there is some sort of race condition between ntp and autosuspend services on Linux. This is not just merely an inconvenience to have to restart the machine right away, it also wears out the 8 old fashioned 14TB SATA hard disks, since the machine acts mainly as a NAS.
The simplest solution is probably to figure out a way to ensure autosuspend runs after ntp. It looks like the timesyncd service is the issue. I'm not certain how to accomplish this in systemd given the many Ubuntu targets.
A better solution would be to perhaps also take a look at the hardware monotonic clock, and figure out when a big shift has happened in the clock due to a time synchronization happened, while autosuspend was already running, and take appropriate action.
The text was updated successfully, but these errors were encountered:
I would expect that there are several services that can be confused by big time jumps. NTP usually tries to avoid big shifts and uses gradual fixes, but that's probably not feasible for such big differences
I have a dual-boot system with both Windows 10 and Ubuntu. Each OS uses a different way of storing the time in the machine. Linux uses UTC, and Windows uses the local time-zone, which is US Pacific Time for me.
Ubuntu sets the time sometime during startup. I have set Windows up to do the same. When switching back and forth between the two, an interesting issue happens. Specifically, when I boot Windows, then boot to Ubuntu (20.04.3), autosuspend nearly instantly suspends the machine. If I reboot Ubuntu one more time, with the time already being correct from the start of the boot process, everything behaves as intended - no instant suspend.
I think there is some sort of race condition between ntp and autosuspend services on Linux. This is not just merely an inconvenience to have to restart the machine right away, it also wears out the 8 old fashioned 14TB SATA hard disks, since the machine acts mainly as a NAS.
The simplest solution is probably to figure out a way to ensure autosuspend runs after ntp. It looks like the timesyncd service is the issue. I'm not certain how to accomplish this in systemd given the many Ubuntu targets.
A better solution would be to perhaps also take a look at the hardware monotonic clock, and figure out when a big shift has happened in the clock due to a time synchronization happened, while autosuspend was already running, and take appropriate action.
The text was updated successfully, but these errors were encountered: