Skip to content

Commit

Permalink
16ach6h: Fix X11 setup
Browse files Browse the repository at this point in the history
Fixes NixOS#628
  • Loading branch information
4JX committed Jan 19, 2024
1 parent d5b435e commit f7d5dc9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lenovo/legion/16ach6h/hybrid/default.nix
Expand Up @@ -14,6 +14,15 @@
hardware = {
amdgpu.loadInInitrd = lib.mkDefault false;

# Still needs to load at some point if we want X11 to work
boot.kernelModules = [ "amdgpu" ];

# Modesetting just doesn't work (on X11?), so get rid of it by only explicitly declaring nvidia
# Needed due to https://github.com/NixOS/nixos-hardware/commit/630a8e3e4eea61d35524699f2f59dbc64886357d
# See also https://github.com/NixOS/nixos-hardware/issues/628
# options.services.xserver.drivers will have a amdgpu entry from using the prime stuff in nixpkgs
services.xserver.videoDrivers = [ "nvidia" ];

nvidia = {
modesetting.enable = lib.mkDefault true;
powerManagement.enable = lib.mkDefault true;
Expand All @@ -24,4 +33,4 @@
};
};
};
}
}

0 comments on commit f7d5dc9

Please sign in to comment.