System Locks Up Completely At Random

My laptop completely freezes sporadically. The display stops updating, keyboard and mouse do not do anything. The laptop gradually heats up and the fan speed ramps up to max and stays there for as long as it stays on.

I cannot switch to another TTY; the only thing I can do is toggle between the three keyboard backlight modes with the function key. In order to keep using the system, I have to hard power off by holding the power button for ten seconds.

Often, the freezes happen multiple times in a row.

Freezing appears to be only loosely correlated with resource usage and system load. It happens while editing documents, watching YouTube, running VMs, or playing Minecraft. It also seems to be heat related in some way, as it is more common on hot days (30+ degrees Celsius).

It also occurred on Fedora, so it is not NixOS specific, but it does not happen on Windows (booting from a USB SSD). The problem has occurred on two different NVMe internal SSDs.

EDIT: I think every system where it happens has used btrfs, so that could be related to the issue somehow.

It occurs with or without my mouse plugged in, with zstd btrfs compression on or off, on Wayland and Xorg.

My NixOS config: GitHub - mars-monkey/nix

My hardware: https://linux-hardware.org/?probe=ae203f3797

I am not very experienced at reading logs, but I did try journald and GNOME Logs, and I did not see anything.

While it does not appear to be nix related, I would very much appreciate any help.

Share them! journalctl --boot -1 immediately after you reboot after a freeze will give you the boot logs from the previous boot, you can then share them in a code block on this discourse (or a gist/pastebin if they’re too long).

dmesg is also always handy to have, though it likely won’t tell us too much about this freeze.

1 Like

Ok, I’ll upload it. Hopefully it freezes soon :wink:

Ok, the most recent time that my system rebooted was on a freeze, so here is my journalctl output.

Ok. It froze again. Here’s the log.

EDIT: Strangely enough, all the timestamps are from 2:30 PM local time, but the freeze happened at about 3:45. I’m not sure exactly what’s going on.

I tested my system on LTS kernels, and the issue is resolved on 5.15 and 6.1, so I think I will stay on 6.1 until it is fixed. If I have time, I might file a bug report about the kernel, but I’m not sure exactly how to go about that.

1 Like

Hyprland on Linux 6.6 works fine now as well.