Computer boots 2 hours after BIOS wake-up time setting (Sparky Linux)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Usually the hardware and the wake-up function are running on UTC. Double check what time zone you are in and the offset from UTC and then readjust the wake-up function accordingly.
(Edit: yes: the BIOS time+date should always be set to UTC & the OS will adjust based on the locale)
There is no locale setting in the hardware. That is managed by the operating system. The hardware clock itself is UTC.
In the case of GNU/Linux each of the different accounts use whichever locale they want but you can also set one to be used by default. You can even run different programs under different time zones.
Code:
date +"%F %T %Z (%z)"
date -u +"%F %T %Z (%z)"
TZ=America/Chicago date +"%F %T %Z (%z)"
TZ=Europe/Helsinki date +"%F %T %Z (%z)"
TZ=Asia/Tokyo date +"%F %T %Z (%z)"
TZ=Australia/SugganBuggan date +"%F %T %Z (%z)"
# etc
From what I remember, Windows could not manage time zones so a hack was to set the hardware to the local time. That's not appropriate on normal operating systems which can actually handle timezones.
Last edited by Turbocapitalist; 05-07-2021 at 10:10 AM.
Just as an FYI:
Your correct the BIOS or hardware clock does not have a timezone (or locale) setting and the only way the operating system (i.e. linux) knows what it is set to is via the /etc/adjtime file. The only configuration settings are UTC or LOCAL.
The system clock is always set to UTC regardless of the timezone setting and the desktop display and date command defaults to the current timezone setting to display time as local. Even though the system can adjust for either the hardware clock being UTC or local time there can be some confusion if it is set to local during daylight saving changes. This is why it is much easier to use UTC. It also helps if you are using ntp, chronyc or even systemd-timesyncd to keep the system clock set correctly.
Quote:
I've set the BIOS option of wake-up by time but the computer turns-on exactly 2 hours afterwards.
Somewhat ambiguous, does the computer wake up after two hours regardless of the actual wake time or is the difference between your local time and UTC just two hours? The BIOS wake up time is independent of the operating system.
Here's an example:
Locale time: UTC+6
BIOS currently set to locale time
The BIOS is to wake-up the machine at 08:00
In practice the computer wakes up at 14:00
The wake-up shouldn't depend on the OS clock so why does the computer wake-up 6 hours later?.
Here's an example:
Locale time: UTC+6
BIOS currently set to locale time
The BIOS is to wake-up the machine at 08:00
In practice the computer wakes up at 14:00
The wake-up shouldn't depend on the OS clock so why does the computer wake-up 6 hours later?.
Local time UTC+6 means that local time of 1400 (2 pm) would be 08:00 (8 am) UTC. Local time in that time zone is UTC+6, so it is 6 hours ahead of UTC (or the local time clock reads 6 hours later in the day than UTC time). The wake up is happening as scheduled.
You would be ahead to turn off the bios wake up and set your wake up according to local time in the OS. Alternatively, use the bios wake up but adjust the wake up time according to the time zone difference. In your case that would mean for a local time of 8:00 am (UTC+6) the bios wake up would be 2:00 am UTC
Last edited by computersavvy; 05-07-2021 at 10:18 PM.
What is an OS wakeup? and how can the OS turn-on the machine of it's off? nothing is running.
You might have confused wake-up with hibernate/sleep. I'm referring to a machine which is turned-off and the BIOS turns it on at the specified time.
I think I've figured out what's happening:
Both the BIOS & the OS (Sparky linux) were set to the local time.
However sparky knows that the local time is UTC+6 (for example) and resets the BIOS to its "correct" UTC time but not the BIOS wakeup time option. Therefore the next day the machine wakes up (turns-on) with a local-UTC time shift.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.