Hi everyone,
After weeks of investigation, I finally solved a very frustrating issue and wanted to share it here to save others the pain.
The problem
My TrueNAS Community Edition server was freezing completely and randomly during the night. No error logs, no warning, just a total freeze requiring a hard reboot. It only happened when the machine was idle for a long period.
My hardware
-
CPU: Intel i7-8700K
-
TrueNAS Community Edition 25.10.3
-
Kernel: 6.12.33-production+truenas
What I tried first (and why it didn’t work)
I set the C-states to C0 in the BIOS, thinking that would prevent the CPU from entering deep sleep states. The freezes continued. After more investigation, I realized the Linux kernel manages C-states independently via the intel_idle driver — it can completely ignore what the BIOS says.
The actual fix
The correct solution is to limit C-states at the kernel level. The key is to use a drop-in GRUB config file so the setting survives TrueNAS updates:
bash
sudo nano /etc/default/grub.d/truenas.cfg
Add this line:
GRUB_CMDLINE_LINUX="intel_idle.max_cstate=1 processor.max_cstate=1"
Then apply:
bash
sudo update-grub
Reboot and verify:
bash
cat /proc/cmdline
# should show intel_idle.max_cstate=1 processor.max_cstate=1
cat /sys/module/intel_idle/parameters/max_cstate
# should return 1
Why max_cstate=1 and not 0?
C1 is a very light sleep state with near-instant wake — it’s safe and saves a little power. C6/C7/C8 are the deep states that cause the freeze on this CPU generation. Setting max_cstate=1 blocks all the problematic states while keeping a tiny bit of efficiency.
Important note
Using /etc/default/grub.d/truenas.cfg instead of editing /etc/default/grub directly is intentional — TrueNAS may overwrite the main grub file during updates, but the grub.d/ drop-in folder survives. This has been confirmed through several updates including the upgrade to 25.10.3.
Feature request / bug report
It would be great if TrueNAS CE could either warn users about this known issue with certain Intel CPU generations, or better yet, provide a setting in the UI to limit C-states without requiring manual GRUB editing. Many users will never find this fix because searching for “TrueNAS freeze” or “TrueNAS crash at night” returns hundreds of unrelated results.
Hope this helps someone!