Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/nvidia: fix inverted assertion #51836

Merged
merged 1 commit into from Dec 11, 2018

Conversation

thefloweringash
Copy link
Member

Motivation for this change

I can't turn off wayland, because my video drivers demand that wayland is enabled, because they don't support wayland.

This will cause all gdm+nvidia users to have to add the following to their config. Is there a way we can avoid this? Though as I understand it, gdm+nvidia is unable to start sessions (at least I saw this on 18.09), so there probably aren't any users.

services.xserver.displayManager.gdm.wayland = false;
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@thefloweringash
Copy link
Member Author

Should also backport to 18.09.

@veprbl
Copy link
Member

veprbl commented Dec 11, 2018

The bug was introduced in 4ef8233

Copy link
Member

@vcunat vcunat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm amazed how long this has gone unnoticed.

vcunat added a commit that referenced this pull request Dec 11, 2018
@vcunat vcunat merged commit f233280 into NixOS:master Dec 11, 2018
vcunat added a commit that referenced this pull request Dec 11, 2018
@eadwu
Copy link
Member

eadwu commented Dec 11, 2018

If I interpret this correctly, if config.services.xserver.displayManager.gdm.wayland is false, the inverse would be true, so it would assume that I have wayland enabled when I don't judging by the message?

root in ~
➜ nixos-rebuild switch
building Nix...
building the system configuration...
error: while evaluating the attribute 'config.system.build.toplevel' at $HOME/Downloads/nixpkgs/nixos/modules/system/activation/top-level.nix:276:5:
while evaluating 'foldr' at $HOME/Downloads/nixpkgs/lib/lists.nix:39:20, called from $HOME/Downloads/nixpkgs/nixos/modules/system/activation/top-level.nix:140:12:
while evaluating 'fold'' at $HOME/Downloads/nixpkgs/lib/lists.nix:42:15, called from $HOME/Downloads/nixpkgs/lib/lists.nix:46:8:

Failed assertions:
- NVIDIA drivers don't support wayland

@vcunat
Copy link
Member

vcunat commented Dec 11, 2018

services.xserver.displayManager.gdm.wayland = true is the default, according to man configuration.nix.

@eadwu
Copy link
Member

eadwu commented Dec 11, 2018

The problem is I haven't touched any configuration regarding gdm (grep -nr gdm .) and currently running on X11 so I'm guessing the assertion should also check if gdm.enable = true?

Currently using lightdm as my display manager.

@vcunat vcunat self-assigned this Dec 11, 2018
@vcunat
Copy link
Member

vcunat commented Dec 11, 2018

Oh, right, I didn't realize... that you haven't enabled gdm. I'll fix it straight away.

vcunat added a commit that referenced this pull request Dec 11, 2018
vcunat added a commit that referenced this pull request Dec 11, 2018
@eadwu
Copy link
Member

eadwu commented Dec 12, 2018

Can verify that the assertion works for me based off the current master, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants