Intel 12th-gen iGPU freezes

I’m experience what a lot of 12th-gen Intel users see on a number of distros: Semi-Periodic or complete freezes of NixOS. Mine occur about every minute for 2-4 seconds. It’s a known problem with the kernel drivers (maintened by intel) for their 12th-gen iGPU laptop CPUs.

The tell-tale sign is something like this in the output of sudo dmesg -w right after a hang occurs:


[  659.921831] Asynchronous wait on fence 0000:00:02.0:X[2089]:57674 timed out (hint:intel_atomic_commit_ready [i915])
[  662.681008] i915 0000:00:02.0: [drm] GPU HANG: ecode 12:0:00000000
[  662.681209] i915 0000:00:02.0: [drm] Resetting chip for stopped heartbeat on rcs0
[  662.783962] i915 0000:00:02.0: [drm] GuC firmware i915/adlp_guc_70.1.1.bin version 70.1
[  662.783973] i915 0000:00:02.0: [drm] HuC firmware i915/tgl_huc_7.9.3.bin version 7.9
[  662.800377] i915 0000:00:02.0: [drm] HuC authenticated
[  662.801187] i915 0000:00:02.0: [drm] GuC submission enabled
[  662.801192] i915 0000:00:02.0: [drm] GuC SLPC enabled

My question now is two-fold:

  1. Is this already known for NixOS and should I open an Issue so in can be tracked?
  2. Is there a known work-around specific for NixOS, that I could use in the mean-time?

The place to look for hardware-specific stuff is GitHub - NixOS/nixos-hardware: A collection of NixOS modules covering hardware quirks.

I don’t see anything about alder lake, neither in the CPU nor GPU definitions, so I’m guessing that if this is known nobody has a fix yet.

I’d also guess that this is a case of “wait for newer kernels that resolve it”. You can try setting boot.kernelPackages to pkgs.linuxPackages_latest and see if that resolves the issue.

If it does, you can go sleuthing into which kernel specifically fixed it, and then create a setting for it in nixos-hardware, so that people with alder lake hardware have easy access to it.

Ah, heh, just noticed you linked to the framework forums. Guess it’s a framework-specific bug, there are definitions for the 12th gen framework laptop: https://github.com/NixOS/nixos-hardware/blob/a0df6cd6e199df4a78c833c273781ea92fa62cfb/framework/12th-gen-intel/default.nix

Thanks, I’ll try it. It’s not framework-specific, though. E.g. the newer Lenovo Carbon X1 have, too. Same goes for a couple of other alder lake laptops.

In case anyone is like me and arrived here through Google/forum search, I managed to get things working by setting the video driver to modesetting and flipping enable_psr to 1:

services.xserver.videoDrivers = [ "modesetting" ];
# NixOS docs suggest this.
services.xserver.useGlamor = true;

boot.kernelParams = [
    "i915.enable_psr=1"
];

Without that kernel parameter, Xorg would load but would freeze and stutter for a few seconds periodically - it was basically unusable.

Unfortunately it doesn’t seem like the modesetting driver supports TearFree like the old Intel one. Given that most of Qt applications I tried were broken on the Intel driver I think this is currently the only choice for the 12th Gen Framework.

3 Likes

Can confirm that that is a functioning workaround. useGlamor is deprecated on recent versions of NixOS and doesn’t seem to be necessary.