If you want to use gamescope you must make sure of the following things (as of writing):

  1. you installed gamescope from Flathub and its runtime version is the same as the one used by Steam (can be done and checked with the “Warehouse” app). At this moment Steam uses 25.08
  2. for games that use Proton you MUST install Proton-GE as a Steam flatpak Add-on (from your App Store) and then enable it in Steam under Settings -> Compatibility -> select the one with “(flatpak)” or under a game’s Properties window. Otherwise, gamescope will have swapchain errors or crash. Even the builtin Proton versions don’t work as it stands. (upstream issue)

Gamescope can than be used as a launch option.

An Example: Running “Road to Vostok” at a lower resolution (because it doesn’t have a setting for that inside of the game sadly, and my hidpi laptop can’t really run it too comfortably at native res) + MangoHud(installed as flatpak):

LD_PRELOAD= gamescope -f -W 1920 -H 1200 --mangoapp -- env LD_PRELOAD=“$LD_PRELOAD” %command%

Keep in mind some flags are not working on wayland like -o (allows changing refresh-rate if the game is unfocused) (ref)

edit: seems like there’s also a bug with fps lagging after ~20mins or so, which can be mitigated with prepending LD_PRELOAD=“” to the launch command + adding env LD_PRELOAD="$LD_PRELOAD" before %command% (upstream issue)

  • BananaTrifleViolin@piefed.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    18 hours ago

    Thanks for sharing this; for people on atomic distributions this is important for getting things set up how you want.

    I’d say though, if you’re not on an atomic distribution then I’d use native builds of Steam and Gamescope for your distro wherever possible. The overhead of flatpaks is pretty minimal in practice, but the faff of having to configure things is higher with interconnecting flatpaks. It can be difficult to problem solve errors and by default just generally requires more configuration work (like installing the Proton-GE flatpak) without much real benefit. A native install will largely involve just installing Steam and Gamescope and letting Steam configure it’s own versions of proton.

    In addition there can be real faff in setting up controllers (as you have to pass udev rules through to the container) and the game data will be stored in the flatpak’s file system for the sandbox instead of ~/.steam (which can be annoying for modding but is manageable).

    Flatpaks can fail without seemingly clear reason; in my experience they’re often actually working perfectly it’s just that the sandbox isn’t quite configured for what you’re trying to do. In my opinion for Steam, it’s an unnecessary added layer of complexity for little to no gain. Flatpak is great in many ways, but not ideal for this unless no other options.

    • warmaster@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 hours ago

      Thankfully Bazzite bundles Steam pre-installed natively. That’s how game libraries on different drives just work.