You are not logged in.
Pages: 1
Hi
I tried the following to wake up laptop, after shutting down (for today and later time):
rtcwake -m no --date 2019-01-02 12:23
rtcwake: time doesn't go backward to Tue Jan 1 19:00:00 2019
rtcwake -m no --date 2019-01-04 12:23
rtcwake: wakeup using /dev/rtc0 at Thu Jan 3 19:00:00 2019
but this works:
rtcwake -m no --date 12:23
rtcwake: wakeup using /dev/rtc0 at Wed Jan 2 07:23:00 2019
Please inform; why first two with date is error?
Thankyou
Last edited by makh (2019-01-10 11:42:08)
OS: Arch &/ Debian
System: LENOVO ThinkPad E14
Desktop: Xfce
Offline
You are not passing time as an argument to "--date" but rather it is its own command line parameter parsed seperately. Either quote the date-time string, or escape the space.
rtcwake -m no --date "2019-01-02 12:23"
# or
rtcwake -m no --date 2019-01-02\ 12:23
Last edited by Trilby (2019-01-02 15:44:45)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Hello Sir
Thanks for your kind guidance.
But I am also having time issue:
# rtcwake -v -m no --date 2019-01-038:30 -l
Using local time.
delta = 17999
tzone = -18000
tzname = PKT
systime = 1546455785, (UTC) Wed Jan 2 19:03:05 2019
rtctime = 1546437786, (UTC) Wed Jan 2 14:03:06 2019
alarm 1546486200, sys_time 1546455785, rtc_time 1546437786, seconds 0
rtcwake: wakeup using /dev/rtc0 at Thu Jan 3 03:30:01 2019
suspend mode: no; leaving
# date
Wed Jan 2 23:59:37 PKT 2019
ie 8:30 becomes: 3:30
Looking at the example:
https://www.ostechnix.com/automatically … tion-mode/
# rtcwake -m no -l -t $(date +%s -d 'tomorrow 10:00')
rtcwake: wakeup using /dev/rtc0 at Fri Jan 4 05:00:01 2019
Trying -u is the default, and -l is also the default. I am having local time and universal time 5 hours issue.
Thankyou
OS: Arch &/ Debian
System: LENOVO ThinkPad E14
Desktop: Xfce
Offline
Pakistan is 5h ahead of UTC, so the gap between systime and rtctime suggests that the rtc is kept in UTC and NOT in your local time, ie. replace "-l" w/ "-u" (the default is listed in /etc/adjtime and should be UTC there)
The wakeup time is in UTC, so don't worry about that.
Fire
rtcwake -u --date +5min
and see whether the system wakes up in 5 minutes
Offline
I'd suggest using neither "-u" nor "-l", but the default "-a" (--auto) option and let rtcwake read the settings from /etc/adjtime.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Pakistan is 5h ahead of UTC, so the gap between systime and rtctime suggests that the rtc is kept in UTC and NOT in your local time, ie. replace "-l" w/ "-u" (the default is listed in /etc/adjtime and should be UTC there)
The wakeup time is in UTC, so don't worry about that.
Firertcwake -u --date +5min
and see whether the system wakes up in 5 minutes
Hello Sir!
This command gave error:
rtcwake -u --date +5min
rtcwake: wakeup from "suspend" using /dev/rtc0 at Thu Jan 3 11:58:25 2019
rtcwake: write error
But following works:
rtcwake -m no -u --date +6h
rtcwake: wakeup using /dev/rtc0 at Thu Jan 3 18:01:36 2019
... then I have to caculate the time, each time rather then give exact time!
Thankyou
Last edited by makh (2019-01-03 12:03:21)
OS: Arch &/ Debian
System: LENOVO ThinkPad E14
Desktop: Xfce
Offline
I'd suggest using neither "-u" nor "-l", but the default "-a" (--auto) option and let rtcwake read the settings from /etc/adjtime.
Hi
Nopes, it doesnt works...:
rtcwake -m no -a --date 2018-01-058:30
rtcwake: time doesn't go backward to Fri Jan 5 03:30:00 2018
I think the error is the default time rtcwake is taking only as UTC. Probably theres a bug; as the blog I quoted before informed that it should work!
Thankyou
Last edited by makh (2019-01-03 12:06:17)
OS: Arch &/ Debian
System: LENOVO ThinkPad E14
Desktop: Xfce
Offline
The write error is from a failure to set S1, try eg "-m mem" instead.
However if it works this way, passing the full date should work either.
Also, because the auto-mode fails: "cat /etc/adjtime" ?
Offline
I don't know it it would explain these symptoms, but your date/time strings still don't match any of the accepted formats. I said quote or escape the space, but instead you've just removed the space making a largely nonsensical day and hour smashed together. One of the accepted formats is with all the digits together, but then there should be no hypens or colon. Pick one format.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Hi
@Seth: Well it works ... but I am still stuck here (-u or -l have no difference!):
# rtcwake -m mem -u --date "2019-01-04 8:30"
rtcwake: wakeup from "mem" using /dev/rtc0 at Fri Jan 4 03:30:00 2019
# date
Thu Jan 3 23:30:25 PKT 2019
... should I bug report it? Do you get the same problem wrt your timezone?
@Trilby: You are right. Everything should be nice and clean!
Edit-1: I tested this in Debian. Now:
-u gets me to 3:30
and
-l takes me to 13:30
Thankyou
Last edited by makh (2019-01-03 18:45:54)
OS: Arch &/ Debian
System: LENOVO ThinkPad E14
Desktop: Xfce
Offline
This
rtcwake: wakeup from "mem" using /dev/rtc0 at Fri Jan 4 03:30:00 2019
is supposed to be UTC, ie. 8:30 in Pakistan.
The main question and test is whether "rtcwake -u -m mem --date +5min" sends your system to sleep and wakes it up 5 minutes later. You can also try w/ an absolute timestamp like
rtcwake -u -m mem --date "2019-01-04 1:40"
(assuming it's around 1:35 at your site)
We still lack the contents of /etc/adjtime to determine the assumed RTC default mode (utc./.local)
Offline
Hi
# rtcwake -u -m mem --date +5min
... works ok!
# cat /etc/adjtime
0.000000 1485340437 0.000000
1485340437
UTC
# rtcwake -u -m mem --date "2019-01-04 1:38"
rtcwake: time doesn't go backward to Thu Jan 3 20:38:00 2019
... a failure!
Thankyou
OS: Arch &/ Debian
System: LENOVO ThinkPad E14
Desktop: Xfce
Offline
At least when you posted this, it was about 03:00 in Pakistan (shouldn't you be asleep?) - so 1:38 was already in the past.
Your adjtime is UTC, so "-u" should not be required.
Offline
Hi
Any fix for?
# rtcwake -m mem -u --date "2019-01-04 8:30"
rtcwake: wakeup from "mem" using /dev/rtc0 at Fri Jan 4 03:30:00 2019
Thankyou
OS: Arch &/ Debian
System: LENOVO ThinkPad E14
Desktop: Xfce
Offline
What do you want to fix?
Once again: "rtcwake: wakeup from "mem" using /dev/rtc0 at Fri Jan 4 03:30:00 2019" displays the time in UTC, which is 5h behind PKT, so when you wake up at 8:30, people in Greenwich are still sleeping, because for them it's 3:30.
Offline
What do you want to fix?
Once again: "rtcwake: wakeup from "mem" using /dev/rtc0 at Fri Jan 4 03:30:00 2019" displays the time in UTC, which is 5h behind PKT, so when you wake up at 8:30, people in Greenwich are still sleeping, because for them it's 3:30.
Hi
If I use:
rtcwake -m show
1. It displays me UTC time; which is infact very confusing!
2. It takes input time as local time but processes it to UTC.
3. The UTC parameter is not working.
Anyhow; then there is nothing to go for, from here, except contacting the developer, himself! ... I think so...
Thankyou
OS: Arch &/ Debian
System: LENOVO ThinkPad E14
Desktop: Xfce
Offline
Pages: 1