-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Gamescope cannot be used to launch Steam games #351516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It's not really possible with the way fhsenvs work currently. |
also the ticket name isn't exactly correct. I use gamescope as a window manager just fine to launch steam. So what you are more saying here is that you cannot launch gamescope in a nested session |
It's even more narrow than that, you can't open it, nested, with |
I have this issue on recent builds but not builds on/before Oct 14 (without Metadata
|
That exact issue should be impossible without |
When running without capSysNice, I get the following relevant output in the console:
Steam says the game is running but the only process I can see is the full gamescope command expanded to include the calls to steam-launch-wrapper, reaper, etc., which needs to be manually killed -- clicking Stop in Steam has worked a couple times but generally it hangs in "stopping" indefinitely. |
I confirmed it launches fine without gamescope. Using these launch options —
|
OK, one of those issues is known and I'm looking into a proper fix in the next few days. For now, try removing mangohud and/or gamemode from your |
Please test #351928. |
I get further than before with #351928. Instead of games not starting I get the initial launch screen (in this case the Valve logo) with the game cursor but then the gamescope window stops responding and goes black until I kill it. Here are my logs:
|
This sounds like an xwayland crash? Are you using Steam from the same nixpkgs version as the rest of your system? |
Yes, I rebuilt with all packages pointed at "github:K900/nixpkgs?ref=awful-steamage" |
Does this happen to all games, or only specific ones? If specific ones, which? |
Yes, it seems to happen with all games (tested with Deadlock, Terraria, Blender, and Don't Starve Together). |
That's very strange. Do you have any core dumps in |
No, nothing of that sort. I forgot to change a url in my
|
Can you try rebooting? It seems like you might have some leftover xwayland sockets. |
Tried restarting with and without steam set to run on startup, no change. |
Do you have any custom overrides on Steam at all? |
No, although I do have dynamic triple buffering for Gnome enabled as my only overlay (as per https://wiki.nixos.org/wiki/GNOME#Dynamic_triple_buffering). |
That's probably fine. Is this GNOME on Wayland or X11? What does |
Gnome on Wayland. Here's the output of that command (it's the same before and after I try to launch a game):
|
That's... weird. And this is all of the logs from Steam+gamescope? Does the game process start at all? |
It says something like Edit: Yes those are all the logs I get from running |
Can you just post the entire output from you starting Steam to the game not launching? |
|
Are you using some sort of hardened kernel? |
No, I'm using Linux 6.6.58, and haven't modified anything at the kernel-level since installing from the regular x86 ISO as far as I know. Would it help if I provided my |
Please do. |
|
Yeah, the issue is likely that you're mixing channels. You can't do that right now with graphical applications. Please build your entire system from one channel. |
Do you mean these lines:
|
No, I mean all the |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/unable-to-activate-gamescope-capsysnice-option/37843/13 |
Can confirm. The game starts with
|
try enabling
|
I'm hitting this issue too, and it's going to be increasingly important for gamescope to work as HDR starts working on Linux as this is the only currently supported method for Proton to give HDR information to the compositor; is there really nothing we can do to allow CAP_SYS_NICE for gamescope sessions nested in steam? Would it be possible to give the whole Steam FHSEnv CAP_SYS_NICE so that programs spawned below that have CAP_SYS_NICE too? That might solve the problem, as long as you are willing to trust steam and everything below it to have that capability. |
Whatever problem you're having is unlikely to be related to CAP_SYS_NICE. Please post the full log. |
I have exactly the bug as posted above: with capSysNice = false; in my nixos config, things launch fine but I get slowdown after ~30 minutes. With capSysNice = true; I get My understanding is that this is because gamescope running from inside steam is running in an FHSEnv, and capabilities aren't allowed to be granted in there due to how it works. My question was whether it would be possible to just give the whole FHSEnv CAP_SYS_NICE as it is created? I'm not sure if that's possible though. |
No, that's not possible. The slowdown bug is likely unrelated and is in upstream gamescope. Are you on 24.11 or unstable? |
The slowdown is a known thing that happens with gamescope, and is exactly why gamescope wants to be granted CAP_SYS_NICE and why nixos has the That's not the topic of this bug; the topic of this bug is that the |
It looks like using ananicy instead of CAP_SYS_NICE to manage gamescope's niceness might work as a workaround. I have added the following to my config and will see if it stops the slowdown that occurs:
|
Anecdotally, I've been using ananicy on gamescope for the past few weeks, and haven't hit this issue myself.
|
@DavidTruby using the same config my performance still degrades after 30min. |
Looks like I'm getting these too. I did also notice the performance drop, so I guess ananicy isn't actually working. |
ok so the slowdowns might be related to this issue: ValveSoftware/steam-for-linux#11446 Still the sysCapNice Problem persists |
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:
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
"x86_64-linux"
Linux 6.6.56, NixOS, 24.05 (Uakari), 24.05.5709.c0b1da36f7c3
yes
yes
nix-env (Nix) 2.18.8
/nix/var/nix/profiles/per-user/root/channels/nixos
The text was updated successfully, but these errors were encountered: