back home

Fixing Random Hard System Freezes on Linux (Intel Tiger Lake + WD NVMe)

Investigating unpredictable hard lockups on 11th Gen Intel laptops with WD NVMe SSDs, tracing the issue to i915 PSR and NVMe APST power states, and applying a permanent fix.

If you run Linux on a modern laptop powered by an 11th Gen Intel (Tiger Lake) CPU and a Western Digital or SanDisk NVMe SSD, you might have run into a really frustrating issue: out of nowhere, your screen flickers for a split second, and a few seconds later, the entire system completely freezes.

Keyboard shortcuts like SysRq don't respond, audio cuts off, input freezes, and holding down the power button is the only way out. To make matters worse, when you reboot and check journalctl -b -1 to see what went wrong, there's nothing there. The logs just cut off abruptly right before the system died.

Here is a breakdown of how I investigated this hard-lockup behavior, what was actually causing it under the hood, and how to fix it permanently.

The Mystery of the Missing Logs

Usually when a Linux kernel panics or encounters a driver crash, it dumps a stack trace into dmesg and writes it to disk via journalctl. When a system freezes with zero logs left behind, it almost always points to a hardware bus lockup.

In this specific case, two separate power-saving features were failing simultaneously:

+-----------------------------------------------------------------------+
|                         DUAL POWER-STATE FAILURE                      |
+-----------------------------------------------------------------------+
| 1. Intel i915 Panel Self Refresh (PSR)                                |
|    -> Display link attempts idle power-down transition.               |
|    -> Wake-up sync fails -> Screen flickers -> GPU engine stalls.    |
+-----------------------------------------------------------------------+
| 2. WD NVMe APST (Autonomous Power State Transitions)                  |
|    -> SSD enters deep low-power sleep state (PS3/PS4).                |
|    -> PCIe bus wake request times out -> Storage drive drops.         |
+-----------------------------------------------------------------------+
| RESULT: Instant hard freeze. NVMe drive drops off PCIe bus before     |
|         the kernel can write crash logs to disk.                      |
+-----------------------------------------------------------------------+

Because the NVMe storage drive disconnected from the PCIe bus at the exact same time the display pipeline stalled, the kernel had no way to write its crash log or ring buffer to the filesystem.

What Was Actually Happening

1. Intel i915 Panel Self Refresh (PSR)

On Intel Gen 12 graphics (Iris Xe / Tiger Lake), the i915 DRM driver enables Panel Self Refresh (PSR) to save battery. When the screen image is static, the GPU powers down the main video link and lets the laptop display panel refresh itself using its internal hardware buffer.

When you move your mouse or press a key, the GPU attempts to wake the link up. On Tiger Lake hardware, timing desynchronization during this wake-up phase causes a visible screen flicker, followed by a display engine hang.

2. NVMe Autonomous Power State Transitions (APST)

Western Digital and SanDisk DRAM-less NVMe SSDs (like the SN5000S, SN550, or SN750 SE series) aggressively switch to deep sleep states (PS3/PS4) managed by Linux's APST feature.

When the drive enters deep sleep, it sometimes fails to respond to PCIe wake requests within the expected latency threshold. The PCIe bus drops the controller, rendering the filesystem unreadable.

The Fix: Kernel Power Tuning

To solve both issues permanently, we can instruct the Linux kernel to bypass these aggressive low-power transitions:

  1. nvme_core.default_ps_max_latency_us=0 — Keeps the NVMe drive from entering deep sleep states.
  2. i915.enable_psr=0 — Disables Intel GPU Panel Self Refresh.

Updating GRUB

Open /etc/default/grub in your editor with root privileges:

sudo nano /etc/default/grub

Find the GRUB_CMDLINE_LINUX_DEFAULT entry and add both kernel parameters:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvme_core.default_ps_max_latency_us=0 i915.enable_psr=0"

Save the file, update GRUB, and reboot your machine:

sudo update-grub
sudo reboot

Verifying the Fix

Once you reboot, you can verify that the new kernel parameters are active in your running session:

# Check running kernel command line
cat /proc/cmdline

# Verify NVMe APST latency (should return 0)
cat /sys/module/nvme_core/parameters/default_ps_max_latency_us

# Verify Intel PSR state (should return 0)
sudo cat /sys/module/i915/parameters/enable_psr

Startup Screen Artifacts

If you also notice weird static patterns or noise on screen for a split second right when logging in, that is a separate, harmless cosmetic glitch.

It happens during the compositor hand-off (Cinnamon/Muffin or Xwayland) when VRAM is allocated before being cleared. As soon as you open or click any app, a damage repaint event fires and clears the buffer immediately.

Conclusion

Power-saving features like APST and PSR sound great on paper, but firmware implementation differences can cause severe instability under Linux. By tuning these two parameters in GRUB, you eliminate the hardware bus drops completely—leaving you with a stable, rock-solid system without random freezes.