# Enabling X11 still results in Wayland

**URL:** https://discourse.nixos.org/t/enabling-x11-still-results-in-wayland/25362
**Category:** Help
**Created:** [February 10, 2023, 12:16am UTC](https://discourse.nixos.org/t/enabling-x11-still-results-in-wayland/25362 "2023-02-10T00:16:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![eureka-cpu](https://discourse.nixos.org/user_avatar/discourse.nixos.org/eureka-cpu/32/32567_2.png) [@eureka-cpu](https://discourse.nixos.org/u/eureka-cpu)
#### Post date: [February 10, 2023, 12:16am UTC](https://discourse.nixos.org/t/enabling-x11-still-results-in-wayland/25362/1 "2023-02-10T00:16:00Z")

</div>

Not sure why, and I’ve read a few other posts here, but I have (seemingly) everything I should to enable X11 but for some reason I’m still on Wayland.

```nix
# Enable the X11 windowing system.
  services.xserver.enable = true;

  # Enable the GNOME Desktop Environment.
  services.xserver.displayManager.gdm.enable = true;
  services.xserver.desktopManager.gnome.enable = true;

  # Configure keymap in X11
  services.xserver = {
    layout = "us";
    xkbVariant = "";
  };

  xdg = {
    portal = {
      enable = true;
    };
  };

```

fetch:

```sh
OS: NixOS 22.11.1895.ab1254087f4 (Raccoon) x86_64
Host: HP 8A78
Kernel: 5.15.89
Uptime: 32 mins
Packages: 1002 (nix-system)
Shell: zsh 5.9
Resolution: 1920x1080, 2560x1080
DE: GNOME 43.2 (Wayland)
WM: Mutter
WM Theme: Adwaita
Theme: Adwaita [GTK2/3]
Icons: Reversal-dark [GTK2/3]
Terminal: alacritty
Terminal Font: JetBrains Mono
CPU: AMD Ryzen 7 PRO 5850U with Radeon Graphics (16) @ 1.900GHz
GPU: AMD ATI Cezanne
Memory: 3226MiB / 15327MiB

```

---

<div class="post-metadata">

### Author: ![jtojnar](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jtojnar/32/70_2.png) [@jtojnar](https://discourse.nixos.org/u/jtojnar)
#### Post date: [February 10, 2023, 12:37am UTC](https://discourse.nixos.org/t/enabling-x11-still-results-in-wayland/25362/2 "2023-02-10T00:37:13Z")

</div>

`services.xserver.enable` makes X server available ([among other things](https://github.com/NixOS/nixpkgs/issues/94799)) but the choice of what display server is actually used is up to the display server (GDM in your case). Since you are enabling the GNOME module so you will have `gnome` and `gnome-xorg` sessions and GDM will default to the former.

You can change the session in the cog wheel menu on the login screen. Or declaratively [preselecting it using `services.xserver.displayManager.defaultSession` option](https://discourse.nixos.org/t/fix-gdm-does-not-start-gnome-wayland-even-if-it-is-selected-by-default-starts-x11-instead/24498/4).

---

<div class="post-metadata">

### Author: ![eureka-cpu](https://discourse.nixos.org/user_avatar/discourse.nixos.org/eureka-cpu/32/32567_2.png) [@eureka-cpu](https://discourse.nixos.org/u/eureka-cpu)
#### Post date: [February 10, 2023, 3:13am UTC](https://discourse.nixos.org/t/enabling-x11-still-results-in-wayland/25362/3 "2023-02-10T03:13:15Z")

</div>

Thanks for the help (:
