How do I use xserver in 25.11

Hi,

I tried to upgrade from 25.05 to 25.11 and I notice that if I disable wayland, I can’t boot nixos anymore.

What I use in 25.05

  services = {
    xserver = {
      enable = true;
      displayManager.gdm.enable = true;
      desktopManager.gnome.enable = true;
      displayManager.gdm.wayland = false;
    };
    displayManager.sddm.enableHidpi = true;
  };

The same config led to display-manager core dump

Dec 25 12:39:11 amd-nixos systemd[1]: Starting Display Manager...
Dec 25 12:39:11 amd-nixos systemd[1]: Started Display Manager.
Dec 25 12:39:11 amd-nixos gdm[1737]: Gdm: GdmSession: no session desktop files installed, aborting...
Dec 25 12:39:11 amd-nixos systemd-coredump[1784]: [🡕] Process 1737 (gdm) of user 0 dumped core.

                                                  Module libcrypt.so.2 without build-id.
                                                  Module libselinux.so.1 without build-id.
                                                  Module libz.so.1 without build-id.
                                                  Module libpcre2-8.so.0 without build-id.
                                                  Module libffi.so.8 without build-id.
                                                  Module libcap.so.2 without build-id.
                                                  Module libgudev-1.0.so.0 without build-id.
                                                  Module libXdmcp.so.6 without build-id.
                                                  Module libXau.so.6 without build-id.
                                                  Module libxcb.so.1 without build-id.
                                                  Module libjson-glib-1.0.so.0 without build-id.
                                                  Module libaccountsservice.so.0 without build-id.
                                                  Stack trace of thread 1737:
                                                  #0  0x00007f74db1159bb g_logv (libglib-2.0.so.0 + 0x6f9bb)
                                                  #1  0x00007f74db115c2f g_log (libglib-2.0.so.0 + 0x6fc2f)
                                                  #2  0x000055ba91cae42b get_fallback_session_name (/nix/store/7r624rkn1rxy1kaym20rg6mffp9c64qq-gdm-49.2/bin/gdm + 0x4742b)
                                                  #3  0x000055ba91cb3261 gdm_session_session_registers (/nix/store/7r624rkn1rxy1kaym20rg6mffp9c64qq-gdm-49.2/bin/gdm + 0x4c261)
                                                  #4  0x000055ba91cb3888 gdm_session_start_session (/nix/store/7r624rkn1rxy1kaym20rg6mffp9c64qq-gdm-49.2/bin/gdm + 0x4c888)
                                                  #5  0x00007f74dacf6052 ffi_call_unix64 (libffi.so.8 + 0xa052)
                                                  #6  0x00007f74dacf460d ffi_call_int (libffi.so.8 + 0x860d)
                                                  #7  0x00007f74dacf55ae ffi_call (libffi.so.8 + 0x95ae)
                                                  #8  0x00007f74db2205b3 g_cclosure_marshal_generic_va (libgobject-2.0.so.0 + 0x195b3)
                                                  #9  0x00007f74db21f731 _g_closure_invoke_va (libgobject-2.0.so.0 + 0x18731)
                                                  #10 0x00007f74db236af2 signal_emit_valist_unlocked (libgobject-2.0.so.0 + 0x2faf2)
                                                  #11 0x00007f74db23c7ed 
...
                                                  ELF object binary architecture: AMD x86-64
Dec 25 12:39:11 amd-nixos systemd[1]: display-manager.service: Main process exited, code=dumped, status=5/TRAP
Dec 25 12:39:11 amd-nixos systemd[1]: display-manager.service: Failed with result 'core-dump'.
Dec 25 12:39:11 amd-nixos systemd[1]: display-manager.service: Triggering OnFailure= dependencies.

Does anyone know what config I need to use xserver in 25.11? I have way too many problem on wayland…

Thanks

The gnome X11 session no longer exists. See the release notes. What problems do you have on wayland?

Your other option is switching to a different DE, but plasma has also announced that X11 will no longer be supported quite soon. It’s time to figure out any remaining issues you have; wayland should be unproblematic at this point.

Thanks for the info.

The current problems I encoutered related to three apps…

CopyQ → Global shortcut does not work

flameshot → can not capture

alacritty

I used below to make sure only 1 alacritty instance and it does not work in wayland…


    "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
      binding = "<Super>t";
      command = ''bash -c "wmctrl -xa alacritty || alacritty"'';
      name = "alacritty";
    };

I have not used wayland for long so there might be more issues coming out.

I guess I have to revert back to 25.05 and look for other solutions… :smiling_face_with_tear:

2 Likes

You should probably try some more minor sessions, like XFCE or maybe even a DE-less WM.

I also don’t expect Wayland to clean up the basics anytime soon, like dynamic xinput recalibration for rotating an input tablet or stuff like that.

2 Likes

Explore your options to replace those workflows, as it will only get worse and not better with time. Xserver is dying off slowly as major projects like KDE and Gnome deprecate it. You will have to migrate to an X-based DE/WM explicitly, like XFCE if you want to stay X. Other options include changing the apps. Foot terminal does literally what you’re describing by default and is very popular.

Reverting is the worst possible choice on the list.

1 Like

There are many alternatives to these things that will work out of the box on wayland.

Flameshot in particular does support wayland these days anyway, so that should be zero effort to fix: Wayland Help | Flameshot

