mirror of
				https://github.com/NixOS/nixos-hardware.git
				synced 2025-11-04 17:27:14 +08:00 
			
		
		
		
	Lenovo Legion 16achg6: Fix gpu configuration to work with both x11/wayland (#802)
Co-authored-by: Alojzy Leszcz <aleszcz@pm.me>
This commit is contained in:
		@@ -1,4 +1,6 @@
 | 
			
		||||
I personally use my laptop with an external display attached. In `hybrid` config it works nice only with Wayland, while X11 can't detect the external monitor. Everything works as expected in `nvidia` mode, but battery life is reduced then.
 | 
			
		||||
I personally use my laptop with an external display attached and haven't observed any issues so far.
 | 
			
		||||
 | 
			
		||||
From my experience, it's better to use gdm, as sddm seems to have a problem detecting the external monitor (more details available [here](https://github.com/sddm/sddm/issues/1558)). Of course it's not a blocker, as it is still possible to log in using sddm. I personally find it annoying that my main display remains idle.
 | 
			
		||||
 | 
			
		||||
## Setup at the time of testing
 | 
			
		||||
```
 | 
			
		||||
 
 | 
			
		||||
@@ -10,12 +10,14 @@
 | 
			
		||||
    ../../../../common/pc/laptop/ssd
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  services.xserver.videoDrivers = [ "nvidia" "amdgpu" ];
 | 
			
		||||
  services.xserver.videoDrivers = [ "nvidia" ];
 | 
			
		||||
  boot.initrd.kernelModules = [ "amdgpu" ];
 | 
			
		||||
 | 
			
		||||
  hardware = {
 | 
			
		||||
    nvidia = {
 | 
			
		||||
      modesetting.enable = lib.mkDefault true;
 | 
			
		||||
      powerManagement.enable = lib.mkDefault true;
 | 
			
		||||
      open = lib.mkDefault false;
 | 
			
		||||
 | 
			
		||||
      prime = {
 | 
			
		||||
        amdgpuBusId = "PCI:5:0:0";
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user