-
Notifications
You must be signed in to change notification settings - Fork 230
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
gamescope having CAP_SYS_NICE break the steam overlay in nested mode #107
Comments
Oh, thanks for catching that. It's likely causing LD_PRELOAD to get skipped, hm. |
Hm, but LD_PRELOAD should work fine in the game right? (Because it doesn't have CAP_SYS_NICE?) |
We want the overlay hooked to gamescope, not the game, when running it as a sub-command. Otherwise the overlay isn't 1:1 screen-space, and you get input hooking at the wrong level. |
Hmm, I see. I don't see an easy solution. |
I tested OP's capabilities setting and seem to ignore all environment variables. I usually do:
to use the iGPU (since Nvidia wont work) and with the set CAP_SYS_NICE capability it won't select the intel gpu so it wont start with nvidia errors. Would it be better to use pam_limit module for renice itself? |
I'm also having a similar issue. Entering Once I've set gamescope back to what it was before, |
I have the same issue, is there a workaround to this?? |
Still happens here too. |
Running the
|
Same here. Overlay in gamescope doesn't work after executing |
This has been driving me nuts so I looked into other methods to allow automatically renicing gamescope. I installed ananicy-cpp and created a simple rules file under
I then started/enabled the ananicy-cpp systemd service. Now I can launch a game using gamescope and the steam overlay still works. As expected gamescope is running at nice level -20 as it does when |
This most likely because of the dynamic linker secure mode: https://man.archlinux.org/man/ld.so.8#Secure-execution_mode Because linker detects the extra capabilities it will prevent I wonder if running entire Steam with the |
Just wondering, is CAP_SYS_NICE set on the Steam Deck when in game mode? |
Yes, but the overlay on Steam Deck uses an overlay plane and doesn't hook into the game like on desktop |
If you launch gamescope from a tty on a desktop does it also do that, or is the only specific to the Steam Deck? |
just to add that indeed on a PRIME setup setting In particular, with |
Mesa, and all spec compliant vulkan loaders ignore such variables in contexts with "elevated privileges", such as binaries with setuid or with capabilities, for security reasons. Gamescope isnt intentionally ignoring anything, security features of mesa and vulkan loaders out of its control are doing it. I have never been able to find any alternative functionality or settings in "secure" locations you can use to get around this. |
@Joshua-Ashton But it is a bit complicated, because it would require work on both the steam client and gamescope. Also I’m not sure how this would work in flatpak, but I guess that’s just life lol On steam side, (if this isn’t a thing yet) add an explicit vulkan layer which either has steam overlay built into it, or is dynamically linked to it. On the gamescope side, just check for the presence of said I imagine that it’d take a lot of work to make said explicit layer if steam overlay wasn’t simply hooking into vulkan functions The only other thing I could think of would be to have gamescope directly |
Hey, stumbled upon this while trying to figure out how to get my overlay working again. Previously I had been blocking the steam overlay from being loaded and explicitly loading a cloned version of it as steam would try to implicitly load it. Not sure why that stopped working exactly. But I can indeed confirm that removing the CAP_SYS_NICE allows the overlay to work properly! Running gamescope 3.14.24 |
I've seen that gamescope now re-nices itself and uses realtime priority compute if CAP_SYS_NICE is available, so I tried to add this capability to the gamescope executable with either:
sudo setcap cap_sys_nice+pie
orsudo setcap cap_sys_nice+pe
While this does give gamescope the ability to re-nice itself as confirmed by the log output, it seems to break the steam overlay and consequently steam-input when running games for steam in gamescope via launch options.
Removing the capability from the gamescope executable makes the overlay work again.
The text was updated successfully, but these errors were encountered: