NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.06k stars 14.11k forks source link

xorg: black screen on boot with sddm (with xorg 1.20.11) #119822

Closed mjlbach closed 3 years ago

mjlbach commented 3 years ago

Describe the bug After updating to the latest nixos-unstable SDDM no longer shows the login screen, and instead only a black screen with a single underscore _. When I try to login via tty (F1-4), it immediately returns authentication failed after entering my username (3 times) so I can't enter my password to try to manually start the X serer/see what's wrong.

This is due to c7fba6a4726c2e81abac9867bb7368b9c28a1f20, bumping xorg from 1.20.10 -> 1.20.11

Here's my journalctl log: https://paste.sr.ht/~mjlbach/682ccf18bfe4c7704cf49e508b86ab393844c7e8

To Reproduce Steps to reproduce the behavior: My system configuration (and flake) is here https://github.com/mjlbach/nix-dotfiles/blob/master/nixos/configuration.nix

I've tried changing the kernel version (Tried 5_11, 5_10, and 5_9), as well as removing any custom overrides to the X server settings (like disabling flipping).

Disabling hardware.opengl.setLdLibraryPath = true shows SDDM again, but it hangs on login.

Expected behavior SDDM returns the login screen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

Notify maintainers @NixOS/qt-kde

Metadata https://github.com/mjlbach/nix-dotfiles/blob/master/nixos/flake.lock (I'm using nixos-unstable though locally)

TredwellGit commented 3 years ago

Test d7f66d47c7d7674ebb64fbfe11f79a406524d4ff and d7f66d47c7d7674ebb64fbfe11f79a406524d4ff~.

What is hardware.opengl.setLdLibraryPath = true for? https://github.com/mjlbach/nix-dotfiles/blob/16cdd3510fb6e5e8a55bda4df1839de51a8e7cc2/nixos/configuration.nix#L130

Supposedly hardware.nvidia.modesetting.enable = true is not supported by Nvidia. https://github.com/mjlbach/nix-dotfiles/blob/16cdd3510fb6e5e8a55bda4df1839de51a8e7cc2/nixos/configuration.nix#L122

mjlbach commented 3 years ago

Supposedly hardware.nvidia.modesetting.enable = true is not supported by Nvidia.

What do you mean? I use modesetting on Fedora with no issues, and I've had modesetting enabled in nix as long as I can remember.

What is hardware.opengl.setLdLibraryPath = true for?

This is for GPU compute which needs to find the nvidia drivers in LD_LIBRARY_PATH in nix shell (I'm aware there are other options, but it's a documented/supported option so it should not cause issues like this). Disabling this actually does start SDDM, but plasma still fails to start (SDDM is frozen). This seems like a regression then.

No change with d7f66d47c7d7674ebb64fbfe11f79a406524d4ff (The second rev you posted looks to be a typo, as it's 65 characters with the first 64 being identical to the first rev)

TredwellGit commented 3 years ago

https://github.com/NixOS/nixpkgs/blob/b2f2d04f01b3de3abad0dd9bc48ad7a3ee32bbc6/nixos/modules/hardware/video/nvidia.nix#L56-L65

Not a typo: https://git-scm.com/docs/gitrevisions#Documentation/gitrevisions.txt-emltrevgtltngtemegemHEADmaster3em

mjlbach commented 3 years ago

This is not enabled by default because it is not officially supported by NVIDIA.

Yes, it's worked fine up until c7fba6a so it's a regression.

Not a typo

c7fba6a4726c2e81abac9867bb7368b9c28a1f20 is the parent of d7f66d47c7d7674ebb64fbfe11f79a406524d4ff, which I already tested as noted in my original issue (the parent of which is 17efdfbbcafad4d63fb692ac7629064669054df6 which works as expected). The regression is due to the xorg bump in c7fba6a4726c2e81abac9867bb7368b9c28a1f20.

srhb commented 3 years ago

I had almost the same symptoms on my system with the black screen -- though I haven't had issues logging in from another TTY (which I assume is another, separate issue on your system)

From my display-manager log:

display-manager[2498]: Could not find provider with name modesetting

Disabling hardware.nvidia.modesetting.enable worked here. Not sure whether it's entirely related, but the timing and symptoms sure do seem to agree.

vcunat commented 3 years ago

I don't know... by any chance, this patch doesn't help? https://gitlab.freedesktop.org/xorg/xserver/-/commit/23a53f0d5460eb45f05b0b370dfcec712652598c

mjlbach commented 3 years ago

I can't reproduce this anymore after updating nixpkgs, so I'm closing :)