Performance mode auto-apply script

I was wondering if Bazzite had a script to automatically apply performance mode when starting a game and then switching it off when closing the game.

If you add ‘game-performance %command%’ as a Steam launch argument in CachyOS their script handles that. Does Bazzite have something similar?

IIRC all of Bazzite versions uses the power-profiles-daemon, so you should be able to just run powerprofilesctl set performance?

That doesn’t come with an auto-off function, though, so you’ll have to either make your own script, use steamtinkerlaunch to run an exit script, or just manually set the power profile back to power-saver or balanced via CLI or the battery icon in your panel.

Thanks for the reply.

I’ve currently been using the panel to manually set the profile but when testing CachyOS I found that particular script very convenient.

I wish I knew how to write such a script. Do you know where such a script would need to be placed in order to be called by a Steam argument?

Theoretically, you can just copy CachyOS script. Use which game-performance to find it.

Before the %command% for start script, and I think after the command for exit script I think? It should look like <start-script> %command%; <exit-script>.

How about you try with powerprofiesctl set performance %command%; powerprofiesctl set balanced launch options?

I just tried that and the game failed to launch.

Not sure if I did something wrong but I copied exactly what you had written.

I think I made a typo. writing powerprofiesctl instead of powerprofilesctl. Try out just powerprofilesctl set performance first in terminal?