protonscr

How to exit steam inside gamescope properly?

steamopen Steam client
ValveSoftware/steam-for-linux#9495 · opened 2023-05-06 by Zocker1999NET · updated 2025-05-14 · 11 comments · github
ZZocker1999NET 2023-05-06 github

(don't know if the question is appropriate here, but I haven't found any better location)

I'm currently trying out gamescope inside my already running X11 session and it works flawless for most games and improves the experience with them. I launch steam (installed beta) as follows:

gamescope -W 2560 -H 1440 -r 165 -f -e -- steam -gamepadui -tenfoot

However, if I want to close Steam, my only option seems to be to CTRL+C the terminal I launched gamescope from, as inside of Steam, I only see the options "Shutdown system"/"Restart system"/"Suspend system", which I do not want to, and "Switch to desktop", which does nothing (most probably, because this option was built for the Steam Deck, and I'm trying to run this on my PC with an already setup Debian + KDE Plasma and so on.

Is there a way to close Steam / gamescope out of this scenario properly?

SSamsagax 2023-05-06 github

Try this on any other terminal:

$ steam -shutdown
OOpenBagTwo 2023-05-12 github

Seconding this. Why would gamescope integration remove the option to simply exit Steam?

ZZocker1999NET 2023-05-12 github

Seconding this. Why would gamescope integration remove the option to simply exit Steam?

It seems like with enabling the integration, Steam thinks its running on a Steam Deck and so provides the options "Shutdown", "Reboot", "Standby" and "Change to desktop" (forgot that first in the description above) to 'exit Steam'. However, "Change to desktop" does nothing on my machine because, reading from Steam's log, it tries to logout & change to the user "steamuser", which does not exist on my machine, as I'm not using Steam Deck's OS but a (self-configured) Debian.

SSamsagax 2023-05-15 github

Maybe this should be reported in the steam linux client repo.

For reference You can hijack the "Switch to desktop" button to just do a steam client exit like we do in our session: https://github.com/ChimeraOS/gamescope-session/blob/main/usr/bin/steamos-session-select

Kkisak-valve maintainer 2023-05-15 github

In general, it's better to give me a ping with a clear request to transfer the issue report instead of fragmenting the discussion of an issue across multiple issue trackers.

This issue reads like you're manually running the Steam client in a configuration that is consistent with the game mode seen on SteamOS, and the Steam client intentionally removes options that don't make sense there.

Rrcpoison 2023-07-26 github

For reference You can hijack the "Switch to desktop" button to just do a steam client exit like we do in our session:

Does that require additional environment variables?
Steam doesn't execute '/usr/bin/steamos-session-select' when choosing "Switch to desktop" on my setup.
I've tried to figure it out by reading though the gamescope-session sources but without any success.

EDIT: nvm, need to pass -steamos3 for it to work

Aammgws 2024-04-24 github

The link to the script above is broken but I created the following script (ensure it's on your $PATH and is executable):

>cat ~/.local/bin/steamos-session-select        
steam -shutdown

And added -steamos3 to my gamescope command as mentioned above:

gamescope --prefer-output HDMI-A-1,DP-2 \
  --output-width 1920 --output-height 1080 \
  --nested-width 1920 --nested-height 1080 \
  --fullscreen \
  --steam \
  -- steam -steamos3 -gamepadui

And now can exit Steam via "Switch to Desktop" in the power menu. Thanks all for the hints!

DDanMan 2024-09-17 github

Another workaround is starting Steam also with the -console switch which conveniently works with -tenfoot, too. In the console you can type quit and it will exit Steam.

?ghost 2025-02-26 github

Another workaround is starting Steam also with the -console switch which conveniently works with -tenfoot, too. In the console you can type quit and it will exit Steam.

Thank you for this. I changed my .desktop file to the following, and I can use exit through Steam console now.

[Desktop Entry]
Name=Steam Big Picture Mode
Comment=Start Steam in Big Picture Mode
Exec=/usr/bin/gamescope --adaptive-sync -W 1920 -H 1080 -e -- /usr/bin/steam -tenfoot -console
Type=Application
Uunknownsolo 2025-05-13 github

Replying to https://github.com/ValveSoftware/steam-for-linux/issues/9495#issuecomment-2074614285

This still works on Fedora 42, but only when you launch with -steamos3. It does not work with -tenfoot.