I installed NixOS on a new computer today and spent several hours trying to work out how to get the window manager to work. The graphics are integrated and the processor is i7-8700.
In the end what worked was to set
boot.kernelPackages = pkgs.linuxPackages_4_19;
boot.kernelParams = ["i195.alpha_support=1"];
services.xserver.videoDrivers = ["intel"];
then reboot.
I have no idea if this is something that can be upstreamed but there we go.
eadwu
February 5, 2019, 6:47pm
2
i195.alpha_support=1
→ i915.alpha_support=1
and it should be fine on 4.14 if I remember what I did correctly back then. i915.alpha_support=1
isn’t needed on 4.19 for i7-8700.
I mistyped that option in my actual config so perhaps the option is not actually needed. Upgrading the kernel packages definitely is though I think.
Just got that problem recently, I know this post is old but is one of the ones i followed.
To solve it, I have a intel.nix file with this config:
{ config, lib, pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
boot.kernelParams = [
"mem_sleep_default=deep"
"nvme.noacpi=1"
"i915.enable_psr=1"
];
#boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.18" (lib.mkDefault pkgs.linuxPackages_latest));
boot.kernelPackages = pkgs.linuxPackages_6_0; # this is to solve the blackscreen problem
hardware.opengl.enable = true;
environment.variables = {
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
};
hardware.opengl.extraPackages = with pkgs; [
vaapiIntel
libvdpau-va-gl
intel-media-driver
];
}
Also I added in hardware-configuration.nix:
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
boot.initrd.kernelModules = [ "i915" ];
And also i comented:
#services.xserver.videoDrivers = [ "intel" ];
Since then seems like xserver choose it by himself (with that unccommented didn’t work properly)