PC shuts off during idle after random amount of time

Hey guys,

I have a problem that I’ve been banging my head on for several months now and, quite frankly, I’m out of ideas.
I’ll try to be brief, but it’s still going to be a wall of text …

The goal:
Build a power efficient home server for smb, docker and kvm.

The problem:
The machine shuts off randomly after hours / days of idleing (longest uptime I had was 6 days and change).

The hardware:

CPU:  Intel Core i5-14500 (BX8071514500)
MB:   ASUS Prime Z790M-Plus (90MB1E70-M0EAY0)
RAM:  Crucial Pro 96GB Kit (48GBx2) DDR5-5600 (CP2K48G56C46U5)
ETH:  Dell Intel X710-DA2 (05N7Y5)
SSD:  2x Western Digital WD_BLACK SN850X (WDS200T2X0E)
HDD:  4x Toshiba Cloud-Scale Capacity MG10ACA 20TB (MG10ACA20TE)
PSU1: Seasonic Platinum Series Fanless 400W (SS-400FL2)
PSU2: be quiet! Pure Power 12 M 550W (BN341)
UPS:  APC Back-UPS 2200VA, 6x C13, USB (BX2200MI)
PWR:  Shelly Plus Plug S Gen2 (flashed with Tasmota)

All parts were purchased new in March, except the X710 (used from eBay) and the Seasonic PSU (from previous build).

The SSDs are connected to M.2_2 and M.2_3, the X710 is connected to PCIEx16(G4), the HDDs are connected to onboard SATA. All devices are purposefully connected to the chipset ports in order to reduce power consumption.

The SSDs were formatted to 4Kn sectors, the X710 was crossflashed to retail Intel firmware.

Hardware overview: lspci, lsusb, lsscsi

UEFI settings:

  • enable XMP
  • disable Multicore Enhancement
  • enable Intel failsafe settings
  • enable all power saving features (C-states, PCIe ASPM, SATA APM)

Full UEFI settings here.

OS: Ubuntu 22.04 / 24.04

  • installed with zfs on /
  • docker installed, no containers running
  • kvm/qemu/libvirt installed, no VMs running

All commands run to install the system.

Troubleshooting steps and reasoning:

First thought: some sort of power issue

  • mybe Seasonic PSU is too old for low power states and crashes → bought be quiet PSU → system crashes even more frequently, in a matter of hours instead of days → swapped back to Seasonic PSU
  • diconnected from UPS and ran straight from wall power → same behaviour, random shutdown after varying amount of days
  • disconnected Shelly power meter → same bahaviour

Next idea: RAM

  • ran both memtest86+ and memtest86-free for at least 4 passes with XMP enabled → all tests passed → no change in behaviour
  • ran both tests again with XMP disabled (UEFI default settings) → same behaviour
  • enabled XMP, then manually adjusted only the clock down from 5600 to 4800 → ran both memtests again with no errors → same behaviour

Maybe it’s the network?

  • removed X710 → same behaviour

Ok, has to be a software issue:

  • checked the logs → couldn’t find anything. the system runs normally and then suddenly it’s just … gone. See for yourself
  • maybe I f***ed up installing the system, let’s wipe it and install 24.04 (which has been released by this point) → same behaviour
  • ok, my installation method is flawed, there’s a mistake somewhere → started a live USB 22.04 → same behaviour
  • live USB with 24.04 → same behaviour

If you have any more ideas of what I could try, hardware or software wise, I would very much appreciate it. If you need any more info, I will gladly provide anything.

Cheers,
~vladnik

So it soft shuts down and not like a hard system crash? A soft shutdown where OS has shutdown cleanly indicates something in software side - isn’t it?

If it was shutting down because of a hardware failure then - no shutdown will be recorded in journal logs. So I am leaning towards former.

I don’t think it’s a ‘normal shutdown’, or the system going to sleep / S3; that would be indicated in the logs by the appropriate messages, no? Instead, the logs just stop at a certain point, without indicating (to me) that anything did or should have happened.

Maybe it’s more clear if I include the next boot as well:

...
Oct 09 14:30:19 vzsrv01 systemd[1]: sanoid-prune.service: Deactivated successfully.
Oct 09 14:30:19 vzsrv01 systemd[1]: Finished sanoid-prune.service - Prune ZFS snapshots.
Oct 09 14:35:01 vzsrv01 CRON[246812]: pam_unix(cron:session): session opened for user root(uid=0) by roo>
Oct 09 14:35:01 vzsrv01 CRON[246814]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Oct 09 14:35:01 vzsrv01 CRON[246812]: pam_unix(cron:session): session closed for user root
-- Boot 5e5850a9c5ff4f7db3d2f335bb34583b --
Oct 09 21:19:49 vzsrv01 kernel: Linux version 6.8.0-45-generic (buildd@lcy02-amd64-115) (x86_64-linux-gn>
Oct 09 21:19:49 vzsrv01 kernel: Command line: root=zfs:rpool/ROOT/ubuntu init_on_alloc=0 spl.spl_hostid=>
Oct 09 21:19:49 vzsrv01 kernel: KERNEL supported cpus:
Oct 09 21:19:49 vzsrv01 kernel:   Intel GenuineIntel
Oct 09 21:19:49 vzsrv01 kernel:   AMD AuthenticAMD
Oct 09 21:19:49 vzsrv01 kernel:   Hygon HygonGenuine
Oct 09 21:19:49 vzsrv01 kernel:   Centaur CentaurHauls
Oct 09 21:19:49 vzsrv01 kernel:   zhaoxin   Shanghai  
Oct 09 21:19:49 vzsrv01 kernel: x86/tme: not enabled by BIOS
Oct 09 21:19:49 vzsrv01 kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks>
Oct 09 21:19:49 vzsrv01 kernel: BIOS-provided physical RAM map:
...

As you can see, the logs just stop at 14:35:01, no shutdown messages or anything.
The next boot starts at 21:19:49, when I turned the PC back on after I came home from work.

1 Like

I’m not sure it is the same issue I was having in the past as I was using an AMD CPU/mobo. I solved mine by changing the c-states in BIOS/UEFI it stopped it from just shutting down in Linux.

Interesting. Did you disable C-States completely, or only partially? I don’t want to disable C-States completely because power is expensive around where I live, and I want the machine to consume as little power as possible in idle.