protonscr

Steam Launch Options: Enable in-game Status for %command% Only

steamclosed Not a bug
ValveSoftware/steam-for-linux#6306 · opened 2019-06-05 by Myrddin-Wyllt · updated 2019-07-23 · 2 comments · github
MMyrddin-Wyllt 2019-06-05 github

Your system information

System information

Computer Information:
    Manufacturer:  Unknown
    Model:  Unknown
    Form Factor: Desktop
    No Touch Input Detected

Processor Information:
    CPU Vendor:  AuthenticAMD
    CPU Brand:  AMD Ryzen 7 1700 Eight-Core Processor          
    CPU Family:  0x17
    CPU Model:  0x1
    CPU Stepping:  0x1
    CPU Type:  0x0
    Speed:  3000 Mhz
    16 logical processors
    8 physical processors
    HyperThreading:  Supported
    FCMOV:  Supported
    SSE2:  Supported
    SSE3:  Supported
    SSSE3:  Supported
    SSE4a:  Supported
    SSE41:  Supported
    SSE42:  Supported
    AES:  Supported
    AVX:  Supported
    CMPXCHG16B:  Supported
    LAHF/SAHF:  Supported
    PrefetchW:  Unsupported

Operating System Version:
    "Manjaro Linux" (64 bit)
    Kernel Name:  Linux
    Kernel Version:  5.1.6-1-MANJARO
    X Server Vendor:  The X.Org Foundation
    X Server Release:  12005000
    X Window Manager:  compiz
    Steam Runtime Version:  jenkins-steam-runtime-beta-release_0.20190320.2

Video Card:
    Driver:  X.Org AMD Radeon (TM) RX 480 Graphics (POLARIS10, DRM 3.30.0, 5.1.6-1-MANJARO, LLVM 8.0.0)
    Driver Version:  4.5 (Compatibility Profile) Mesa 19.0.4
    OpenGL Version: 4.5
    Desktop Color Depth: 24 bits per pixel
    Monitor Refresh Rate: 60 Hz
    VendorID:  0x1002
    DeviceID:  0x67df
    Revision Not Detected
    Number of Monitors:  1
    Number of Logical Video Cards:  1
    Primary Display Resolution:  1920 x 1080
    Desktop Resolution: 1920 x 1080
    Primary Display Size: 31.50" x 17.72" (36.10" diag)
                                            80.0cm x 45.0cm (91.7cm diag)
    Primary VRAM: 4096 MB

Sound card:
    Audio device: ATI R6xx HDMI

Memory:
    RAM:  16053 Mb

Miscellaneous:
    UI Language:  English
    LANG:  en_US.UTF-8
    Total Hard Disk Space Available:  479199 Mb
    Largest Free Hard Disk Block:  393220 Mb
    VR Headset: None detected

Recent Failure Reports:


  • Steam client version (build number or date): jenkins-steam-runtime-beta-release_0.20190320.2 (May 22, 2019)
  • Distribution (e.g. Ubuntu): "Manjaro Linux" (64 bit)
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

I've been experimenting with Steam's Launch Options for various games, & I'd been seeking a way to automate replacing my window manager (i.e., for disabling v-sync/interference). I configured xfwm to disable desktop compositing, & the solution I came up with is as follows:

xfwm4 --replace & %command%; compiz ccp --replace --sm-disable --ignore-desktop-hints --loose-binding &

The problem involves how Steam tracks a user's in-game status. When I close the game, compiz is properly started; however, Steam will track that instance of compiz as part of the game's executable. To remove my in-game status, I need to restart the window manager. Because of this, I've resorted to using just:

xfwm4 --replace & %command%; killall xfwm4

Which is bad since I want compiz for my desktop use without manual intervention.

I see only three solutions for this issue. Enable in-game status for %command% only, add an option for executing programs after a game has closed (i.e., preferably global), or add a Steam URL to force resetting in-game status to null.

Steps for reproducing this issue:

  1. Set launch options to include a program which won't exit (e.g., a window manager)
  2. Open game with said launch options
  3. Close game & observe, the in-game status will remain even though the game is closed
Kkisak-valve maintainer 2019-06-05 github

Hello @Myrddin-Wyllt, calling a persistent window manager from Steam's per-game launch options sounds like an abuse of the flexibility that has been left in the implementation. I don't think it makes sense to expect a user has left the game if there are leftover child processes after the game closes down.

You might have luck with a launcher script with something like:

#!/bin/bash
xfwm4 --replace & #game-mode wm
steam steam://run/<appid>
while true; do
    sleep 15 #check if the game is running every 15 seconds
    if [ ! $(pidof <gamebinary>) ]; then
        compiz ccp --replace --sm-disable --ignore-desktop-hints --loose-binding & #desktop-mode wm
        exit 0
    fi
done
MMyrddin-Wyllt 2019-07-23 github

Thanks for the help, I and others appreciate this documentation!

Nothing extracted yet.