Description of problem: This is more an RFE than a bug report. I've some machines which can wake up from off (or S5, I guess), as also mentioned it is possible (but not standard, it seems) in "man 4 rtc". On F8, the rtc wakeup was set using the /proc/acpi/alarm interface and then the machine was switched off with "poweroff". With F9, /proc/acpi/alarm was replaced by the /dev/rtcX interface and, AFAIK, by "rtcwake" for wakeup concerning issues. While this is a more consistent solution, something seems to be missing. "rtcwake" does not seem to support a "power off after wakeup timer set" option, i.e. "rtcwake -t xyz -m off". This would be not a real problem if the "on" option (or other) would simply return after setting the wakeup timer, like the old /proc/acpi/alarm did. I had a quick look at the code and it seems, when "-m on" is passed, "rtcwake" simply waits for the /dev/rtcX to generate/acknowledge the irq. Would it be possible either to add an "off" option (and then call "poweroff" or "shutdown" or whatever could be meaningful) or to return from the "on" case, leaving the timer set? Or to add a simple "set" option, just to set the wakeup? It seems, to the extent I could test, that "rtcwake -t xyz -m on & poweroff" does not work either, I guess "rtcwake" resets the timer on exit (I think the last ioctl() does this). Thanks a lot in advance. Version-Release number of selected component (if applicable): 2.13.1-6 How reproducible: Always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
The request has been added to the upstream TODO list.
Sorry to bother you again, but some time is gone and it is not clear the status of this TODO. Is it going to be implemented? BTW, where is the TODO list, I could not find it. Thanks, piergiorgio
(In reply to comment #2) > Sorry to bother you again no problem > but some time is gone and it is not clear the status > of this TODO. > > Is it going to be implemented? not yet :-( > BTW, where is the TODO list, I could not find it. http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=blob_plain;f=TODO;hb=HEAD
Created attachment 351110 [details] patchset and original files for S5 (off) wakeup Hi again, I put together a small patch, against 2.16-rc2, which is supposed to add the option to shutdown after the wakeup event is set. I attached a tar.bz2 (I hope it is correct) containing the patches for rtcwake.c and rtcwake.8, the original files and the modified ones (just in case...). Note that I did not even compile it, so, please have a look, maybe it is enough, maybe not. One issue I still have, in case executing "/sbin/shutdown" fails, I run a couple of things which might not be needed, so there a check is welcome. Thanks, piergiorgio
Hi, did you, by chance, have time to look into the patch I provided? Any comment/feedback? ETA? Thanks, pg
Hi Piergiorgio, thanks for the patch. I'll prepare a proper patch and send it to the upstream mailing list for review + CC: to you.
Note that the patch was applied to upstream tree (commit 77f5744c982cd57b1bf1181f8f37023512236902) a few months ago.