Team Fortress 2
[Linux] Can't adjust Gamma/Brightness
Hi dudes. I have Team Fortress running OK (with nouveau drivers, hu-ha!), but i've got a little and annoying problem: i can't increase the Gamma. Game looks too dark, VERY dark. I setted up gamma level to maximum and it doesn't change. Also i setted the gamma to the minimum level and doesn't change.

Any idea? Thanks!
< >
Showing 1-5 of 5 comments
Жлоб Jan 4, 2015 @ 4:34am 
Still not fixed!
Long Ago [Linux] Jan 4, 2015 @ 5:28am 
I have never tried adjusting gamma in any game. Does your monitor itself have brightness and contrast settings. I use an HDTV as monitor and use DVE (Digital Video Essentials) DVD or BlueRay to initially adjust it in general.

Which Linux distribution are you running and what video card/chip? There may still be alternate nvidia 173 drivers available for older cards, but the 96 driver for really old cards might not be in current Linux versions.

I have been running Linux Steam in 64-bit Ubuntu 12.04 with GTX 550 Ti using various nvidia drivers @ 1080p since Jan 2013, but recently upgraded to 64-bit Ubuntu 14.04 with GTX 750 Ti using nvidia 346 drivers from ppa repo.

Nouveau or some older nvidia drivers may not support the new Maxwell chip in GTX 750 or 9xx series cards. I discovered that when installing 14.04 and the old 304 driver of nvidia-current package did not work.
EnforcerZhukov Jan 4, 2015 @ 6:52am 
I don't know, i changed a long time ago my GPU, now I use an AMD HD7870 but ironically, Steam doesn't start under Linux with the AMD drivers :V
hawkield Jan 24, 2018 @ 12:43am 
Hey! I know this thread is old. So I recently found a solution to those facing the problem. So what you need to do is:

1. Install xrandr
2. go to your tf2 directory
~/.local/share/Steam/steamapps/common/Team Fortress 2/
and edit the file hl2.sh then add the line:
xrandr --output output_name --gamma 1.6:1.6:1.6
just above
STATUS = 42
3. and then add
xrandr --output output_name --gamma 1:1:1
above
exit $STATUS

------------------------------------------------------------------------------------------------------------------------------------------
You can find your output_name by running:
$ xrandr
-------------------------------------------------------------------------------------------------------------------------------------------
Here is my file incase you need referencing:

#!/bin/bash # figure out the absolute path to the script being run a bit # non-obvious, the ${0%/*} pulls the path out of $0, cd's into the # specified directory, then uses $PWD to figure out where that # directory lives - and all this in a subshell, so we don't affect # $PWD GAMEROOT=$(cd "${0%/*}" && echo $PWD) #determine platform UNAME=`uname` if [ "$UNAME" == "Darwin" ]; then # Workaround OS X El Capitan 10.11 System Integrity Protection (SIP) which does not allow # DYLD_INSERT_LIBRARIES to be set for system processes. if [ "$STEAM_DYLD_INSERT_LIBRARIES" != "" ] && [ "$DYLD_INSERT_LIBRARIES" == "" ]; then export DYLD_INSERT_LIBRARIES="$STEAM_DYLD_INSERT_LIBRARIES" fi # prepend our lib path to LD_LIBRARY_PATH export DYLD_LIBRARY_PATH="${GAMEROOT}"/bin:$DYLD_LIBRARY_PATH elif [ "$UNAME" == "Linux" ]; then # prepend our lib path to LD_LIBRARY_PATH export LD_LIBRARY_PATH="${GAMEROOT}"/bin:$LD_LIBRARY_PATH fi if [ -z $GAMEEXE ]; then if [ "$UNAME" == "Darwin" ]; then GAMEEXE=hl2_osx elif [ "$UNAME" == "Linux" ]; then GAMEEXE=hl2_linux fi fi ulimit -n 2048 # enable nVidia threaded optimizations export __GL_THREADED_OPTIMIZATIONS=1 # and launch the game cd "$GAMEROOT" # Enable path match if we are running with loose files if [ -f pathmatch.inf ]; then export ENABLE_PATHMATCH=1 fi # Do the following for strace: # GAME_DEBUGGER="strace -f -o strace.log" # Do the following for tcmalloc # LD_PRELOAD=../src/thirdparty/gperftools-2.0/.libs/libtcmalloc_debug.so:$LD_PRELOAD #gamma correction xrandr --output HDMI-1 --gamma 1.6:1.6:1.6 #play with values if required STATUS=42 while [ $STATUS -eq 42 ]; do if [ "${GAME_DEBUGGER}" == "gdb" ] || [ "${GAME_DEBUGGER}" == "cgdb" ]; then ARGSFILE=$(mktemp $USER.hl2.gdb.XXXX) echo b main > "$ARGSFILE" # Set the LD_PRELOAD varname in the debugger, and unset the global version. This makes it so that # gameoverlayrenderer.so and the other preload objects aren't loaded in our debugger's process. echo set env LD_PRELOAD=$LD_PRELOAD >> "$ARGSFILE" echo show env LD_PRELOAD >> "$ARGSFILE" unset LD_PRELOAD echo run $@ >> "$ARGSFILE" echo show args >> "$ARGSFILE" ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} -x "$ARGSFILE" rm "$ARGSFILE" else ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@" fi STATUS=$? done xrandr --output HDMI-1 --gamma 1:1:1 exit $STATUS
Last edited by hawkield; Jan 24, 2018 @ 12:49am
Spider Pig ☆ Dec 21, 2019 @ 2:02pm 
Originally posted by hawkield:
Hey! I know this thread is old. So I recently found a solution to those facing the problem. So what you need to do is:

