ensure 'tuned-ppd' is absent (Fedora 41), +gamescope RT

This commit is contained in:
Josh Lay 2024-11-09 04:04:25 -06:00
parent 1c96e21f6f
commit e4d6723c8c
No known key found for this signature in database
GPG key ID: 47AA304B2243B579
2 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,33 @@
#!/bin/bash
#
# script run by 'tuned' to ensure gamescope has the proper capability
# Check for arguments
if [ $# -eq 0 ]; then
echo "Usage: $0 {verify|start}"
exit 1
fi
function verify_cap() {
/usr/sbin/getcap "$(which gamescope)" |& grep 'sys_nice=eip'
return $?
}
function set_cap() {
/usr/sbin/setcap 'CAP_SYS_NICE=eip' "$(which gamescope)"
}
# Handle arguments
case "$1" in
verify)
verify_cap
;;
start)
set_cap
;;
*)
echo "Invalid argument. Use 'verify' or 'start'."
exit 1
;;
esac