Nixpkgs: GDM (Wayland) falls back to X if GNOME3 is not enabled

Created on 22 Dec 2019  路  4Comments  路  Source: NixOS/nixpkgs

I enabled the gnome3 logs and still couldn't get good logs. But from the flickering and ps aux | grep gnome-x output, I can confirm that GDM was not launching with Wayland.

But I knew it worked before, so I enabled GNOME3 as I normally do (services.desktopManager.gnome3.enable = true) and then GDM started working as expected, showing and launching Wayland sessions as well.

Presumably GDM should work with Wayland even if Gnome 3 is not being used.

bug GNOME

Most helpful comment

So with the bare minimum of services/icons we still get gnome session entries in GDM, which fails to launch. That's not really OK, so to solve this we have to options:

  1. Use the bare minimum, and get GDM to not show the gnome session entries as @Elyhaka mentions here
  2. Provide enough stuff for the gnome entries in GDM to launch.

Fixing nr. 1 seems simplest to me, and probably what users will expect. We just need to move the gnome.desktop etc. files to its own output. Then we'll have to sort out systemd.packages not handling duplicates (could of course build a common option in gnome3.nix, but ugh) :/

cc @jtojnar @worldofpeace, does that seem reasonable?

All 4 comments

So gdm doesn't do its own graphics, instead it starts a special gnome-shell session.

In particular we need at the very least expose the user services provided by gnome-session and gnome-shell:

gnome-session-binary[792]: WARNING: Falling back to non-systemdstartup procedure due to error: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit [email protected] not found.

I did some poking around, adding this seems to be the minimal things gdm needs (though it might be good to add gnome-settings-daemon too):

    systemd.packages = with pkgs.gnome3; [ gnome-session gnome-shell];
    environment.systemPackages = with pkgs.gnome3; [ adwaita-icon-theme ];

Unfortunately just adding that to the gdm module doesn't work when enabling the gnome shell desktop since gnome-shell is added to systemd.packages elsewhere (through being a xdg-portal) resulting in a broken system build. Ideally systemd.packages would be a set (couldn't find a setOf though, not sure if this already exists?).

For what it's worth here's how I get gdm to work without enabling all of gnome: https://github.com/lovesegfault/nix-config/blob/master/system/modules/gdm.nix

(Courtesy or @andir who showed me this)

So with the bare minimum of services/icons we still get gnome session entries in GDM, which fails to launch. That's not really OK, so to solve this we have to options:

  1. Use the bare minimum, and get GDM to not show the gnome session entries as @Elyhaka mentions here
  2. Provide enough stuff for the gnome entries in GDM to launch.

Fixing nr. 1 seems simplest to me, and probably what users will expect. We just need to move the gnome.desktop etc. files to its own output. Then we'll have to sort out systemd.packages not handling duplicates (could of course build a common option in gnome3.nix, but ugh) :/

cc @jtojnar @worldofpeace, does that seem reasonable?

I believe we fixed this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spacekitteh picture spacekitteh  路  3Comments

rzetterberg picture rzetterberg  路  3Comments

yawnt picture yawnt  路  3Comments

langston-barrett picture langston-barrett  路  3Comments

domenkozar picture domenkozar  路  3Comments