[Unit] Description=Check gamescope niceness and set it if needed After=network.target [Service] Type=oneshot User=root ExecStart=/bin/bash -c 'if getcap $(which gamescope) | grep -q "cap_sys_nice=eip"; then exit 0; else setcap "CAP_SYS_NICE=eip" $(which gamescope); fi' RemainAfterExit=yes ProtectSystem=full ProtectHome=read-only PrivateTmp=true NoNewPrivileges=true [Install] WantedBy=default.target