diff --git a/systems/x86_64-linux/drivebystation-nix/hardware/graphics/intel_i915.nix b/systems/x86_64-linux/drivebystation-nix/hardware/graphics/intel_i915.nix new file mode 100644 index 0000000..7db31fc --- /dev/null +++ b/systems/x86_64-linux/drivebystation-nix/hardware/graphics/intel_i915.nix @@ -0,0 +1,90 @@ +{ config, lib, pkgs, ... }: + +{ + ############################ + ## Display + Mesa Settings + ############################ + + # hardware.enableRedistributableFirmware = true; + + hardware.firmware = [ + pkgs.linux-firmware + # pkgs.firmwareLinuxNonfree + # pkgs.firmwareLinuxStrict + # pkgs.firmwareLinuxLatest + ]; + + # boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelParams = [ + "console=tty0" + # "efifb=off" + # "xe.force_probe=*" + "module_blacklist=nouveau,nvidia,nvidia_drm,nvidia_modeset,nvidia_uvm" + ]; + + # environment.variables.VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/intel_icd.x86_64.json"; + hardware.intel-gpu-tools.enable = true; + hardware.graphics = { + enable = true; + enable32Bit = true; + + extraPackages = with pkgs; [ + intel-media-driver # Intel VAAPI + vpl-gpu-rt # oneVPL runtime + intel-vaapi-driver # fallback + intel-compute-runtime # OpenCL/Level Zero + ]; + }; + + # Ensure Arc driver is available (usually auto-loaded) + boot.kernelModules = [ "i915" ]; + # Blacklist everything for nvidia + boot.blacklistedKernelModules = [ + "nouveau" + "nvidia" + "nvidia_drm" + "nvidia_modeset" + "nvidia_uvm" + "xe" + ]; + + environment.variables = { + KWIN_DRM_DEVICES = "/dev/dri/card0"; + }; + + + ############################ + ## LACT Settings for Overclocking + ############################ + + services.lact.enable = true; + + + + ############################ + ## X / Wayland GPU Drivers + ############################ + + # Enable modesetting driver for X11 (required for Intel Xe) + services.xserver.videoDrivers = [ + "modesetting" + #"intel" + ]; + + services.xserver.enable = true; + services.xserver.autorun = false; + services.xserver.displayManager.startx.enable = true; + + # Xorg configuration for Intel Arc Battlemage (xe driver) + # Based on: https://www.reddit.com/r/crtgaming/comments/1knom2t/guide_intel_arc_b580_arch_linux_xorg/ + # Intel Arc B-series at PCI 0000:03:00.0 + #services.xserver.deviceSection = '' + # Option "AccelMethod" "glamor" + # BusID "PCI:3:0:0" + #''; + + ############################ + ## User Access + ############################ + users.users.andreas.extraGroups = [ "video" "render" ]; +}