SOLVED PC / system doesn't stay shut down, auto switch on

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
Hello,

when I do shut down the TrueNAS Core host (either via TN gui or the button on the PC chassi) the TN Core will shut down.

A couple of seconds later the host will start itself.

This never happened in the past with this system.

I have not changed anything in the host's UEFI settings.

Setup after AC Power Loss: stay off

I have tried to disconnect everything but the USB thumb drive (system), HDDs, monitor cable, power cable - also no LAN cable attached.

The last change in TN CORE U6 was to install 2 plugins:

- gitea
- GitLab

Do you have any hints?
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Something in the BIOS
The OS (TN Core) Cannot turn on the server - it has to be BIOS or WOL or similar
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
Yes, this was also my first idea.

However: as I wrote I have not changed anything in the EFI prior to that new behaviour.

WoL - this is why I have tried to run the host without connected LAN cables, to no avail.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Check your power button. I've seen these fail open (where they no longer work to turn on the server), closed (where they result in immediate power-ons after shutdown), and intermittently open/closed (where there's a mix of both behaviors).
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
Thank you for your hints

I have removed the power cable for a couple of days.

After that the system will shut down and stay off properly - for now...
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
reminder for myself - issue happened again, need to investigate later
 
Joined
Jun 2, 2019
Messages
591
I have tried to disconnect everything but the USB thumb drive (system)
Consumer USB thumb drives are not recommended for a boot-pool.

Use proper media (SSD, HD, SATA DOM, etc.) or as a last resort an SSD in an external USB enclosure, preferably SLC or MLC flash.
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
"Check your power button. I've seen these fail open (where they no longer work to turn on the server), closed (where they result in immediate power-ons after shutdown), and intermittently open/closed (where there's a mix of both behaviors)."

I did have a look into the power button theory - however this is not plausible to me, since the system is shutting off in a controlled manner only if I use the GUI, shell or short press the power button.

Would the button be broken then I would expect TN to immediatly shut down after start up.

Is there any TrueNAS log file I could have a look into to check what is going on here?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
How about underneath your motherboard? It could be there's an intermittent short between the green power button lead and ground somewhere (which has the same effect as a power button push, which is an ACPI-commanded shutdown).
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
I have checked and could not detect such a shorting situation.

I am at a loss here.

I have event tried un-plugging the 1 SATA cable I have change recently to no effect (other then the pool is now degraded during that try :smile: )
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
Ok, so I physically removed the 2 pin connector of the power botton from the mainboard.

Jumpstart with a screwdriver, shutdown TN Core via console - still the issue of the restart after shutdown.

I have switch the power cord and the power socket wall connection.

I don't know where to look for the reason any longer.

Would installing MS Windows on a drive and remove everything else from the system be a way to go?

I am still not convinced that a BIOS / EFI option is outruled in this scenario.

I have tried all the ACPI relevant options to no avail.
 

Nightbored

Dabbler
Joined
Sep 16, 2021
Messages
11
I know you said you did not change in UEFI settings, but did you recently upgrade your nic by any chance?

I have had wake on lan enabled on my computer without issue, and when I upgraded to a 10Gb Asus pcie card my computer refused to stay shut down. Ultimately I had to disable the wake on lan feature all together.
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
@Nightbored

Thank you for your input.

I am running a 10 Gbit PCIe NIC via an adapter.

This was the next thing I wanted to look into by removing both physically from the mainboard.

However I have first tried to setup the mainboard's UEFI regarding WOL, ACPI, Intel Management, Network boot and also the Qlogic NICs own setup to no avail.
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
@Samuel Tai

I have tried to run a Win10 installation routine from USB > I have entered the repair options of Win10 (no Win10 install as such was done) > in repair options I have chosen "Shutdown" > the host stays shut down.

I am inclined to say that indeed something is happening here releated to TN Core...

What could that be?

I also tried to bruteforce shutting down the running TrueNAS by longpressing the power button.

The system stays shut down by doing so.

If this helps for analysis:

I have moved the system pool to the boot pool in my setup, which is 3 USB thumb drives.

Where are the logfiles of TrueNAS?

/var/log/ I could not find something useful
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
/var/log is where the logs are kept. The likeliest logs to look at are the console.log*. However, what's the output of sysctl hw.acpi.power_button_state?
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
I will try that.

It is definitely something about my TN Core setup.

I have started my test setup from another USB thumb drive.

A proper shutdown with this old setup will result in the desired functionality > the old TN Core setup let's the host stay off / stay shut down, no auto restart
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
@Samuel Tai

this sounds interesting:

In the past I was trying around with the sleep states - but not for this fresh install.

Also: how would this affect the TN Core shutdown via WebGui and console?

sysctl hw.acpi.power_button_state
hw.acpi.power_button_state: S5

sysctl hw.acpi

hw.acpi.cpu.cx_lowest: C8
hw.acpi.reset_video: 0
hw.acpi.handle_reboot: 1
hw.acpi.disable_on_reboot: 0
hw.acpi.verbose: 0
hw.acpi.s4bios: 0
hw.acpi.sleep_delay: 1
hw.acpi.suspend_state: S3
hw.acpi.standby_state: NONE
hw.acpi.lid_switch_state: NONE
hw.acpi.sleep_button_state: S3
hw.acpi.power_button_state: S5
hw.acpi.supported_sleep_state: S3 S4 S5
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
plain and simple "poweroff" has the same issue with the current TN Core setup - the system doesn't stay shutoff, it autorestarts
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
The ACPI settings in TrueNAS look correct. As you've ruled out the power button, the likeliest explanation is the bit in the BIOS that controls the behavior on power off has somehow been scrambled. Try resetting your BIOS settings to default, and then reconfiguring back to your preferred settings to rewrite that bit.
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
@Samuel Tai

Thank you for staying with me on this topic.

I can try the BIOS / EFI reset (unplug the battery would be the final solution)

However this is somewhat inconsistent with what I am experiencing with 3 different OSs and setups.

Why is it working 2 out of 3 times (Win10 install routine, TN Core old setup) on the very same PC, but not with the current latest TN Core setup of mine?
 
Top