NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.02k stars 14.03k forks source link

Autologin broken with Plasma6 on Nvidia #295218

Open aidalgol opened 7 months ago

aidalgol commented 7 months ago

Describe the bug

Plasma 6 on my RTX 3080 system works, but only with autologin disabled. With it enabled, my system instead boots to a virtual console with a blinking cursor, without even failing back to the SDDM login screen.

Steps To Reproduce

Apply the following to the NixOS system configuration and reboot.

  hardware.opengl = {
    enable = true;
    driSupport32Bit = true;
  };
  hardware.nvidia = {
    modesetting.enable = true;
    nvidiaPersistenced = true;
    package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
    open = true;
  };

  services.xserver = {
    enable = true;
    videoDrivers = ["nvidia"];
    displayManager = {
      sddm.enable = true;
      autoLogin.user = "bob";
    };
    desktopManager.plasma6.enable = true;
    wacom.enable = true;
  };

Expected behavior

The system to boot into a Plasma 6 session for user "bob".

Screenshots

N/A

Additional context

N/A

Notify maintainers

@NixOS/qt-kde

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

❯ nix shell nixpkgs#nix-info -c nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.21, NixOS, 24.05 (Uakari), 24.05.20240309.3030f18`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/home/aidan/.nix-defexpr/channels/nixpkgs`

System NixOS flake nixpkgs input revision (from nix flake metadata):

Inputs:
└───nixpkgs: github:NixOS/nixpkgs/3030f185ba6a4bf4f18b87f345f104e6a6961f34

Add a :+1: reaction to issues you find important.

chermnyx commented 6 months ago

Try the following as a workaround:

boot.initrd.kernelModules = [
  "nvidia"
  "nvidia_modeset"
  "nvidia_uvm"
  "nvidia_drm"
];
aidalgol commented 6 months ago

That workaround works!

jarrodsfarrell commented 2 months ago

Weird. Having a similar issue but on a AMD integrated graphics laptop with a static text cursor on a black screen. Checking journalctl suggests my user logged in with its services starting. Though if I boot into target multi-user.target then isolate into graphical.target, it works correctly.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.43, NixOS, 24.11 (Vicuna), 24.11pre661606.d04953086551`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Auto-start configuration

{ config, pkgs, lib, ... }:
{
  services.displayManager.sddm.autoLogin = {
    enable = true;
    user = "jarrod";
  };
}

Graphical configuration:

# GPU Accelerated Computing
{ config, pkgs, ...}:

{

  hardware.graphics = {
    enable = true;
    enable32Bit = true;
    extraPackages = with pkgs; [
      rocmPackages.clr.icd
      amdvlk
    ];
    extraPackages32 = with pkgs; [
      driversi686Linux.amdvlk
    ];
  };

  hardware.amdgpu = {
    opencl.enable = true;
    initrd.enable = true;
  };

  systemd.tmpfiles.rules = [
    "L+    /opt/rocm/hip   -    -    -     -    ${pkgs.rocmPackages.clr}"
  ];
}