public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Giacomo <giacomo.perale@gmail.com>
To: util-linux@vger.kernel.org
Subject: rtcwake doesn't reset wakealarm
Date: Tue, 11 Sep 2012 11:11:46 +0000 (UTC)	[thread overview]
Message-ID: <loom.20120911T131040-30@post.gmane.org> (raw)

Hi,

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). Resetting it to 0 with "echo 0 >
/sys/class/rtc/rtc0/wakealarm" made the interrupt stop.

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.

I removed the check to revert to the previous behaviour and after my machine
rebooted /sys/class/rtc/rtc0/wakealarm was correctly (I suppose) set to 0, rtc
didn't fire regular interrupts anymore and there were apparently no negative
consequences.

Is this a bug or am I missing something?

Thanks,

Giacomo

PS. I'm not subscribed to the list so please cc me if you need other information.


             reply	other threads:[~2012-09-11 11:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 11:11 Giacomo [this message]
2012-09-12  9:52 ` rtcwake doesn't reset wakealarm Giacomo
2012-09-12 10:09   ` Karel Zak
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=loom.20120911T131040-30@post.gmane.org \
    --to=giacomo.perale@gmail.com \
    --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