Code Monkey home page Code Monkey logo

runtime-snaps's Introduction

runtime-snaps

Combining the Solus runtime and Linux Steam Integration project with Snaps for universal gaming

This is currently a Work In Progress.

WARNING - HIGHLY VOLATILE

We're now undergoing the upstreaming process for the new steam-support interface, as such consider the existing snaps broken, and you in need of a new snapd with the new support. We're also going to drop devmode support now and move to strict confinement, so please consider the vast majority of this document incorrect.

Why what now?

This is an ongoing effort to produce snaps to provide the Steam* client, Linux Steam Integration project, and Solus packages to create a true "universal app" variant of Steam that will work on every Linux distribution in the same way, while mitigating many of the runtime issues.

This isn't just a "native Steam" effort, LSI is a highly complex project that seeks to replace the runtime almost entirely, and fix many issues. Integrating LSI is also a large undertaking - thus Solus is now seeking to share our work on our own runtime and LSI implementation with the rest of the Linux world for a pain-free and consistent gaming experience.

A large element of this is also to help developers and studios targeting Linux as a platform to have a singular target that would work across all Linux distributions, and provide peace of mind that their games would work as intended. Additionally, as the keepers of LSI, we can rapidly deploy changes to LSI and the runtime to better support the games and alleviate regressions before they hit users.

runtime-snaps is a Solus project

logo

Planned Usage

Runtimes:

  • solus-runtime-gaming

Applications:

  • linux-steam-integration + steam (single snap)

Note that for now we'll not be focusing on strict confinement, so the snaps should be installed with --devmode until such point as proper confinement is feasible.

We are not currently planning on making an SDK available, as the runtime will primarily be derived from the Solus repositories, with minor layering happening within the local runtimes.

As and when we have the core components in place we can start discussions around SDK + debugging availability.

How to build and run

You must be on Solus to build these snaps. You do not need to be on Solus to run these snaps.

Dependencies

  • snapd 2.29.2 + patches
  • solbuild (ensure this has been initialised on unstable-x86_64)

snapd patches

Note: All of these patches are in Solus

After installing the relevant snapd, ensure your apparmor rules are applied and snapd has been restarted. Be lazy, reboot. People do it.

For Ubuntu users you may use the Snappy Edge PPA

Install from the store

sudo snap install --edge solus-runtime-gaming
sudo snap install --devmode --edge linux-steam-integration
snap run linux-steam-integration

Build solus-runtime-gaming (Solus only)

sudo ./round1.sh

Build linux-steam-integration (Solus only)

sudo ./mkapp.sh

Installation (custom build)

You must first remove the existing installs if you've already run this step before:

sudo snap remove solus-runtime-gaming linux-steam-integration

The installation order is important, as LSI depends on the base runtime snap:

sudo snap install --dangerous solus-runtime-gaming*.snap
sudo snap install --dangerous --devmode linux-steam-integration*.snap

Running

snap run linux-steam-integration

Run with debug

This will drop you to a shell within the runtime and allow you to execute LSI's Steam shim with debugging enabled.

snap run --shell linux-steam-integration
$ export LSI_DEBUG=1
$ $SNAP/linux-steam-integration

Known Issues

Tracking some currently known shortcomings here:

  • No udev roles exposed to host. Talking with upstream to improve this in a new snapd interface
  • No testing yet done outside Solus! Need to test biarch + multiarch distros with NVIDIA & open source drivers.
  • "Home" for Steam is within the snap root. Removing snap will uninstall those local games
  • Requires --devmode install as confinement isn't yet finished.
  • LSI_DEBUG will cause crashes on Ubuntu (potentially stack size issue?)

License

Copyright © 2017 Solus Project

runtime-snaps is available under the terms of the GPL-2.0 license.

The distributed binary snap will fall under multiple licenses, consult the included packages to determine licensing details for the entire binary image.

* Some names may be claimed as the property of others.

runtime-snaps's People

Contributors

ikeydoherty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

runtime-snaps's Issues

flatpak steam

What is the difference between what you present with steam in flatpak format?

Add functional `glxgears` `glxgears-32`

Got the package ready, we'll need LSI to expose the bulk of the shim as a new lsi-exec binary that we can utilise within the snap. This will let us execute other commands such as glxgears while letting LSI perform all the necessary bootstrap of the environment, and then ensure any process launched is done so in an identical fashion to how we launch Steam.

This will let us expose 4 new apps:

  • glxgears
  • glxgears-32
  • glxinfo
  • glxinfo-32

This is purely for debugging LSI compatibility, and allowing users to verify their drivers work correctly when getting Steam installed. From our perspective we can ask anyone who opens a bug report about steamui.so libGL.so.1 style errors to first run snap run linux-steam-integration.glxgears-32 to actually verify they have 32-bit driver support.

Ensure OpenCL/CUDA is catered for

OpenCL mightn't come up that often but we should still ensure we can cope with it by providing
at minimum beignet as a backup, working in upstream snapd to expose the OCL ICD definitions, send a patch to Khronos to support a new OCL_ICD_FILENAMES variable and finally ensure snapd also makes the cuda libraries available.

Inside this snap we'll also need to add the OCL ICD loader.

STEAM_RUNTIME is disabled by the user

Steam Runtime and Steam Native runs fine.

[anders@idea ~]$ snap list
Name                     Version  Rev   Developer  Notes
core                     16-2.30  3748  canonical  core
linux-steam-integration  0.7.2    11    ikey       devmode
solus-runtime-gaming     3.0.0    11    ikey       base
[anders@idea ~]$ snap run linux-steam-integration
Repairing installation, linking /home/anders/snap/linux-steam-integration/11/.steam/steam to /home/anders/snap/linux-steam-integration/common/.local/share/Steam
Running Steam on Linux 4.14.13-1-ARCH 64-bit
STEAM_RUNTIME is disabled by the user
Installing breakpad exception handler for appid(steam)/version(0)
/home/anders/snap/linux-steam-integration/common/.local/share/Steam/steam.sh: line 713: 18735 Segmentation fault      (core dumped) $STEAM_DEBUGGER "$STEAMROOT/$STEAMEXEPATH" "$@"
/home/anders/snap/linux-steam-integration/common/.local/share/Steam/steam.sh: line 444: no match: ssfn*
[anders@idea ~]$ 

Stop using /usr/bin

Turns out that snapd REALLY hates /usr/bin and won't let us have desktop files unless
we have our binaries inside the /bin directory.

Tracking as a "don't forget".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.