I feel like I’m dumb and can’t figure out how to get this working, and I also don’t see anyone complaining about it either, so if this has been answered then I apologize for asking this again, but I couldn’t find an answer to this.
I just can’t run games on steam using gamescope -- %command%
I’ve been trying to troubleshoot this with a somewhat simple script to give me a log of what’s happening, and I just get this error:
failed to inherit capabilities: Operation not permitted
I also have another simple script to start steam with gamescope and bigpicture, and that works just fine, but there are some issues which I think are more related to gamescope and Nvidia not playing nice, so I’d like to be able to launch games through steam using gamescope.
I have read some of the threads about various problems with Gamescope in NixOS, and I think I’ve tried everything, but so far nothing worked.
This is all the settings I’ve set for either steam or gamescope:
config
programs = {
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
};
gamescope = {
enable = true;
capSysNice = true;
};
};
My question is: has this been solved ? or is it one of those problems that have no solutions ? or am I dumb ? cause that’s always an option too.
I’ve added the scripts down at the bottom so you guys can check it out
logging script
#!/usr/bin/env bash
log() {
logger -t mygamescope "$*"
echo "$*"
}
read_log() {
while IFS= read -r line ; do
log "$line"
echo "$line"
done
if [ -n "$line" ] ; then
log "$line"
echo "$line"
fi
}
cleanup() {
log "stopping"
}
trap cleanup EXIT
source "/home/cyberdruga/.local/bin/env"
log "starting"
log "arguments: " "$(printf '%q ' "$@")"
gamescope_args=(
--backend wayland
--expose-wayland
--adaptive-sync
)
log "which gamescope: " "$(which gamescope)"
gamescope "${gamescope_args[@]}" -- "$@" |& read_log
Steam With Gamescope script
#!/usr/bin/env bash
NO_REBOOT=
while [[ -n "$1" ]] ; do
case "$1" in
--no-reboot)
NO_REBOOT=true
;;
esac
shift
done
pgrep -x steam && steam -shutdown
echo "killing Steam..."
while pgrep -x steam > /dev/null ; do
sleep .5 ;
done
gamescope_args=(
# --force-grab-cursor
# --backend wayland
--steam
-b
-h 1080
)
steam_args=(
-tenfoot
# -bigpicture
)
gamescope "${gamescope_args[@]}" -- steam "${steam_args[@]}"
[ -z "$NO_REBOOT" ] && steam > /dev/null &
disown