From: Karel Zak <kzak@redhat.com>
To: Giacomo <giacomo.perale@gmail.com>
Cc: util-linux@vger.kernel.org, Paul Fox <pgf@laptop.org>
Subject: Re: rtcwake doesn't reset wakealarm
Date: Wed, 12 Sep 2012 12:09:16 +0200 [thread overview]
Message-ID: <20120912100916.GB17256@x2.net.home> (raw)
In-Reply-To: <loom.20120912T113440-886@post.gmane.org>
Let's add Paul to CC ;-)
On Wed, Sep 12, 2012 at 09:52:14AM +0000, Giacomo wrote:
> Giacomo <giacomo.perale@...> writes:
>
> > I recently upgraded to util-linux 2.22 and I noticed that powertop started
> > reporting about 50-60 wakeups per second caused by rtc (interrupt 8).
> >
> > I quickly found out that this happened when I used rtcwake to wake up the
> > machine, and that after the reboot /sys/class/rtc/rtc0/wakealarm was still
> > set to the scheduled wakeup time (now in the past).
> >
> > After a quick investigation I discovered that this is caused by commit
> > 1707576155daf644c5df3c1776b52fd297ff9318 ("rtcwake: only invoke RTC_AIE_ON/OFF
> > ioctls in pairs"): my system uses RTC_WKALM_SET so ioctl_aie_on stays false and
> > RTC_AIE_OFF doesn't get called.
> >
>
> Hi,
>
> that commit also broke "disable". This is what happens on my system:
>
> KazeNoTani ~ # cat /sys/class/rtc/rtc0/wakealarm
> KazeNoTani ~ # rtcwake -m show
> alarm: off
> KazeNoTani ~ # rtcwake -m no -s 300
> rtcwake: wakeup using /dev/rtc0 at Wed Sep 12 09:40:31 2012
> KazeNoTani ~ # rtcwake -m show
> alarm: on Wed Sep 12 09:40:32 2012
> KazeNoTani ~ # cat /sys/class/rtc/rtc0/wakealarm
> 1347442831
> KazeNoTani ~ # rtcwake -m disable
> KazeNoTani ~ # rtcwake -m show
> alarm: on Wed Sep 12 09:40:32 2012
> KazeNoTani ~ # cat /sys/class/rtc/rtc0/wakealarm
> 1347442831
> KazeNoTani ~ # echo 0 > /sys/class/rtc/rtc0/wakealarm
> KazeNoTani ~ # cat /sys/class/rtc/rtc0/wakealarm
> KazeNoTani ~ # rtcwake -m show
> alarm: off
>
>
> rtcwake -m disable doesn't remove the alarm. This is because as it is
> implemented now "-m disable" does nothing but break and rely on the call to
> RTC_AIE_OFF that was always done at the end of the execution of rtcwake, but now
> is conditional on "ioctl_aie_on" that doesn't get set in most cases.
>
> Thanks,
>
> Giacomo
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe util-linux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2012-09-12 10:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 11:11 rtcwake doesn't reset wakealarm Giacomo
2012-09-12 9:52 ` Giacomo
2012-09-12 10:09 ` Karel Zak [this message]
2012-09-12 10:31 ` Karel Zak
2012-09-12 14:33 ` Giacomo
2012-09-12 17:33 ` Giacomo
2012-09-13 11:25 ` Karel Zak
2012-09-13 16:31 ` Paul Fox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120912100916.GB17256@x2.net.home \
--to=kzak@redhat.com \
--cc=giacomo.perale@gmail.com \
--cc=pgf@laptop.org \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox