Your message dated Mon, 28 Dec 2020 01:51:50 +0100
with message-id <[email protected]>
and subject line Re: #505138: Please preserve the ACPI wakeup time when 
updating the hardware clock
has caused the Debian Bug report #505138,
regarding util-linux: Please preserve the ACPI wakeup time when updating the 
hardware clock
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
505138: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505138
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: util-linux
Version: 2.13.1.1-1
Severity: wishlist
Tags: patch

Hi,

According to http://www.mythtv.org/wiki/index.php/ACPI_Wakeup, some
computers never wake up if the hardware clock is fiddled with after
setting an ACPI wakeup time. The above URL goes on to specify a
modification to /etc/init.d/hwclock.sh to address this.

I've made a kernel-version agnostic patch to accomplish this. Please
consider adding it to Debian's util-linux package.

regards

Andrew

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-686
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)

Versions of packages util-linux depends on:
ii  lib 2.3.6.ds1-13etch7                    GNU C Library: Shared libraries
ii  lib 5.5-5                                Shared libraries for terminal hand
ii  lib 2.0.6-4                              The S-Lang programming library - r
ii  lib 1.39+1.40-WIP-2006.11.14+dfsg-2etch1 universally unique id library
ii  lsb 3.1-23.2etch1                        Linux Standard Base 3.1 init scrip
ii  tzd 2008e-1etch3                         Time Zone and Daylight Saving Time
ii  zli 1:1.2.3-13                           compression library - runtime

util-linux recommends no packages.

-- no debconf information
--- /tmp/hwclock.sh.orig        2008-11-08 14:57:29.000000000 -0800
+++ /etc/init.d/hwclock.sh      2008-11-08 15:04:13.000000000 -0800
@@ -122,6 +122,18 @@
            # WARNING: If you disable this, any changes to the system
            #          clock will not be carried across reboots.
            #
+           # Preserve an ACPI wakeup time
+           # (see http://www.mythtv.org/wiki/index.php/ACPI_Wakeup)
+           if [ -f /sys/class/rtc/rtc0/wakealarm ]; then
+               ACPITIME_LOCATION=""
+           elif [ -f /proc/acpi/alarm ]; then
+               ACPITIME_LOCATION="/proc/acpi/alarm"
+           else
+               ACPITIME_LOCATION=""
+           fi 
+           if [ "$ACPITIME_LOCATION" ]; then
+               ACPITIME=$(cat $ACPITIME_LOCATION)
+           fi
            if [ "$HWCLOCKACCESS" != no ]; then
                log_action_msg "Saving the system clock"
                if [ "$GMT" = "-u" ]; then
@@ -130,6 +142,9 @@
                if /sbin/hwclock --systohc $GMT $HWCLOCKPARS $BADYEAR; then
                    verbose_log_action_msg "Hardware Clock updated to `date`"
                fi
+               if [ "$ACPITIME_LOCATION" ]; then
+                   echo "$ACPITIME" > $ACPITIME_LOCATION
+               fi
            else
                verbose_log_action_msg "Not saving System Clock"
            fi

--- End Message ---
--- Begin Message ---
Hi,

I'm closing bug in util-linux, because:

On modern systems, the hwclock.sh init script is not in use.
Instead, the kernel runs in "update RTC every 11 minutes" mode.

So, even if we turned off the systohc call there, it would not do
much good. Best case we will have a hard-to-debug race with the
kernels update mechanism.

If this is still a problem, it makes sense to teach the kernel clock
keeping code about this. That would - probably - also make it work
in case hwclock is actually invoked: most of the time a modern
hwclock binary will just tell the kernels RTC driver to do the work.
Therefore: if you want this done, please get in touch with the Linux
kernel folks.

Sorry,
Chris

--- End Message ---

Reply via email to