I'm trying to install NixOS on a new Thinkpad P15 Gen 2, and I can't get the desktop environment to show anything on my screen. Anytime I turn it on or reboot, the screen stays black until I ctrl+alt+F4 to get into a shell. I'm trying to use KDE Plasma 5, but I'm willing to try other DEs if they might work better. I used an installer ISO with KDE on it and it was able to show the graphical displays and everything. Then after installing on my partition, I can't get a graphical display going.
Here is my configuration.nix (current channel is nixos/21.11):
{ config, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ]; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.kernelPackages = pkgs.linuxPackages_5_16; networking.hostName = "fins-thinkpad"; # Define your hostname. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. # Nvidia drivers unfree nixpkgs.config.allowUnfree = true; # Enable the X11 windowing system. services.xserver.enable = true; # Enable the Plasma 5 Desktop Environment. services.xserver.displayManager.sddm.enable = true; services.xserver.desktopManager.plasma5.enable = true; services.xserver.videoDrivers = [ "nvidia" ]; hardware.opengl.enable = true; users.users.finley = { isNormalUser = true; extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. }; environment.systemPackages = with pkgs; [ vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget firefox ]; system.stateVersion = "22.05"; # Did you read the comment? } And my hardware-configuration.nix:
{ config, lib, pkgs, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = { device = "/dev/disk/by-uuid/7e6bcba1-25e7-43f5-8dd2-1458d863c0c4"; fsType = "ext4"; }; fileSystems."/boot" = { device = "/dev/disk/by-uuid/19A7-C717"; fsType = "vfat"; }; swapDevices = [ { device = "/dev/disk/by-uuid/14412169-fb90-4e0c-ae3f-735c817b8cf3"; } ]; # The global useDHCP flag is deprecated, therefore explicitly set to false here. # Per-interface useDHCP will be mandatory in the future, so this generated config # replicates the default behaviour. networking.useDHCP = lib.mkDefault false; networking.interfaces.enp11s0.useDHCP = lib.mkDefault true; networking.interfaces.wlp9s0.useDHCP = lib.mkDefault true; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; # high-resolution display hardware.video.hidpi.enable = lib.mkDefault true; } And the logs from display-manager are on this pastebin raw link: https://pastebin.com/raw/YycVPVVd
And here is the output of lspci -k | grep -A3 'VGA':
00:02.0 VGA compatible controller: Intel Corporation Device 9a70 (rev 01) Subsystem: Lenovo Device 22d8 Kernel driver in use: i915 Kernel modules: i915 -- 01:00.0 VGA compatible controller: NVIDIA Corporation Device 24b7 (rev a1) Subsystem: Lenovo Device 22d8 Kernel driver in use: nvidia Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia Happy to post anymore logs or files if necessary and willing to try anything to get this working! Thank you in advance for any help!