What advantage does this have over the native FPS counter in the steam client?
To be honest, having some sort of environment variable configuration either globally for all games, filter, or single games to alleviate having to re-edit launch script after game update would be a great step forward.
For what it's worth, I've been using the gallium hud with the per-game launch options in steam like passing any other env variable to a game: GALLIUM_HUD="fps" %command%
I'm lazy, so I only remove one % to break the pattern matching when I'm not doing a general profile.
Even though I've used %command% elsewhere it hadn't occurred to me to use it for this. I am glad I commented and got your response. Example for others with standard launch options mixed in.
GALLIUM_HUD="fps,cpu,GPU-load,VRAM-usage,draw-calls" GALLIUM_HUD_VISIBLE=false GALLIUM_HUD_TOGGLE_SIGNAL=10 %command% -console
Is there an other way to inject these commands to a steam game? because other than the default valve games and a few more many games on steam dont start using an sh file/dont have one especially games that start with a launcher
@papajo-r as a last resort, you could run steam itself with the environment variables set. They will get passed on to the games that steam launches.
@gdrewb-valve is there any update on this? It has been reviewed 2.5 years ago.
I know I'm a few months late @grmat - but GALLIUM_HUD is now supported as a Launch Option (dunno when it happened, just know it works). This goes for Native OpenGL titles like CSGO, Proton-enabled OpenGL titles like DOOM 2016 (of course, in OpenGL mode), and games being translated from DirectX to OpenGL by Proton, such as Call of Duty: World at War.
Simply put GALLIUM_HUD=[options] %command%.
This worked when I originally posted 3 years ago...and is what I wrote.
@SteveHeist yeah, I know that it works. The request was about adding options to Steam HUD UI settings, so users won't have to configure environment variables per-game and e.g. could set a global shortcut to toggle GALLIUM_HUD for all steam games instead. But anyway, thanks for trying to help.
Yeah, that would be nice :P
Also, sorry boomba - I misinterpreted it as you having had to make a bash script and pass that along as opposed to just putting the line in Launch Options. My bad.
Given the addition of the FPS counter to the Steam overlay it is clear such information is highly desired probably more so on Linux which has not seen as much development of game related tools. The open source openGL implementation provided by Mesa provides a hud that presents useful performance information. The hud can be controlled using the environment variable
GALLIUM_HUD(see http://www.mesa3d.org/envvars.html). I developed a patch to allow the hud to be toggle on and off at runtime which makes it more suitable for general use.By providing a simple toggle in the UI, just like the existing FPS counter, the more advanced GALLIUM_HUD could be utilized. An expert field could allow for control of what is placed in the variable with a default of something simple like just
fps. Since the Steam overlay is already aware of the game proccess ID it should be relatively simple to send a signal to the process (as Steam can also control the environment variable that determine which signal is attached).An example of a more detailed HUD listening for SIGUSR1:
This can be added to the top
hl2.shfor Valve games.A keyboard shortcut can be configured to toggle by issuing the following command.
Granted the above command only works in an X environment, but that generally works prior to Steam supporting. Steam would not require such a roundabout approach.
Note that the toggle feature is only present in Mesa 11.1.0-rc1 and beyond so Steam should check for such versions.
For a quick demo of hud:
I created a video demonstration: https://www.youtube.com/watch?v=6RUE9rOvDEw.