4n0nyM Posted September 28, 2021 Share Posted September 28, 2021 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. Quote Link to comment
itimpi Posted September 28, 2021 Share Posted September 28, 2021 I believe that Linux systems expect the BIOS time to be set to the UTC time with the Linux level handling the time zone which would explain the behaviour you are seeing? Quote Link to comment
4n0nyM Posted September 28, 2021 Author Share Posted September 28, 2021 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? Quote Link to comment
Vr2Io Posted September 28, 2021 Share Posted September 28, 2021 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. Quote Link to comment
4n0nyM Posted September 28, 2021 Author Share Posted September 28, 2021 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? Quote Link to comment
4n0nyM Posted September 28, 2021 Author Share Posted September 28, 2021 The problem is that where the PC is supposed to go, I don't have a monitor, mouse and keyboard. Therefore I can not take the RTC alarm by BIOS. Quote Link to comment
Vr2Io Posted September 28, 2021 Share Posted September 28, 2021 (edited) 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 September 28, 2021 by Vr2Io Quote Link to comment
4n0nyM Posted September 28, 2021 Author Share Posted September 28, 2021 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. Quote Link to comment
mgutt Posted September 28, 2021 Share Posted September 28, 2021 You enabled RTC in the BIOS. But did you disable ErP/EuP? Is the ethernet port active if the server is shutdown? Quote Link to comment
4n0nyM Posted September 28, 2021 Author Share Posted September 28, 2021 14 minutes ago, mgutt said: You enabled RTC in the BIOS. 19 minutes ago, mgutt said: But did you disable ErP/EuP? Yes, it was by default 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? Quote Link to comment
mgutt Posted September 28, 2021 Share Posted September 28, 2021 4 hours ago, 4n0nyM said: I am not sure Check the LEDs Quote Link to comment
4n0nyM Posted September 29, 2021 Author Share Posted September 29, 2021 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. Quote Link to comment
4n0nyM Posted September 29, 2021 Author Share Posted September 29, 2021 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) Quote Link to comment
Recommended Posts
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.