LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-07-2021, 09:26 AM   #1
jt1122
Member
 
Registered: Apr 2021
Posts: 140

Rep: Reputation: Disabled
Computer boots 2 hours after BIOS wake-up time setting (Sparky Linux)


Hi,

I've set the BIOS option of wake-up by time but the computer turns-on exactly 2 hours afterwards.

Both my BIOS clock & the linux clock show the same time.

I'm on sparky linux rolling (=debian testing).

I'd appreciate suggestions on this. Maybe a locale issue?.

Thanks
 
Old 05-07-2021, 09:28 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,357
Blog Entries: 3

Rep: Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767
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.
 
Old 05-07-2021, 09:35 AM   #3
jt1122
Member
 
Registered: Apr 2021
Posts: 140

Original Poster
Rep: Reputation: Disabled
Thanks.

But how does the BIOS know what is the current UTC time? there's no BIOS locale setting (at least in my machine) so why would there be a shift?.

Or should the BIOS time+date should always be set to UTC & the OS will adjust based on the locale?.

Last edited by jt1122; 05-07-2021 at 09:38 AM.
 
Old 05-07-2021, 10:07 AM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,357
Blog Entries: 3

Rep: Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767
(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.
 
Old 05-07-2021, 10:34 AM   #5
jt1122
Member
 
Registered: Apr 2021
Posts: 140

Original Poster
Rep: Reputation: Disabled
Thanks
 
Old 05-07-2021, 11:27 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,783

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
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.
 
Old 05-07-2021, 11:59 AM   #7
jt1122
Member
 
Registered: Apr 2021
Posts: 140

Original Poster
Rep: Reputation: Disabled
Thanks.

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?.
 
Old 05-07-2021, 10:14 PM   #8
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by jt1122 View Post
Thanks.

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.
 
Old 05-08-2021, 06:27 AM   #9
jt1122
Member
 
Registered: Apr 2021
Posts: 140

Original Poster
Rep: Reputation: Disabled
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.

Last edited by jt1122; 05-08-2021 at 06:29 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux Weekly Roundup: GIMP 2.99.2, LXQt 0.16.0, Sparky Linux 5.13 and More LXer Syndicated Linux News 0 11-08-2020 03:12 PM
[SOLVED] Sparky Linux (Debian Testing) Locks Up, FF Locks Up, Have to perform Hard Shutdowns Ztcoracat Debian 17 06-30-2017 11:15 AM
[SOLVED] Sparky Linux Thumbnail s Are Missing Ztcoracat Linux - General 21 03-09-2017 06:08 PM
Linux machine gets stuck after 8 hours or 12 hours fahadaziz Linux - Newbie 4 03-28-2010 04:19 PM
Easy Bios? (floppy that boots and runs new bios) tearinox Linux - Hardware 5 10-12-2004 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration