Steam/TF2 CPU Throttle For Linux

Home Forums Steam On Linux Steam/TF2 CPU Throttle For Linux

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #65261
    Venn Stone
    Keymaster

    Steam using 100% CPU while running TF2? Well, slap it with a throttle.

    http://www.reddit.com/r/linux_gaming/comments/13oukl/psasteam_is_steam_utilizing_too_much_cpu_while/

    #!/bin/bash

    # Written by maccer_the_wanker <[email protected]>

    STEAMID=$(pidof steam)

    trap ‘echo “SIGINT: Interrupt catured. Restoring process”; kill -SIGCONT $STEAMID; exit 0; ‘ 2

    if [ -z “$STEAMID” ];

    then

    echo “Couldn’t detect Steam. Is it running?”

    exit 1

    else

    echo “Setting steam process to the lowest priority possible…”

    # set the lowest possible priority for steam, might not be a good idea since pauses might be longer than 16ms

    renice 19 -p $STEAMID

    fi

    # since the fps we want is 60, 1000 (ms ticks) divided by 60(fps) is 16.6ms

    # I approximate to 0.015 to minimize stuttering

    # Keep in mind calling these commands is an asynchronous task so we might want to lower our amount to sleep

    echo “Entering throttle section.”

    while true;

    do

    kill -SIGSTOP $STEAMID; sleep 0.015; kill -SIGCONT $STEAMID; sleep 0.015;

    done

    Paste the above in a text editor and save it (I used TF2Speed). chmod +x the file and run after starting Steam but before running Team fortress 2.
    #68299
    Amo
    Participant

    Will try it this weekend ^:)^

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.