Simon McVittie
March 01, 2022
Reading time:
Congratulations to Valve on the release of the Steam Deck, their new handheld gaming PC!
This new device comes with a new release of SteamOS, a specialized Linux distribution for gaming devices, which Valve and Collabora have been working on together for several years. SteamOS 3 is based on Arch Linux, a rolling-release distribution which includes the latest Mesa release for open-source accelerated graphics support, and supersedes the Debian-based SteamOS 2 release used on the earlier Steam Machine project.
A handheld device needs a solid update framework, so one of Collabora's major contributions to SteamOS 3 was to help implement seamless system updates. With its new “A/B” design, there are now two operating system partitions, with two different versions of SteamOS. When upgrading, a new operating system image is written to whichever partition is not currently in use, before rebooting the system. A specialized bootloader module then automatically selects the newer operating system and boots into it. If the upgrade was successful, you continue to use the new OS, and the previous system partition is reused for the next upgrade. If the upgraded version does not boot successfully, then the bootloader automatically falls back to the previous system partition, and you can try again later. Of course, new operating system images are downloaded with block-based deltas, so only the changed parts need to be re-downloaded.
For your non-gaming needs, the device comes with KDE Plasma Desktop pre-installed, allowing you to use the Deck for desktop tasks and use your existing peripherals via the USB-C port. The KDE community has done a lot of work to improve the experience, including theme changes, additional UI elements and stability fixes.
In normal use, the active operating system partition is read-only, to make the Steam Deck as robust as possible. However, unlike most games consoles, this is a fully open device, and it can be switched into a developer mode where the operating system partition is read/write and can be modified. Arch Linux's "pacman" package manager is available for use in developer mode.
Of course, none of this is very interesting without some games, and in addition to the native Linux titles available on Steam, the Steam Deck can also run many games that were built for Windows. It does this using Proton, a compatibility framework built around Wine and DXVK by Codeweavers, Valve and the Wine community. Proton is not just for the Steam Deck: thanks to the stable, Debian-based container environment provided by the Steam Linux Runtime, and launched by the pressure-vessel tool developed by Collabora, it can run in a consistent environment on most desktop Linux distributions, ranging from the latest rolling releases like Arch Linux, to older LTS distributions like Ubuntu 14.04.
20/12/2024
The Rockchip RK3588 upstream support has progressed a lot over the last few years. As 2024 comes to a close, it is a great time to have…
09/12/2024
Collabora will be at NeurIPs this week to dive into the latest academic findings in machine learning and research advancements that are…
05/12/2024
Now based on Debian Bookworm, Apertis is a collaborative OS platform that includes an operating system, but also tools and cloud services…
Comments (8)
Naheem:
Mar 01, 2022 at 08:38 PM
Any reason A/B updates approach was chosen over OStree?
Reply to this comment
Reply to this comment
Vivek Das Mohapatra:
Mar 08, 2022 at 03:03 PM
The point of A/B image updating is to have two completely independent images: No matter what happens to one image the other remains bootable. OStree (and RAUC, which we use for SteamOS) address the problem of updating an image atomically - which is part of the problem we want to solve here, but not all of it.
Reply to this comment
Reply to this comment
Blaz Tomazic:
Mar 02, 2022 at 07:15 AM
Which filesystem Steam Deck uses and what were the deciding factors to select it?
How come partitions are used instead of snapshots? Are partitions more resilient to failure?
XFS and Btrfs both support snapshots so there would be no need for having two partitions. Even more so, they support reflink/deduplication which would reduce the storage used when having two OS versions present (because most of the data is probably the same).
I am sure all of this was considered, I am just interested in the reasoning for selecting the current update system over other possibilities.
Reply to this comment
Reply to this comment
jiji:
Mar 02, 2022 at 08:02 PM
The Steam Deck uses Btrfs for root and Ext4 for everything else, you can see it at 50:09 in this video https://youtu.be/gZ9kVrTWkUU?t=3009
Reply to this comment
Reply to this comment
Miguel:
Mar 02, 2022 at 04:22 PM
Congratulations.
I think that a LibreOffice special version for the Steam Deck, with finger friendly menus (perhaps a column as the old Gnome menu, but on the other side of the screen, with nested submenus and ideograms with subtitle) would complete this phenomenal piece of hardware and software.
And that kind of finger friendly menus, can also improve mouse productivity.
Also that adding speech to text, and improved Almond - or other software - as assistant would be great for the FOSS movement and your company.
Reply to this comment
Reply to this comment
superlupo:
Feb 27, 2023 at 02:02 PM
Great work! Is this a module for GRUB? Is the source code available? Thanks!
Reply to this comment
Reply to this comment
Vivek Das Mohapatra:
Mar 01, 2023 at 03:58 PM
There's a custom UEFI bootloader that inspects the boot configurations on the ESP and decides which one is wanted and then starts the bootloader from the chosen partition set.
That second bootloader is grub plus a module that:
- checks to see if the grub boot menu was requested or
- if we want kernel logs on the console or silent boot
- updates the metadata to increment the number of boot-attempts (so we can detect a config that is repeatedly trying to boot but never getting there)
I don't think the development repos are public but you can find released snapshots under:
https://steamdeck-packages.steamos.cloud/archlinux-mirror/sources/
The packages in question being steamos-efi and grub-2.
Reply to this comment
Reply to this comment
superlupo:
Mar 01, 2023 at 08:36 PM
interesting, thank you!
Reply to this comment
Reply to this comment
Add a Comment