Xserver fails to launch with nvidia 520

I’m using awesome as my window manager with sddm as the login manager.

I just upgraded to nixos 22.11 and the upgrade completed without errors, after i added nixpkgs.config.permittedInsecurePackages = [ "qtwebkit-5.212.0-alpha4" ]; to my configuration.nix.

However, when rebooting the system kind of logs in (i see the screen staying black but reacting to some kind of input in the background and the numlock on my keyboard is engaged for a short while) but after a few seconds i end up on the sddm screen. If i try to log in from there, the same thing happens e.g. there is something going on in the background (it doesn’t fail immediately) but eventually i’m thrown back to the sddm login screen.

To troubleshoot, i installed xserver.xinit as a system package and entered the tty of sddm:

Running awesome yields awesome: main:708: cannot open display (error 5).

Running startx awesome yields

auth: file /home/myusername/.serverauth.1996 does not exist
(...)
(EE)
       Fatal server error:
               (EE) no screens found(EE)
(...)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: ubalbe to connect to X server: Connection refused
xinit: server error

Does anyone know a possible solution to this? I don’t know why it isn’t working anymore after the upgrade to nixos 22.11. I noticed that systemd was upgraded to 251.7 and nvidia to 520, but i don’t know if that can cause such a problem.

1 Like

The nvidia 520 drivers appear to be the problem. I solved it by adding/uncommenting the following to my configuration.nix:

let
  unstable = import <nixos-unstable> {
    ### override für Nvidia unstable
    config.allowUnfreePredicate = pkg:
      builtins.elem (lib.getName pkg) [ "nvidia-x11" "nvidia-settings" ];
  };
in {
  nixpkgs.config.permittedInsecurePackages = [ "qtwebkit-5.212.0-alpha4" ];
  boot.kernelPackages = unstable.pkgs.linuxPackages_latest;

I thought that the problem with linux_latest and nvidia would be solved by nixos 22.11 but obviously they weren’t or rather nvidia 520 introduced an internal error. Building 22.11 works without the unstable overrides (22.05 doesn’t) but as mentioned the xserver doesn’t start.

The nvidia 525 from unstable solves this problem but this is just a stop gap.

1 Like