What does HackerNews think of gamescope?

SteamOS session compositing window manager

Language: C++

For those that don't know (like me, three minutes ago) gamescope [1] is a Wayland compositor custom-written for games (and, I believe, what the Steam Deck uses). it's open source, and under the "BSD 2-clause" license.

[1]: https://github.com/Plagman/gamescope

Amusingly it is thanks to Wayland i can use Linux on my GPD Win 1 handheld[0] - apparently there is a bug in the video driver that when changing video modes can cause the entire screen to shift several lines (probably some memory offset issue, sometimes it even causes colors to go haywire) that needs a reboot to fix.

However since Wayland (or at last KDE's Wayland implementation) doesn't provide any functionality for changing video modes, the bug isn't triggered when running KDE with Wayland as the latter forces games to use whatever video mode the desktop uses.

Of course that means that games that do not support 1280x720 wont work at all, but that's minor details, about as important as using a lower resolution to get better framerates from the Atom iGPU the device has :-P

(ok, actually might be possible by using gamescope[1], which runs its own Wayland+XWayland compositor inside an SDL window that you can also force to use a specific resolution - again no resolution changes are supported and that uses wlroots - that can be scaled to arbitrary outputs and if the SDL you're using has a Wayland backend to avoid going through the desktop's Wayland compositor's XWayland layer then you may not get that much lag at all - though not sure if there'd be enough memory left for the game after all that :-P)

[0] https://en.wikipedia.org/wiki/GPD_Win

[1] https://github.com/Plagman/gamescope

My first intuition would be, to run the game inside gamescope and use a 2x (or higher) scaling factor.

https://github.com/Plagman/gamescope

Yes, but the vast majority of games on Linux now run through WINE and the world is moving to Wayland. (notably Valve's Gamescope which will be used in the Steam Deck[0]).

[0] https://github.com/Plagman/gamescope

I love X, etc and use it all the time, but let's be honest, X isn't exactly rock solid either. I had X crash due to video mode switches (mainly via games) so many times that nowadays unless i know a game behaves nicely, i tend to first run it under gamescope[0] which shields against these issues. I do find it kinda amusing that my only use for Wayland so far has been to avoid driver issues by running a compositor inside an X window :-P

[0] https://github.com/Plagman/gamescope - it is a fork of Valve's wayland compositor which actually works under X11 inside a window and effectively creates a nested XWayland environment but also attempts to minimize latency... it doesn't eliminate it completely but outside of twitchy shooters it is ok

Neat idea. That would be super easy to implement on GNU/Linux using nested Wayland compositors, which BTW is something Valve is already playing with (although for different reasons): https://github.com/Plagman/gamescope
> The open source community is more responsible for Linux gaming than Valve. Valve has supported Linux in the (hilariously) limited number of titles they've released in the last decade, and has added some support to the open source community. They are not the driver behind Linux gaming.

Valve are not the only ones doing anything for Linux gaming, but they are a pretty fucking big contributor: - Releaseing Steam for Linux, which has encouraged many games to be ported. Yes, the Steam Consoles are cancelled (or on hold), but even the promise of a new market (and the convenience of not having to have a separate distribution channel for the Linux version of your game) has changed the Linux gaming landscape from a handful of titles to more games than anyone can play (depending on your tastes ofc). - Employing/contracting people working on different parts of the Linux graphics stack (SDL,radv,dxvk,more). - Developing Proton. I mostly play native games, but Proton has been huge for many. Yes, it's based on Wine (that is a good thing, NIH syndrome is way too common is bad) but Valve have improved the parts needed to get a good gaming experience and packaged it up in a nice way that is dead simple to use for anyone. Just click a button to play your Windows games. - Lots of other small things. For example Valve's Plagman has been working on https://github.com/Plagman/gamescope which is godsent for thos of us with ultrawide monitors or other uncommon resolutions and aspect ratios that gamedevs like to pretend don't exist.

And best of all, most of those improvements have been open source and available even to those who don't want to use Steam. That's surprisingly open for what is esentially a DRM company. So saying "The open source community is more responsible for Linux gaming than Valve" doesn't even make sense when Valve are part of that opensource community.