Gamescope/Gamemode for desktop?

Can/should I use gamescope launch commands in steam? Will this improve performance? If so, what is the proper installation method?

Here you can find an explanation:
https://wiki.archlinux.org/title/Gamescope

Thank you for that!

Still, the link seems to focus on the steamdeck, while I’m seeing posts like this where users are using it on a desktop pc to enable FSR on games that don’t support it, fixes for older games, & games that block alt-tabbing.

I haven’t found any discussions suggesting use on Bazzite.

Is there any reason to run it on bazzite? if so, is there a ujust script or instructions for installing on bazzite or other spin for desktop pc’s?

1 Like

You could use Bottles or Lutris to enable Gamescope.
I use Bottles myself. here is a picture of Gamescope settings.

1 Like

Very cool thank you.

1 Like

You can also enable Gamescope via Steam. In the properties for each game you can pass a command line the same way you would for enabling FSR in Desktop Steam.

This is for Gamemode:
gamemoderun gamescope –mangoapp -w 640 -h 380 -W 1920 -H 1080 -F fsr -f – %command%

Use this if you want Mangohud and Gamemode:
env MANGOHUD_CONFIG=”fsr,fps_value.gamemode” gamemoderun gamescope –mangoapp -w 640 -h 380 -W 1920 -H 1080 -F fsr -f – %command%

This is if you only want to enable FSR via desktop steam
WINE_FULLSCREEN_FSR=1 WINE_FULLSCREEN_FSR_MODE=ultra %command%

1 Like

Not sure if anyone else has the same weird needs that I do, but I move my PC around to different displays a bit and I have to update my launch options every time, which is very annoying. The three different contexts I use my PC with are:

  • at my desk (3440x1440@175hz w/ HDR and VRR)
  • on my living room TV (4k@120hz w/ HDR and VRR)
  • streaming, using my HDMI dummy plug with sunshine (1920x1200@60hz, no HDR or VRR)

I ended up writing a little bash script that constructs launch options based on what kscreen-doctor detects about your current display mode.

Note that this only works on KDE desktop, not Gnome or gamemode

#!/bin/bash

# Function to get the current active mode id for the enabled output
get_current_mode_id() {
  get_screen_info | jq -r '.outputs[] | select(.enabled == true) | .currentModeId'
}

# Function to get the active mode information (width, height, refresh rate) based on the mode id for the enabled output
get_mode_info() {
  local mode_id="$1"
  get_screen_info | jq -r --arg mode_id "$mode_id" '.outputs[] | select(.enabled == true) | .modes[] | select(.id == $mode_id) | {width: .size.width, height: .size.height, refresh: .refreshRate}'
}

# Function to get the HDR state of the enabled display
get_hdr_state() {
  get_screen_info | jq -r '.outputs[] | select(.enabled == true) | .hdr'
}

# Function to get the VRR (adaptive sync) state of the enabled display
get_vrr_state() {
  get_screen_info | jq -r '.outputs[] | select(.enabled == true) | .vrrPolicy'
}

# Function to get current screen information in JSON format
get_screen_info() {
  kscreen-doctor -j
}

# Extract width, height, and refresh rate from mode info for the enabled output
get_width() {
  echo "$1" | jq -r '.width'
}

get_height() {
  echo "$1" | jq -r '.height'
}

get_refresh_rate() {
  echo "$1" | jq -r '.refresh'
}

# Main script logic

# Get the current mode ID and mode info for the enabled display
mode_id=$(get_current_mode_id)
mode_info=$(get_mode_info "$mode_id")

# Extract width, height, and refresh rate from the mode info
KDE_WIDTH=$(get_width "$mode_info")
KDE_HEIGHT=$(get_height "$mode_info")
KDE_REFRESH=$(get_refresh_rate "$mode_info")

# Get HDR and VRR (adaptive sync) states for the enabled display
HDR_STATE=$(get_hdr_state)
VRR_STATE=$(get_vrr_state)

# Build the gamescope command with dynamic flags based on HDR and VRR support
gamescope_cmd="gamescope -W $KDE_WIDTH -H $KDE_HEIGHT -r $KDE_REFRESH --framerate-limit 175 --fullscreen --force-grab-cursor --mangoapp"

# Append HDR flag if HDR is supported and enabled
if [[ "$HDR_STATE" == "true" ]]; then
  gamescope_cmd="$gamescope_cmd --hdr-enabled"
fi

# Append VRR (adaptive sync) flag if supported
if [[ "$VRR_STATE" == 1 || "$VRR_STATE" == 2 ]]; then
  gamescope_cmd="$gamescope_cmd --adaptive-sync"
fi

# Output the environment variables and the gamescope command
echo "Screen Width: $KDE_WIDTH"
echo "Screen Height: $KDE_HEIGHT"
echo "Screen Refresh Rate: $KDE_REFRESH"
echo "HDR State: $HDR_STATE"
echo "VRR State: $VRR_STATE"
echo "Running: $gamescope_cmd"

# Run the constructed gamescope command
$gamescope_cmd -- "$@"

Then you can just set you launch options to gamescope-kde-dynamic-res %command%, assuming you name the bash script gamescope-kde-dynamic-res and have it in a location that’s in your PATH.

The script doesn’t rely on any extra utilities, so it should work on a vanilla bazzite KDE desktop installation.

3 Likes

I find gamescope is good at helping manage the actual game window. At least back in the day, fullscreen, running a resolution different from native desktop, and just games in general could have really weird integration with the desktop (i.e. alt-tabbing completely breaking the desktop). This seems to have gone down in recent years but I’m sure there are still plenty of scenarios where having the game window more “contained” is useful.

With bazzite there is no need to install gamescope as it is baked onto the image, but for other images there is a flatpak and thats how you would use it with other flatpaks such as lutris or bottles, but flatpak steam doesn’t seem to like this. How i fixed this was to run both steam and gamescope in an arch distrobox which works great!

I think there is not a lot of discussion about using it on desktop bazzite because generally the goal of gamescope has been to be used in gamemode.

Really I would think you would want to use gamescope to either better manage the game window where you can just kill the instance of gamescope rather then needing reset the entire DE shell. Or when you want to use the more fancy features such as HDR or FSR scaling.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.