foureighty - use dri2 as dri3 causes tearing

This commit is contained in:
Cyryl Płotnicki 2022-12-05 15:00:54 +00:00
parent a5f2a4ada2
commit 6478b5d6b9
3 changed files with 29 additions and 1 deletions

View file

@ -5,6 +5,7 @@
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
./hardware-configuration.nix
./thermal.nix
../../gfx-intel-dri2.nix
../../backups.nix
../../boot.nix
../../distributed-builds.nix

27
nixos/gfx-intel-dri2.nix Normal file
View file

@ -0,0 +1,27 @@
{ config, pkgs, ... }: {
services.xserver = {
videoDrivers = [ "intel" ];
deviceSection = ''
Option "DRI" "2"
Option "TearFree" "true"
'';
};
hardware.opengl = {
enable = true;
driSupport = true;
extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-media-driver
];
};
nixpkgs.config = {
packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
};
}

View file

@ -1,5 +1,5 @@
{ config, pkgs, ... }: {
services.xserver.videoDrivers = [ "intel" ];
services.xserver = { videoDrivers = [ "modesetting" ]; };
hardware.opengl = {
enable = true;