Jump to content

Unraid sets BIOS time minus 2 hours (time zone)


4n0nyM

Recommended Posts

Unraid Version: 6.9.2

 

Hello all,

every time I start Unraid and then go into the BIOS, the time in the BIOS is turned back exactly two hours. However, the date, minutes and seconds are correct to the point. (Currently the time zone difference UTC in Germany is +2 hours). 
In Unraid itself, I set the date and time to Berlin (UTC +01:00) under Settings -> Date and Time. There is also the completely correct time displayed.
I suspect that Unraid passes the wrong time to the BIOS, i.e. without time zone. But I don't know what to change.

 

If I set the time correctly in the BIOS and immediately go back to the BIOS when rebooting, the time remains set correctly. Only as soon as I open Unraid and then go into the BIOS, the time is turned back by exactly two hours.

 

Would be very happy if you can help me.

Link to comment
1 hour ago, 4n0nyM said:

Unfortunately, I cannot set a time zone in the BIOS. Do you know if I can set in Unraid that the time with time zone is passed to the BIOS?

BIOS usually haven't timezone concept, Unraid will update BIOS time in UTC+0.

 

2 hours ago, 4n0nyM said:

There is also the completely correct time displayed.

Then why need concern the time in BIOS.

Link to comment
16 minutes ago, Vr2Io said:

Then why need concern the time in BIOS.

The maintenance mode does not change anything. Started that, went into BIOS, changed the time, started Unraid and then the time in BIOS is turned back 2 hours.

 

In the BIOS I set the RTC alarm by OS because I would like the computer to turn off overnight and turn on in the morning. To save power.
So I installed the Dynamix S3 Sleep plugin and set it there to shut down at night and use a script in the "Custom commands before sleep:" field to start the computer back up.
Most of all I would like Unraid to set the time in the BIOS exactly as it is displayed in Unraid. Then I wouldn't have to worry about the time change.
Although, by the way, I haven't managed to get the PC to restart automatically in the morning either. In the evening, however, the computer at least shuts down reliably.
Maybe I must not select "Shutdown" in the plugin, but must take "Sleep".

 

23 minutes ago, Vr2Io said:

BIOS usually haven't timezone concept, Unraid will update BIOS time in UTC+0.

Do you know if I can set Unraid to pass the time zone set in Unraid to the BIOS and not UTC+0?

Link to comment
30 minutes ago, 4n0nyM said:

Do you know if I can set Unraid to pass the time zone set in Unraid to the BIOS and not UTC+0?

Can't, as mention BIOS usually haven't timezone concept, so you need adjust the actual RTC wakeup time.

 

30 minutes ago, 4n0nyM said:

In the BIOS I set the RTC alarm by OS because I would like the computer to turn off overnight and turn on in the morning. To save power.
So I installed the Dynamix S3 Sleep plugin and set it there to shut down at night and use a script in the "Custom commands before sleep:" field to start the computer back up.

Understand, I think you would power off several hours, i.e. > 8hrs, then this may result shift 1 or 2 hrs as your expectation, so you need shoot why have such different or just try and error to adjust the wakeup time in RTC.

 

What is the output of "hwclock -r" ?

Edited by Vr2Io
Link to comment
2 minutes ago, Vr2Io said:

Understand, I think you would power off several hours, i.e. > 8hrs, then this may result shift 1 or 2 hrs as your expectation, so you need shoot why have such different or just try and error to adjust the wakeup time in RTC.

I would have to test whether the time shifts during the switch-off. Yesterday I had set in the sleep settings that the computer should start at 04:00. I had then expected that if for the BIOS is 04:00 clock, that the actual time is then just 06:00 clock.
But unfortunately it did not work. The computer remained off.
Then I leave the settings for tomorrow and if the computer does not start again, I go first to the BIOS and check the time. After that I start Unraid.

Link to comment
14 minutes ago, mgutt said:

You enabled RTC in the BIOS.

662841416_FullSizeRender(2).thumb.jpg.72f399e8efff4f823efb539fd8e501ae.jpg

 

19 minutes ago, mgutt said:

But did you disable ErP/EuP?

Yes, it was by default

760085206_FullSizeRender(1).thumb.jpg.43385ffb44af9fff58d81b04fcd8d600.jpg

 

20 minutes ago, mgutt said:

Is the ethernet port active if the server is shutdown?

I am not sure. Onboard LAN Controller is enabled.

LAN Option ROM and Network stack are disabled. Should I enable one of them or both?

FullSizeRender.thumb.jpg.7a47753dd26797824c2a4164432cd2d5.jpg

Link to comment
9 hours ago, mgutt said:

Check the LEDs ;)

Sometimes it can be that simple.
There is no LED on, so it seems that the ethernet port is off after shutdown. I can't find any other lit LED either.
Other settings like on the pictures above I can't find regarding the LAN.

 

In any case, after the shutdown overnight, the time has not shifted. Before I started Unraid, I first went into the BIOS and there the time is still shifted back by exactly two hours.

Link to comment

I have now selected "Wake Up Event By BIOS" in the BIOS and set an alarm there. Then started Unraid and shut down via the surface. I have adapted the alarm to the shifted BIOS time and set it to 5 minutes.
The PC then booted after 5 minutes.
The problem is only that I have so twice a year in the BIOS to adjust the RTC alarm to the time change. But the NAS should actually be right next to the router. But there I have no monitor, etc.
Do you have any idea why "Wake Up Event By BIOS" works and "by OS" does not?

In the sleep settings, I added the following script under "Custom commands before sleep:":

# #####################################
# ######### Settings ##################
# #####################################

times=(
  03:00
)

# #####################################
# ######### Script ####################
# #####################################

# sort times
readarray -t times < <(for a in "${times[@]}"; do echo "$a"; done | sort)

# delete wakealarm
echo 0 > /sys/class/rtc/rtc0/wakealarm

# loop through times
for time in "${times[@]}"; do

  now=$(date +%s)
  fut=$(date -d $time +%s)

  if [[ now -ge fut ]]; then
    fut=''
    continue
  fi

  # set wakealarm
  echo $fut > /sys/class/rtc/rtc0/wakealarm
  logger -t wakealarm "set wakealarm to "$(date -d "@$fut")

done

# set wakealarm for the next day
if [[ -z $fut ]]; then
  fut=$(date -d "tomorrow ${times[0]}" +%s)
  echo $fut > /sys/class/rtc/rtc0/wakealarm
  logger -t wakealarm "set wakealarm to "$(date -d "@$fut")
fi

(https://forums.unraid.net/topic/47160-how-to-automatically-wake-from-sleep/?do=findComment&comment=1030273)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...