Skip to content

Gamescope cannot be used to launch Steam games #351516

Description

@aldrenean

Describe the bug

Attempting to use gamescope with Steam games, by adding 'gamescope -- %command%' to the game's launch options, doesn't work.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install steam (programs.steam.enable = true)
  2. Enable gamescope with 'programs.gamescope.enable = true'
  3. Also set 'programs.gamescope.capSysNice = true'
  4. Add 'gamescope -- %command%' to the launch options in the game's properties
  5. Try launching the game

Expected behavior

The game should open, running inside of a gamescope instance.

Additional context

Logging the output with 'gamescope -- %command% >> out.txt' gives only one line of output: "failed to inherit capabilities: Operation not permitted". It sounds like a permissions issue, though setting capSysNice to true for gamescope should hypothetically let it renice itself.

This comment suggests that using the flatpak version of Steam resolves this issue. I have not tested this, as it's non-trivial to transition from a native to flatpak steam installation, but regardless, the behavior with the native package should be fixed.

Notify maintainers

@K900
@zhaofengli
@Scrumplex
@PedroHLC
@nrdxp

Metadata

  • system: "x86_64-linux"
  • host os: Linux 6.6.56, NixOS, 24.05 (Uakari), 24.05.5709.c0b1da36f7c3
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.18.8
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: steamSteam game store/launcher (store.steampowered.com)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions