Skip to content

Commit

Permalink
fix: screen flickering (disable PSR/-SU)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swarsel committed Dec 26, 2024
1 parent fbb8e23 commit ea6f9e9
Showing 1 changed file with 10 additions and 55 deletions.
65 changes: 10 additions & 55 deletions hosts/nixos/nbl-imba-2/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }:

{
Expand All @@ -12,65 +9,23 @@
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "cryptd" "usbhid" "sd_mod" "r8152" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];

# Fix screen flickering issue at the cost of battery life (disable PSR and PSR-SU, keep PR enabled)
# TODO: figure out if this is worth it
# test PSR/PR state with 'sudo grep '' /sys/kernel/debug/dri/0000*/eDP-2/*_capability'
# ref:
# https://old.reddit.com/r/framework/comments/1goh7hc/anyone_else_get_this_screen_flickering_issue/
# https://www.reddit.com/r/NixOS/comments/1hjruq1/graphics_corruption_on_kernel_6125_and_up/
# https://gitlab.freedesktop.org/drm/amd/-/issues/3797
boot.kernelParams = [ "amdgpu.dcdebugmask=0x410" ];

boot.extraModulePackages = [ ];
boot.initrd.luks.devices."cryptroot" = {
# improve performance on ssds
bypassWorkqueues = true;
preLVM = true;
};

# fileSystems."/" =
# {
# device = "/dev/disk/by-uuid/3554892c-9d0b-49b2-b74a-8b5ef45569f7";
# fsType = "btrfs";
# options = [ "subvol=root" ];
# };

# boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/98b9bf76-ca01-49f5-91ee-1884ae9ce383";

# fileSystems."/boot" =
# {
# device = "/dev/disk/by-uuid/5236-F44A";
# fsType = "vfat";
# };

# fileSystems."/home" =
# {
# device = "/dev/disk/by-uuid/3554892c-9d0b-49b2-b74a-8b5ef45569f7";
# fsType = "btrfs";
# options = [ "subvol=home" ];
# };

# fileSystems."/nix" =
# {
# device = "/dev/disk/by-uuid/3554892c-9d0b-49b2-b74a-8b5ef45569f7";
# fsType = "btrfs";
# options = [ "subvol=nix" ];
# };

# fileSystems."/persist" =
# {
# device = "/dev/disk/by-uuid/3554892c-9d0b-49b2-b74a-8b5ef45569f7";
# fsType = "btrfs";
# options = [ "subvol=persist" ];
# };

# fileSystems."/swap" =
# {
# device = "/dev/disk/by-uuid/3554892c-9d0b-49b2-b74a-8b5ef45569f7";
# fsType = "btrfs";
# options = [ "subvol=swap" ];
# };

# fileSystems."/var/log" =
# {
# device = "/dev/disk/by-uuid/3554892c-9d0b-49b2-b74a-8b5ef45569f7";
# fsType = "btrfs";
# options = [ "subvol=log" ];
# };

# swapDevices = [ ];

# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
Expand Down

0 comments on commit ea6f9e9

Please sign in to comment.