1. Install xrandr
2. go to your tf2 directory
~/.local/share/Steam/steamapps/common/Team Fortress 2/
and edit the file hl2.sh then add the line:
xrandr --output output_name --gamma 1.6:1.6:1.6
just above
STATUS = 42
3. and then add
xrandr --output output_name --gamma 1:1:1
above
exit $STATUS

------------------------------------------------------------------------------------------------------------------------------------------
You can find your output_name by running:
$ xrandr
-------------------------------------------------------------------------------------------------------------------------------------------
Here is my file incase you need referencing:

#!/bin/bash # figure out the absolute path to the script being run a bit # non-obvious, the ${0%/*} pulls the path out of $0, cd's into the # specified directory, then uses $PWD to figure out where that # directory lives - and all this in a subshell, so we don't affect # $PWD GAMEROOT=$(cd "${0%/*}" && echo $PWD) #determine platform UNAME=`uname` if [ "$UNAME" == "Darwin" ]; then # Workaround OS X El Capitan 10.11 System Integrity Protection (SIP) which does not allow # DYLD_INSERT_LIBRARIES to be set for system processes. if [ "$STEAM_DYLD_INSERT_LIBRARIES" != "" ] && [ "$DYLD_INSERT_LIBRARIES" == "" ]; then export DYLD_INSERT_LIBRARIES="$STEAM_DYLD_INSERT_LIBRARIES" fi # prepend our lib path to LD_LIBRARY_PATH export DYLD_LIBRARY_PATH="${GAMEROOT}"/bin:$DYLD_LIBRARY_PATH elif [ "$UNAME" == "Linux" ]; then # prepend our lib path to LD_LIBRARY_PATH export LD_LIBRARY_PATH="${GAMEROOT}"/bin:$LD_LIBRARY_PATH fi if [ -z $GAMEEXE ]; then if [ "$UNAME" == "Darwin" ]; then GAMEEXE=hl2_osx elif [ "$UNAME" == "Linux" ]; then GAMEEXE=hl2_linux fi fi ulimit -n 2048 # enable nVidia threaded optimizations export __GL_THREADED_OPTIMIZATIONS=1 # and launch the game cd "$GAMEROOT" # Enable path match if we are running with loose files if [ -f pathmatch.inf ]; then export ENABLE_PATHMATCH=1 fi # Do the following for strace: # GAME_DEBUGGER="strace -f -o strace.log" # Do the following for tcmalloc # LD_PRELOAD=../src/thirdparty/gperftools-2.0/.libs/libtcmalloc_debug.so:$LD_PRELOAD #gamma correction xrandr --output HDMI-1 --gamma 1.6:1.6:1.6 #play with values if required STATUS=42 while [ $STATUS -eq 42 ]; do if [ "${GAME_DEBUGGER}" == "gdb" ] || [ "${GAME_DEBUGGER}" == "cgdb" ]; then ARGSFILE=$(mktemp $USER.hl2.gdb.XXXX) echo b main > "$ARGSFILE" # Set the LD_PRELOAD varname in the debugger, and unset the global version. This makes it so that # gameoverlayrenderer.so and the other preload objects aren't loaded in our debugger's process. echo set env LD_PRELOAD=$LD_PRELOAD >> "$ARGSFILE" echo show env LD_PRELOAD >> "$ARGSFILE" unset LD_PRELOAD echo run $@ >> "$ARGSFILE" echo show args >> "$ARGSFILE" ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} -x "$ARGSFILE" rm "$ARGSFILE" else ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@" fi STATUS=$? done xrandr --output HDMI-1 --gamma 1:1:1 exit $STATUS

Works perfectly!!!!!
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: Jun 6, 2013 @ 1:03pm
Posts: 5