NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.28k stars 13.54k forks source link

display-manager race condition #171281

Closed vs49688 closed 3 weeks ago

vs49688 commented 2 years ago

Describe the bug

Sometimes display-manager fails to start at boot and drops to a tty. A systemctl restart display-manager fixes it, suggesting a race condition between initialisation of the X server and the graphics devices.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Boot machine
  2. Be unlucky
  3. Observe display-manager not starting

Expected behavior

display-manager (SDDM in my case) to start at boot.

Additional context

My system is a Dell XPS 9510, the graphics devices are:

00:02.0 VGA compatible controller: Intel Corporation TigerLake-H GT1 [UHD Graphics] (rev 01)
01:00.0 3D controller: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] (rev a1)

The relevant lines from my configuration:

  services.xserver.enable = true;
  services.xserver.layout = "us";

  services.xserver.libinput.enable = true;

  services.xserver.displayManager.sddm.enable = true;
  services.xserver.desktopManager.plasma5.enable = enablePlasma5;
  services.xserver.desktopManager.plasma5.runUsingSystemd = true;
  services.xserver.videoDrivers        = [ "modesetting" "nvidia" "displaylink" ];
  services.xserver.dpi                 = 192;

  hardware.nvidia.prime.offload.enable = true;
  hardware.nvidia.prime.nvidiaBusId    = "PCI:1:0:0";
  hardware.nvidia.prime.intelBusId     = "PCI:0:2:0";
  hardware.nvidia.powerManagement.enable = true;
  hardware.nvidia.powerManagement.finegrained = true;

Logs

Unsuccessful start: dmbad.txt

Successful start: dmgood.txt

Notify maintainers

Metadata

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

laMudri commented 2 years ago

I'm having similar issues on a Dell XPS 9510, but without any intermittency (it just always fails to start). Next time, I'll see whether systemctl restart display-manager (as root?) is a workaround. The last good nixpkgs commit I have is 5181d5945ed (15th April), and it has been bad since I updated to d89d7af1ba2 (12th May), including 48037fd90426e44e4bf03e6479e88a11453b9b66 (21st May).

ShamrockLee commented 2 years ago

The display manager on my laptop (with the NVIDIA driver) fails to start either. sudo systemctl restart display-manager doesn't work.

It happens after the nixos-21.11 update as well as nixos-22.05

$ sudo nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.111, NixOS, 21.11 (Porcupine)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.5.0pre20211206_d1aaa7e`
 - nixpkgs: `/nix/store/1awdrhda1fkpkfb2kvj22jisw9qw1k8p-source`
$ nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.111, NixOS, 21.11 (Porcupine)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.5.0pre20211206_d1aaa7e`
 - nixpkgs: `/nix/store/3g25cg20m43hvsy17d7nz0jxwk79a77w-source`
peterhoeg commented 2 years ago

What's in the journal?

SuperSandro2000 commented 3 weeks ago

See linked PR