[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Games Team policy on fullscreen games



Historically the Games Team has had an informal policy (not actually documented in https://wiki.debian.org/Teams/Games/Guidelines or https://wiki.debian.org/Teams/Games/Policy) that games should be configured or, if necessary, patched to run in a window by default. I would like to propose that we should change this policy.

Background: the two ways to be fullscreen
-----------------------------------------

Many games support running in a window-manager-managed window, and many games also support some sort of fullscreen mode, but fullscreen modes are not all equal.

Older games would typically implement fullscreen by doing a mode-switch to a configurable or hard-coded video mode (typically a 4:3 VESA mode like 800x600) using a mechanism like Xrandr, then creating a screen-sized window with no border that exactly fills the screen in the chosen mode. This is the closest available X11 equivalent for what Windows calls "exclusive fullscreen" [0][1]. On exit, assuming it hasn't crashed, the game would mode-switch back to the mode that was current when it started.

For example this is the only way the original Quake III Arena could be full-screen, and the ioquake3 engine used for our openarena and quake3 packages inherits support for this mechanism:

$ sudo apt install openarena
$ openarena +set r_mode 3 +set vid_fullscreen 1

The problems with exclusive/mode-switching fullscreen are:

- it doesn't work if your X11 display doesn't support the desired mode,
  or refuses to set/add the desired mode
- Wayland compositors will not always allow unprivileged apps to switch
  between modes
- it will often have undesired effects on multi-head layouts with more
  than one physical screen attached
- if the game crashes, then the original mode won't be restored,
  resulting in your desktop environment being in an unintended mode
  which might make it hard to use (particularly in low-res modes like
  640x480)
- if you Alt-Tab out of the game while playing, the desktop environment
  will similarly be in an unintended mode

Newer games typically implement fullscreen by leaving the video mode as-is, then creating a screen-sized window with no border that exactly fills the screen. This is the X11/Wayland equivalent of what Windows calls a "borderless fullscreen window" [0][1]. Depending on the game, it might internally draw at a lower resolution, then stretch the lower-resolution image to fill the screen, possibly with black borders (letterboxing or pillarboxing) to preserve an intended aspect ratio.

For example the ioquake3 engine adds support for borderless fullscreen by selecting a pseudo-mode numbered as -2:

$ sudo apt install openarena
$ openarena +set r_mode -2 +set vid_fullscreen 1

(notice how the menu adds black borders when drawn on a 16:9 screen to preserve its intended 4:3 ratio, but the OpenArena logo video and the actual gameplay fill the screen)

One of the functions of Valve's Gamescope utility[2] is to trick older games that were designed for exclusive fullscreen into running in a borderless fullscreen window, with input events scaled to match the geometry of the video mode that the game thinks it has successfully requested.

Current informal policy
-----------------------

I believe our current informal policy is: games should be configured or patched to run in a window, even if the upstream default was to run fullscreen; and running in fullscreen should only be the default if nothing else is available. (For example we apply https://sources.debian.org/src/ioquake3/1.36%2Bu20250316.526edd3%2Bdfsg-1/debian/patches/debian/Run-in-a-window-by-default-on-new-installations.patch to ioquake3)

If I understand correctly, the rationale for this policy was that games historically used exclusive fullscreen, and if a game crashes while in exclusive fullscreen, it leaves the desktop environment running in an unwanted mode. But that rationale doesn't apply any more when using a borderless fullscreen window.

Proposed policy
---------------

The policy I propose is:

Games should default to either a borderless fullscreen window or windowed, whichever is more appropriate for the specific game. In many cases, this will mean borderless fullscreen for better immersion. One factor that should influence this choice is the upstream default, and another relevant factor is whether the game preserves the intended aspect ratio for its graphics when running on screens of various aspect ratios (4:3, 16:9 and so on).

Exclusive fullscreen (mode switching) should only be the default if nothing else is available.

Concretely, this would mean that in for example ioquake3, https://sources.debian.org/src/ioquake3/1.36%2Bu20250316.526edd3%2Bdfsg-1/debian/patches/debian/Run-in-a-window-by-default-on-new-installations.patch would be replaced by a different patch that sets r_mode to -2 and r_fullscreen to 1 for new installations with both of the two available renderers.

Thoughts?

Thanks,
    smcv

----------------------------------------------------------------------

[0] https://www.pcgamingwiki.com/wiki/Glossary:Windowed
[1] Technically, exclusive fullscreen in Windows is something different where the game executable has/had direct scanout to the video hardware, but Linux/X11 never really implemented a close equivalent of Windows exclusive fullscreen: the closest thing we have is an equivalent of a Windows fullscreen window, plus optimizations that bypass the compositor to achieve exclusive-fullscreen-like performance if nothing is being drawn over the top of the game window at this moment.
[2] https://tracker.debian.org/pkg/gamescope in Debian


Reply to: