From Fedora Project Wiki

Revision as of 19:22, 13 August 2024 by Amoloney (talk | contribs)


Anaconda as native Wayland application

Summary

Currently, Anaconda is still an X11 application, which we would like to fix and make Anaconda Wayland native application to allow us drop of the X11 dependencies from installation ISO images. However, this change is not just a simple switch and we need to do some adjustments during the path which will impact user experience.

Owner


Current status

Detailed Description

Anaconda is required to migrate to Wayland native application to drop dependencies from the installation ISO images which are deprecated. Package owners want to drop libXklavier from Fedora (see https://bugzilla.redhat.com/show_bug.cgi?id=1955025 ) but also Xorg server from CentOS Stream and RHEL. However, this change won’t be just simple switching from X11 to Wayland, we also need to change a few things in Anaconda to be able to remove the X11 dependencies. This will have two main visible impacts listed below.

VNC switch to RDP for remote GUI installations

Anaconda has to remove ‘TigerVNC' which is used for VNC connection to be able to install your machine remotely with graphical UI. Reason is that TigerVNC is built from the Xorg server sources, so we would still depend on the Xorg server with this project. As replacement, we follow the recommendation of the Fedora Workstation to switch to Gnome Remote Desktop (grd) with a better protocol Remote Desktop Protocol (RDP) which gives users better performance and security.

This will have an impact on current vnc kickstart commands and kernel boot options of Anaconda. This will impact only the Anaconda installation environment (boot.iso).

Consistent keyboard control

Currently, Anaconda experiences difficulties in handling keyboard layouts in the installation environment, particularly on Wayland. Formerly, libXklavier was utilized by Anaconda to manage keyboard layout configuration, however, it proved unstable on Wayland. As a result, Anaconda has disabled keyboard handling during Wayland Live media installations due to unexpected behavior (refer to https://bugzilla.redhat.com/show_bug.cgi?id=2016613 ). This approach may lead to situations when users encountering issues while unlocking LUKS devices or using user passwords in the installed system because installation was done with a different keyboard layout.

To exacerbate the situation, there is no universally applicable solution for keyboard handling on Wayland systems, as Wayland lacks a unified API for keyboard management. It means that each Fedora Desktop Environment developed their own API. Unfortunately, the Anaconda team is not able to maintain a custom solution for each Fedora spin. Some Desktop environments started to use systemd-localed DBus API to address this issue and similar issues. The systemd-localed API seems to be the best approach currently, so we want to promote it as a shared solution for all Fedora spins.

The plan is:

  • All Fedora spins and Anaconda listen on org.freedesktop.locale1 and reflect configuration on the currently running system (might be only for Live media if desired)
  • All Fedora spins and Anaconda reflect their configuration to org.freedesktop.locale1
  • In case Fedora spin will not support org.freedesktop.locale1, the keyboard configuration of Anaconda won’t be reflected in the current system and the situation will be similar to the current Live Wayland experience

All the spin owners were notified about this request:

Feedback

We have some feedback from the SIG owners for the keyboard handling (see the links above). We don’t have feedback for the VNC to RDP switch yet.

Benefit to Fedora

  • This change will enable removal of X11 dependencies from the Anaconda which may result in reduction of installed software to the system when installing from Live ISO where ISO content is copied to the installed system (depends on the spin dependencies).
  • Switching from VNC to RDP allow users to use remote graphical installations which are more secure and have better performance .

Scope

  • Impact to the environments:
    • boot.iso (network installation): This environment will switch from Gnome Kiosk running as X11 to Wayland environment. Work here should be handled by the Anaconda team.
    • Live ISO (Fedora Workstation and non-rpmostree spins): Anaconda will run as an application in the Live spins environment in the same way as before. The Anaconda team will not modify the Live environment managed by the spin owners. However, spin owners should support systemd-localed as explained above to enable Anaconda to control system keyboard layouts.
    • Installed systems: No impact.
  • Proposal owners: The Anaconda team will implement changes required in the Anaconda project. More specifically:
    • Switch Anaconda code to start Wayland environment on boot.iso instead of X11
    • Change keyboard switching logic to use systemd-localed DBus instead of libXklavier
    • Switch remote graphical installations from VNC (TigerVNC) to RDP (GRD)
  • Other developers: Fedora SIG owners needs to add support for their environment to listen and use systemd-localed DBus API to reflect current state of the DE/WM or they won’t have support of keyboard layout switching in Anaconda.
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with the Fedora Strategy:

Upgrade/compatibility impact

This will impact only Fedora installations so no compatibility or upgrade issues.

Early Testing (Optional)

We will reach Fedora QE to coordinate testing approach.

How To Test

  1. Download any installation media
  2. Run the installation
  3. Look for breakages during the installation

Testing should be especially focused on:

  • Changing resolution with inst.resolution kernel boot option
  • Test new RDP solution (API will be clarified)
    • Password can be set to the RDP
    • Username can be set to the RDP
  • Test keyboard layout switching works correctly
    • On Live media, Anaconda should react on keyboard layout change in the DE and set that to the installed system
    • On Live media, Anaconda should be able to set the keyboard layout changes to the live environment
    • In the network installation (boot.iso) Anaconda should correctly reflect keyboard layouts changes so text in the Anaconda is written by the correct layout
    • Check if specific keyboard layouts are configured and installed as expected

User Experience

The only visible change to user should be:

  • Remote graphical installations will use RDP instead of VNC.
  • Anaconda will be able to control keyboard layouts in the Wayland environment on Live ISOs. This will improve user experience when installing Fedora Workstation, Fedora KDE, Fedora Sway and other Wayland based environments.

Dependencies

No dependencies of this package related to this change.

Contingency Plan

  • Contingency mechanism: Postpone this change to next Fedora release. Revert landed changes in Anaconda if required.
  • Contingency deadline: 100% code completion deadline
  • Blocks release? No


Documentation

No documentation yet. However, there are a few PRs ready for merge for CentOS Stream 10:

Release Notes

TBD