Help with graphical issues after update on nixos-unstable

I’m not new to Linux and NixOS but I never faced graphical issues and this part of my system is completely unknown to me.

Before upgrading, I used:

  • Linux 5.10.52
  • Nvidia drivers with services.xserver.videoDrivers = [ "nvidia" ];
    Because I’m using Steam, I also set up this graphical-related options:
  • hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
  • hardware.pulseaudio.support32Bit = true;

After running nixos-rebuild switch --upgrade, Linux kernel version changed to 5.10.62 and nvidia drivers recompiled.
I noticed I couldn’t launch Alacritty (which is OpenGL-based) anymore, so I rebooted, assuming booting on new kernel would solve the issue.

But after boot I was stuck on a black screen. System was behaving normally and the X server seemed to run, as my shortcuts to launch Clementine and play some music worked, but the screen seemed off.
I blindly launched a terminal and captured dmesg output, but I don’t know what to do with it.

I rebooted on the previous system version, but I’m stucked on this version.

Do you have any thoughts?

What does it say?

Also, do you have a ~/.xsession-errors after this debacle? Does journalctl -ex --boot -<however many boots ago> give you any insights?

What window manager/DE are you using? Can you share your full system configuration?

Hi @tlater, thanks for the answer.
I use a slightly modified fork of dwm (I replace the dwm package in an overlay) with lightdm.
My dmesg output is here
I can’t find anything interesting there, looking for keywords “error”, “graphic” and “gl”.
Ha! with journalctl ... I found this: (full output here)

Sep 14 13:43:08 sona kernel: nvidia-modeset: ERROR: GPU:0: Display engine push buffer channel allocation failed: 0x65 (Call timed out [NV_ERR_TIMEOUT])
Sep 14 13:43:08 sona kernel: nvidia-modeset: ERROR: GPU:0: Failed to allocate display engine core DMA push buffer

Precision: The screen is turned on at boot time, stage 1 & 2, but stops when the graphics turns on. During shutdown, the screen stays black, and I can’t see systemd’s output.

I guess I should just ban Nvidia ^^

Oh, and my full system configuration is ~1000 LOC… Relevant parts are there:

  # Enable the X11 windowing system.
  services.xserver = {
    enable = true;
    enableCtrlAltBackspace = true;
    layout = "fr";
    # Enable touchpad support.
    libinput.enable = true;
    # use dwm
    windowManager.dwm.enable = true;
    # configure LightDM
    displayManager = {
      lightdm.enable = true;
      # autoLogin
      autoLogin.enable = true;
      autoLogin.user = "ao";
    # The dots per inch of my screen.
    dpi = 96;

  nixpkgs.config.allowUnfree = true;

  # Nvidia driver
  services.xserver.videoDrivers = [ "nvidia" ];

  # Steam related
  environment.systemPackages = [ pkgs.steam ];
  hardware.opengl.driSupport32Bit = true;
  hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
  hardware.pulseaudio.support32Bit = true;

Hm, interesting. Sounds like a driver bug to me, though KMS is technically not supported by nvidia aiui, so perhaps that isn’t considered a bug.

That said, maybe you can try explicitly disabling modesetting with hardware.nvidia.modesetting.enable?

I have no idea why modesetting is enabled in the first place, if that’s not present in your config. Graphics dropping out after stage 2 makes sense, since by default KMS is enabled after stage 2.

If you’d like to update and can’t resolve the issue, I’d suggest setting a newer or older nvidia package with hardware.nvidia.package, and perhaps checking some nvidia forums and release notes for notes around your GPU.

I know the feeling… Next time I’ll go AMD for sure, or perhaps Intel if they’ve caught their feet by then.

1 Like

Actually modesetting already seems disabled:

$ nixos-option hardware.nvidia.modesetting.enable

So maybe modesetting is not the issue, but another driver bug (I don’t know anything about drivers though)
I disabled Nvidia drivers, I’ll retry in a few weeks when I’ll have more time.
Thanks for the tips.