On Hyprland, some games have cursor capture or resolution problems unless I launch them through Gamescope with several options. Is there a way to avoid pasting that command into every game?
Can I avoid adding Wayland gaming launch options to every game?
Answers
You can put the Gamescope command in a small shell script and point games at that script instead. That makes the per-game entry shorter and gives you one place to change the resolution, refresh rate, or cursor-grab settings later.
It does not automatically apply the wrapper to every game, though. You'll still need a way to select it for each one, and a fixed resolution or refresh rate may not suit every game or display.
Reply to this answer
Check the display that Xwayland considers primary before assuming every game needs Gamescope. Setting the intended output as primary with xrandr resolved the wrong-resolution problem in the reported setup.
Run xrandr to find your output name first. The name is specific to the setup, so don't assume it will be DP-3. This addresses the resolution symptom, not necessarily cursor capture.
Reply to this answer
I'd test the pieces separately once you have a working command. Native Proton Wayland, Gamescope, and forced cursor capture are different changes. If one issue has been fixed elsewhere, you might be able to remove a flag rather than carry the entire command around indefinitely.
Keep the working version handy while testing, and change one thing at a time so you can tell what actually affects each problem.
Reply to this answer
Native Wayland isn't automatically the best choice for every game. Steam Input and the overlay can have issues with it, so check those features too before making it the default for your setup.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions