Laptop with Intel Core Ultra 7 155U freezes with GPU enabled

Hello,

it is my first post and I will try to make it as good as possible.

I have a new HP Campus Elite x360 830 G11 Laptop, on which I installed NixOS.
The laptop has a Intel Core Ultra 7 155U CPU with a internal GPU.
After the installation only the internal display works, no HDMI or USB-C Display.

I normally use my Laptop with a cheap USB-C-Dock, to connect it with the periphials (2 Displays…) at my 2 desks and inside my classrooms (as a teacher).

So I began to search on how I can make the Displays work.

Every time, I got the external Displays to run properly, it is only a matter of time (normally 30 to 120s) that the comlplete Laptop freezes, only a hard reset is possible to rework this. But the same happens again within the same time…
It does not matter wheather an external monitor is connected or not.
Sometimes I get logged out of Gnome first and if I try to relogin, the freeze happens.

AND nothing problematic (at least for me) is reported through journalctl or dmesg.

So after the Problem, the things I tried already with a few logs:

  1. Add i915 like the wiki mentioned:
  • part of my hardware.nix:
  boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod" ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.supportedFilesystems = [ "ntfs" "ext4" ];
  boot.kernelParams = [ 
    "i915.force_probe=7d45" 
    "i915.enable_psr=0" 
  ];
  1. Using a newer Kernel:
  • part of hardware.nix:
  boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod" ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.kernelPackages = pkgs.linuxPackages_latest;
  boot.supportedFilesystems = [ "ntfs" "ext4" ];
  1. Using newer Kernel with xe kernel module:
  • part of hardware.nix:
  boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod" ];
  boot.initrd.kernelModules = [ "xe"  ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.kernelPackages = pkgs.linuxPackages_latest;
  boot.kernelParams = [ "xe.force_probe=7d45" ];
  boot.supportedFilesystems = [ "ntfs" "ext4" ];

Thanks for your help.

Greetings
Minnten

Hello,

I have found a solution on my own in the arch wiki:

https://wiki.archlinux.org/title/Intel_graphics#Crash/freeze_on_low_power_Intel_CPUs

I had to enable all 3 options, now it runs quiet stable.