Collabora is Working on a New Update System for SteamOS


SteamOS 3, the operating system for the Steam Deck, has surprised many, especially because it deviates somewhat from what one typically perceives as an Arch Linux-based system. Among its unique features compared to its parent distribution, the most notable are its immutability and the use of atomic updates.

SteamOS 3 uses an A/B partition scheme for system updates. This means there are two separate partitions, A and B, where the primary one hosts the current version of the operating system, while the other is reserved for future updates. Regarding the nature of system images, these are atomic and applied using RAUC and Casync.

For users who like the Linux theme and who are aware of the different distributions that exist, the A/B partition system may sound familiar to them, since it is the one used by Vanilla OS. On the other hand, Google has been trying to push it in Android for a long time, but it was initially rejected due to the amount of disk space required.

The update system used by SteamOS 3, as is common with such systems, ensures that all users receive exactly the same update, even if they have disabled read-only features and edited some files above the personal folder. Collabora, the source of this information, mentions that the /etc and /var directories always have write permissions, but that issue is another topic.

Although Collabora acknowledges that Casync works very well, there are some shortcomings, such as the fact that the calculation of the current image seed is done on the fly and is performed by a single process, causing a single processor core to work at 100%. If the task were distributed across more cores, it could be done faster and more efficiently, possibly with lower temperatures.

Other drawbacks of Casync, or at least its implementation in SteamOS 3, include the inability to perform parallel HTTP(S) GET operations and the need to restart the download from scratch if interrupted. The latter issue can be avoided by using the destination as a seed, but this doubles the time spent in the preparation phase.

One last aspect against Casync is that its last public release was in 2017. Officially, it is not discontinued, but its development seems to be very stagnant. Relying on something as critical as system updates on a synchronizer that appears to be on the brink is not a good idea, so Collabora wants to replace it with another similar tool that does not carry its drawbacks.

This is where Desync comes in, a reimplementation of most of Casync that can function as a replacement in many situations and is actively developed. Desync supports multiple parallel HTTP(S) requests and multiprocessing, already addressing two of Casync's main drawbacks. However, despite everything seeming easy at first, the replacement process has not been as straightforward as it appears.

While Desync can install system updates created with Casync and vice versa, there are certain differences that have required work on Desync to make it usable in SteamOS 3. For starters, the way seeds are handled. Because the Steam Deck supports disabling read-only mode, there are no guarantees that Desync's precomputed index file for the seed is correct. This has forced Collabora to implement a default "plan" on how to assemble an update, an option to regenerate invalid seed indexes, and validate what has been written by taking fragments from a seed.

Other things Collabora has added to Desync include support for global patterns in the configuration file for images not located at a single URL, the ability to quickly estimate the download size of an update, and support for RAUC, an atomic update system for embedded Linux systems.

If the change from Casync to Desync is completed, it is expected that the application of updates will be between 30 and 50 percent faster, the update will resume from the point it failed instead of starting from scratch in case of failure, better image checking to see if it has been altered or not, and setting a foundation for clients to quickly estimate the download size of updates in the future.

The new update system based on Desync and RAUC can already be tested in SteamOS 3.6, which is currently in the distribution's preview channel. Users who want to test it or contribute to its improvement only need to enable that channel from the operating system's settings.

Comments

Popular posts from this blog

systemd 256 arrives with run0, the ‘sudo clone’ that aims to improve security

Kubernetes 1.30 Available, New Version of the Container Orchestrator

Fedora Asahi Remix 40, the new version of Linux for Apple Silicon