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/gdm: enable nvidiaWayland by default #147153

Conversation

fabianhjr
Copy link
Member

@fabianhjr fabianhjr commented Nov 23, 2021

Motivation for this change

With the recent improvements on different libraries and drivers the wayland experience is way better than a year ago. WebGL, Steam, and many graphics things work great nowadays and this change would reflect that new level of polish. (GDK has also improved a lot, it used to be that changing the keyboard layout would not change the hotkey layout which was a bit confusing between qwerty and dvorak)

While this would allow wayland on nvidia by default, GDM includes a toggle between wayland and x11 and wayland/nvidiaWayland module options would still be configurable by end users.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@thiagokokada
Copy link
Contributor

Should this be backported to 21.11 🤔 ?

@fabianhjr
Copy link
Member Author

I don't think so, there might be some more polishing up to do so I would prefer this change to be only on unstable for the time being.

I have noticed some issues with electron for example but havent been able to diagnose that.

@fabianhjr fabianhjr force-pushed the enable-nvidia-wayland-on-gdm-by-default branch from 559ebbf to 539811a Compare November 23, 2021 18:17
@fabianhjr fabianhjr marked this pull request as ready for review November 23, 2021 18:17
@fabianhjr
Copy link
Member Author

/marvin opt-in
/status needs_reviewer

@marvin-mk2
Copy link

marvin-mk2 bot commented Nov 26, 2021

Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here.

Copy link
Contributor

@thiagokokada thiagokokada left a comment

Choose a reason for hiding this comment

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

LGTM, but maybe someone with more knowledge with Gnome can help here?

CC @jtojnar @dasj19 @maxeaubrey @hedning.

@jtojnar
Copy link
Member

jtojnar commented Nov 26, 2021

I think it is a good idea if Wayland is generally usable on nvidia. I cannot verify whether this is the case.

@fabianhjr
Copy link
Member Author

For reference, that flag was added ~2 years ago in #70295

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/request-for-testers-nvidia-gpu-and-gdm-gnome-users/16265/1

@kevincox
Copy link
Contributor

I was using this flag for success for quite some time but fortunately I was able to move to AMD graphics. So I'll step out of this review since a lot of people better suited to answer this question have been brought in.

@fabianhjr
Copy link
Member Author

Hi @teto and @rofrol, noticed you thumbs upped this merge request; if you have tested this config I would appreciate an approval through the merge review flow.

@jtojnar, I am using a config with wayland under nvidia and gdm + gnome 41 so I know this works great overall. I made good faith efforts to get gdm + nvidia testers and it seems like there are no objections. I think this is ready to merge.

@kevincox
Copy link
Contributor

Not getting any response from the gnome folk. I think we can merge this. It worked fine for me and matches other driver settings.

@kevincox kevincox merged commit 2b35c41 into NixOS:master Nov 29, 2021
@fabianhjr fabianhjr deleted the enable-nvidia-wayland-on-gdm-by-default branch November 29, 2021 22:46
@lboklin
Copy link

lboklin commented Nov 30, 2021

This appears to be set even if gdm.enabled = false. I use Plasma but was still hit with this assertion:

error:
       Failed assertions:
       - You cannot use wayland with GDM without modesetting enabled for NVIDIA drivers, set `hardware.nvidia.modesetting.enable = true`

@jtojnar
Copy link
Member

jtojnar commented Nov 30, 2021

Thanks, should be fixed by dad4fdd.

@jtojnar
Copy link
Member

jtojnar commented Nov 30, 2021

Looks like docs are outdated now.

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.

6 participants