How to get gamescope working on Zorin OS 17

There's two ways to get it working on Zorin. I'm assuming you've installed the gamescope flatpak version 23.08. You can check what you have using this command.

flatpak list | grep gamescope

If you don't have the right one you can uninstall it like so.

flatpak uninstall gamescope 

Then you can install the one we're using with this command.

flatpak install org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/23.08

First Way: Switch to Xorg
Logout and in the bottom right corner you can change your display server to Xorg. Log back in and it should just work.

Second Way: Edit the gamescope shell script to use sdl
WARNING: Using gamescope this way is a bit buggy. I've crashed bottles more than once.

To get it working on Wayland we need to edit a script. You will need to do this as admin in order to edit the file. Open your terminal and change your directory to this location.

cd /var/lib/flatpak/runtime/org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/23.08/0039e1ddb7c62864450f769b8828ce6b22932c1ce8a1819613638d0c028de84e/files/bin/

Next we are going to open up the gamescope file using gedit aka the text editor.

sudo gedit gamescope

On line 6 you should see a line thats like this.

exec gamescope-brokey "$@"

Replace line 6 with this command instead.

exec gamescope-brokey --backend sdl "$@"

Save the file and exit.

I hope this tutorial has been useful and if there's any way I can improve it feel free to leave a reply.