How to use Wayland in Fedora?

9,775

Solution 1

As far as I know, the GNOME option does already use Wayland. So, if you want to use Wayland, just choose GNOME.

If not, maybe try troubleshooting your HW? Is it outdated/old? Maybe try to reinstall the system?

Solution 2

Recent versions of Fedora use Wayland by default. However, things could prevent Fedora from using it, mainly drivers. Most likely, it is only one thing: NVIDIA proprietary drivers.

To enable Wayland for Gnome in Fedora, two main actions are needed, as explained below in details:

  1. TL;DR: Enable Wayland in the GDM configurations in /etc/gdm/custom.conf

    1. Open /etc/gdm/custom.conf for editing (as you know, you must be root).

    2. Go to the line which looks like the following:

      [daemon]
      WaylandEnable=false
      
    3. Change it to (even if the line was commented):

      [daemon]
      WaylandEnable=true
      
    4. Save the file and exit.

  2. TL;DR: Comment out all Wayland-disabling lines in /usr/lib/udev/rules.d/61-gdm.rules (thanks to this forum thread)

    1. Open /usr/lib/udev/rules.d/61-gdm.rules for editing (root, again).

    2. Comment lines which causes Wayland not to start; usually, it's related to proprietary NVIDIA drivers. The comments before each line should help you on that. For example, I commented the following line:

      # disable Wayland when using the proprietary nvidia driver
      DRIVER=="nvidia", RUN+="/usr/libexec/gdm-disable-wayland"
      
    3. Save the file and exit.

      Important Note: As you are probably using NVIDIA proprietary drivers, this step should make you able to use Wayland alongside these drivers. See egl-wayland and this post.

      However, you may not experience the best performance, as well as having other problems. For example, nvidia-settings only works on X11, Xwayland has problems with 3D hardware accelerations, and as a result, glxinfo shows llvmpipe as the renderer (also the About section on recent version of Gnome Settings). Nonetheless, you can verify the running driver by lspci -vnn, if you did the steps correctly. See this, also.

      Duh. It's NVIDIA, BTW.

      Edit 1: Good news, somehow. There is an initial move towards supporting hardware acceleration on NVIDIA proprietary drivers for Xwayland!

      Edit 2: The long-awaiting support of GBM API from NVIDIA has been merged into the proprietary drivers! As a result of this, we should expect the usability and performance of these drivers on Wayland to be much better. Great news!

Restart your computer (a logout and login should not be enough). Before logging in, inside logging options, you should now see both "Gnome" and "Gnome on Xorg", which the first one is the Wayland option. Using it, you should able to use Wayland on Gnome. Enjoy it!

Share:
9,775

Related videos on Youtube

Spirine
Author by

Spirine

Updated on September 18, 2022

Comments

  • Spirine
    Spirine over 1 year

    I'm using Fedora 26 and Gnome 3.24, and would like to try Wayland. Wayland seems to be installed, and I've also installed gnome-session-wayland-session. I'm now expecting to be able to choose GNOME on Wayland on the login screen, however I can only choose between GNOME, GNOME Classic and GNOME on Xorg. Finally, GNOME on Xorg definitely doesn't use Wayland since

    loginctl show-session 2 -p Type
    

    returns Type=x11. Since Gnome uses Wayland by default, GNOME should use Wayland, however logging in after selecting GNOME gets me back to the login screen...

    After trying to log in with Wayland, journalctl -b contains only one line with the word wayland:

    /usr/libexec/gdm-wayland-session[1459]: test: Missing argument at index 2
    

    But some lines later many errors related to Gnome appear:

    gnome-session[1472]: gnome-session-binary[1472]: WARNING: App 'org.gnome.SettingsDaemon.Wacom.desktop' exited with code 1
    gnome-session[1472]: gnome-session-binary[1472]: WARNING: App 'org.gnome.SettingsDaemon.A11yKeyboard.desktop' exited with code 1
    gnome-session-binary[1472]: WARNING: App 'org.gnome.SettingsDaemon.Wacom.desktop' exited with code 1
    gnome-session-binary[1472]: WARNING: App 'org.gnome.SettingsDaemon.A11yKeyboard.desktop' exited with code 1
    gnome-session[1472]: gnome-session-binary[1472]: WARNING: App 'org.gnome.SettingsDaemon.Clipboard.desktop' exited with code 1
    gnome-session-binary[1472]: WARNING: App 'org.gnome.SettingsDaemon.Clipboard.desktop' exited with code 1
    gnome-session[1472]: gnome-session-binary[1472]: WARNING: App 'org.gnome.SettingsDaemon.Color.desktop' exited with code 1
    gnome-session-binary[1472]: WARNING: App 'org.gnome.SettingsDaemon.Color.desktop' exited with code 1
    gnome-session[1472]: gnome-session-binary[1472]: WARNING: App 'org.gnome.SettingsDaemon.XRANDR.desktop' exited with code 1
    gnome-session-binary[1472]: WARNING: App 'org.gnome.SettingsDaemon.XRANDR.desktop' exited with code 1
    gnome-session[1472]: gnome-session-binary[1472]: WARNING: App 'org.gnome.SettingsDaemon.XSettings.desktop' exited with code 1
    gnome-session-binary[1472]: WARNING: App 'org.gnome.SettingsDaemon.XSettings.desktop' exited with code 1
    

    The issue is not hardware related: I've tried to boot on a live USB, and wayland was working.

    The system information is

    $: uname -a
    Linux localhost.localdomain 4.11.11-300.fc26.x86_64 #1 SMP Mon Jul 17 16:32:11 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
    

    How could I use Wayland ?

    • Jakuje
      Jakuje almost 7 years
      GNOME option is using Wayland. I would give it a try from clean install or from live CD/USB if it works for your hardware. If so, you should try what is difference in your system from the Live one. If not, you are probably out of the luck with your computer.
    • Ungeheuer
      Ungeheuer almost 5 years
      Did you ever figure this out? I'm in the same boat. I installed GNOME, and with it came wayland. I want to use wayland for multi-monitor scaling, but it keeps defaulting to x11, even when selecting the GNOME option. I"m on Fedora 30 now.
    • Spirine
      Spirine almost 5 years
      @Ungeheuer Now it works with a newer Fedora version
    • Ungeheuer
      Ungeheuer almost 5 years
      Dang. I'm on Fedora 30 and I think I've installed all the wayland stuff, and it still defaults to X11. There's no "GNOME on Wayland" or "GNOME on Xorg" option for DE on login...must be missing something...
  • Dzintars
    Dzintars about 4 years
    I believe it's not a true Wayland. It's Xwayland with Xorg compatibility.