As for copyq, there are lots of other clipboard managers. And for the last item in the list, just replace wmctrl with a wayland-native command; there are protocols designed for exactly this use case. wmctrl is explicitly designed for X11, of course that doesn’t work on wayland.

I don’t think sticking to an insecure OS over just trying some alternatives for three applications is reasonable at all. As a temporary measure, perhaps for a few weeks, sure, but the writing’s on the wall; eventually you will have to migrate.

You can switch to xfce or such, but those desktops will become less well supported over time. No reason to be stuck in the past if you really just have three relatively small issues.

Interesting to see xfce mentioned thrice as even they have started wayland development as of last year: releng:wayland_roadmap [Xfce Wiki]

Also to add, do not start randomly adding portals to your config, as that will not work - that page is primarily for non-NixOS users. If you can describe your problem in more detail than “can not capture” then we can actually try to help here.

1 Like

Yeah, sorry, I should be more clear. Most likely getting flameshot to run under wayland is as simple as replacing your current keybinding with the ones suggested on that page, i.e.:

QT_QPA_PLATFORM=wayland flameshot gui

It’s a QT application, and sometimes those need to be forcibly coaxed into using the wayland backend, but nonetheless, QT supports wayland.

In fact, that page links specifically to this issue comment for NixOS users: Flameshot unable to capture screen when triggered through Gnome shortcut · Issue #3365 · flameshot-org/flameshot · GitHub

But I suspect there are better ways to do that.

Anyway, the issues aren’t with wayland, but the fact that application developers still refuse to target it primarily. This will change as X11 desktops go the way of the dodo, and it will happen more rapidly than you think now gnome/kde have both jumped ship.

I expect it to take one or two ubuntu LTS releases to completely disappear, and likely one or two normal ubuntu releases for most of the FOSS world to catch up.

Here I am providing an update on the alternative I found to benefit whoever find this post in the future.

For the copyQ issue, I ended up setting up a custom keyset, if you use home-manager, you can configure dconf

    "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/copyq" = {
      binding = "<Super>v";
      command = "copyq toggle";
      name = "copyq show";
    };

For the flameshot issue, after testing a few different solutions, I ended up creating a wrapper script and then create a custom keybinding as well

Script

{ pkgs }:
pkgs.writeShellScriptBin "wrappedflameshot" ''
  export QT_QPA_PLATFORM=xcb
  flameshot gui
''
    "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot" = {
      binding = "<Alt>a";
      command = "wrappedflameshot";
      name = "flameshot";
    };

Lastly for running a single instance of alacritty, I use run-or-raise gnome extension. Then I can create the config as below.

  xdg.configFile."run-or-raise/shortcuts.conf" = {
    text = ''
      <Super>t,alacritty,,
    '';
  };
1 Like

The fact that for many things there is no single «Wayland» to target, because there is still not unified version of the protocol designed differently by different implementations (and each DE needing a different implementation of that part is new with Wayland compared to X11) is absolutely a problem with Wayland, though.

1 Like

That’s quite far from the truth. Most of the protocol is shared between compositors: Wayland Protocol Documentation | Wayland Explorer

Window management & such is identical between all of them.

It gets less unified when details like GNOME shell or the wlroots “layer shell” are involved, but that pretty much only applies to stuff like docks, which are naturally quite desktop-specific.

The big exception is “auto-type”, screenshots and screensharing, since upstream takes the position that these things need security attention and therefore need UI, which is desktop-specific. You may disagree with that opinion, but specific exclusions like this are far from:

The anti-wayland thing feels very similar to the anti-systemd thing to me, people just complaining about change because they don’t understand it and go off hearsay from the internet. There are things to critique, but this ain’t it.

2 Likes

«Takes security seriously» that does not include identifying the source of remote control request.

And speaking of «needs UI», window placement in X11 is done in a way where some WMs apply preconfigured policies and some WMs implement a UI for the user to make a case-by-case decision. Somehow, it works with a single standard protocol both application-side and WM-side.

Anyway, if Wayland as a protocol is in a good shape now, surely they have gotten around to standartising the application side of screensharing requests?

Also Xorg has standard XRandR and XInput configuration, meaning you can query and control things according to where your laptop is, independently of what a DE forgot to think about.

Well, obviously Wayland is formally speaking better than systemd because systemd caused any systems using it to gain new outright breakages w.r.t. Single Unix Standard, and X11 does not have a separate full-out standard.

1 Like

There you go, now you’re critiquing details instead of spreading falsehoods. Well, partially, you clearly didn’t read the protocols.

I’m not particularly interested in discussing the minute details of each protocol; there is a lot about X11 that can be criticized as well. That discussion is entirely unrelated to this thread, and I don’t have a horse in the race.

It’s also entirely besides my point; regardless of your opinion of the choices the wayland protocol makes, most DE/WM upstreams clearly see its benefits and have made the choice for you, just like most distros have made the choice w.r.t. systemd.

1 Like

«Most DE upstreams» are not really forcing the choice (at least not for people using WMs that are actually stable and not on a fast treadmill); putting applications in some kind of Xorg-backed Wayland miniinstances still gets me XRandR and XInput and scripted control benefits; the question is mostly when driver situation makes running Xorg on fresh kernel untenable.

What I was saying was not false, and also about design decisions that are higher-level decisions than what you can read in the protocol definition.

1 Like

Great to hear it all got resolved!