[GH-ISSUE #949] [CSGO] Tmux resume delay while hibernating (fix) #754

Closed
opened 2026-02-27 02:53:18 +03:00 by kerem · 13 comments
Owner

Originally created by @jach11 on GitHub (Jul 28, 2016).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/949

I've noticed a long time ago that when you attach to any tmux sessions that are being used by csgo there will be a delay on input in that session. I figured out that this is caused by the default configuration files setting sv_hibernate_when_empty to 1, which may annoy other people who haven't figured this out yet. You can also modify how many milliseconds to sleep per frame by using sv_hibernate_ms, if users want to keep the server in hibernation if there are no active players, but still be able to interact with console normally they should set sv_hibernate_ms to 5. I think by default lgsm-default.cfg for csgo should include sv_hibernate_when_empty 0 for ease of use.

Originally created by @jach11 on GitHub (Jul 28, 2016). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/949 I've noticed a long time ago that when you attach to any tmux sessions that are being used by csgo there will be a delay on input in that session. I figured out that this is caused by the default configuration files setting `sv_hibernate_when_empty` to `1`, which may annoy other people who haven't figured this out yet. You can also modify how many milliseconds to sleep per frame by using `sv_hibernate_ms`, if users want to keep the server in hibernation if there are no active players, but still be able to interact with console normally they should set `sv_hibernate_ms` to `5`. I think by default lgsm-default.cfg for csgo should include `sv_hibernate_when_empty 0` for ease of use.
kerem 2026-02-27 02:53:18 +03:00
Author
Owner

@UltimateByte commented on GitHub (Jul 28, 2016):

Hi,
Server hibernation by default is a good thing to keep in my opinion to save some CPU power in a lot of cases.
But, sv_hibernate_ms sounds like a good idea.
However "sv_hibernate_ms x # of milliseconds to sleep per frame while hibernating" > what the hell do they mean ? Does it hibernate more if you increase the value ? Is it useless under a certain value ? Is it freezing over a certain value ? We'd need to clarify that before.

<!-- gh-comment-id:235773860 --> @UltimateByte commented on GitHub (Jul 28, 2016): Hi, Server hibernation by default is a good thing to keep in my opinion to save some CPU power in a lot of cases. But, sv_hibernate_ms sounds like a good idea. However "sv_hibernate_ms x # of milliseconds to sleep per frame while hibernating" > what the hell do they mean ? Does it hibernate more if you increase the value ? Is it useless under a certain value ? Is it freezing over a certain value ? We'd need to clarify that before.
Author
Owner

@jach11 commented on GitHub (Jul 28, 2016):

It looks like it reduces the amount of ticks per second that the server handles as you increase the latency. If you set sv_hibernate_when_empty to 1 and sv_hibernate_ms to 0 it seems like it uses the same amount of CPU as if you had sv_hibernate_when_empty set to 0. So you have to assign a value to sv_hibernate_ms in order to decrease the amount of ticks that are updated per second, which should in turn lower CPU usage but it's almost negligible how much it actually saves. It seems like even adding an entire 100ms between each tick update saves only about 1% of CPU usage compared to having sv_hibernate_when_empty set to 0.

<!-- gh-comment-id:235795758 --> @jach11 commented on GitHub (Jul 28, 2016): It looks like it reduces the amount of ticks per second that the server handles as you increase the latency. If you set `sv_hibernate_when_empty` to `1` and `sv_hibernate_ms` to `0` it seems like it uses the same amount of CPU as if you had `sv_hibernate_when_empty` set to `0`. So you have to assign a value to `sv_hibernate_ms` in order to decrease the amount of ticks that are updated per second, which should in turn lower CPU usage but it's almost negligible how much it actually saves. It seems like even adding an entire 100ms between each tick update saves only about 1% of CPU usage compared to having `sv_hibernate_when_empty` set to `0`.
Author
Owner

@UltimateByte commented on GitHub (Jul 28, 2016):

OK, so that's about what i thought. But it still doesn't give a precise way to interpret it.
Do you know what's the default sv_hibernate_ms then ? So that we can lower it accordingly.

<!-- gh-comment-id:235870476 --> @UltimateByte commented on GitHub (Jul 28, 2016): OK, so that's about what i thought. But it still doesn't give a precise way to interpret it. Do you know what's the default sv_hibernate_ms then ? So that we can lower it accordingly.
Author
Owner

@jach11 commented on GitHub (Jul 28, 2016):

The default sv_hibernate_ms is 20

<!-- gh-comment-id:235994029 --> @jach11 commented on GitHub (Jul 28, 2016): The default `sv_hibernate_ms` is `20`
Author
Owner

@UltimateByte commented on GitHub (Aug 1, 2016):

And between sv_hibernate_ms 5 and sv_hibernate_ms 20, console still doesn't work properly ?

<!-- gh-comment-id:236606376 --> @UltimateByte commented on GitHub (Aug 1, 2016): And between `sv_hibernate_ms 5` and `sv_hibernate_ms 20`, console still doesn't work properly ?
Author
Owner

@jach11 commented on GitHub (Aug 2, 2016):

Having it set to sv_hibernate_ms 5 allows acceptable interaction with the console. Anything higher is extremely annoying, you can still use the console, but it's very annoying.

<!-- gh-comment-id:236766361 --> @jach11 commented on GitHub (Aug 2, 2016): Having it set to `sv_hibernate_ms 5` allows acceptable interaction with the console. Anything higher is extremely annoying, you can still use the console, but it's very annoying.
Author
Owner

@UltimateByte commented on GitHub (Aug 2, 2016):

Well
github.com/dgibbs64/linuxgsm@83492ed57c

Should do the trick then. :)

<!-- gh-comment-id:236769995 --> @UltimateByte commented on GitHub (Aug 2, 2016): Well https://github.com/dgibbs64/linuxgsm/commit/83492ed57cf665f762162d9fb1c2994d1cdc7df9 Should do the trick then. :)
Author
Owner

@UltimateByte commented on GitHub (Aug 2, 2016):

I'm noticing that csgo config is quite empty. Do you think about anything else that would be worth adding ?

<!-- gh-comment-id:236770433 --> @UltimateByte commented on GitHub (Aug 2, 2016): I'm noticing that csgo config is quite empty. Do you think about anything else that would be worth adding ?
Author
Owner

@jach11 commented on GitHub (Aug 2, 2016):

It might also be worth adding host_info_show 2 to allow game-trackers to query the server and host_players_show 2 to show what players are playing on that server, as well as host_name_store 1 to show the host name in queries as well. Most community servers will usually want to have this enabled by default. There are quite a few other things that could also be included, but it would require input from the user during installation.

<!-- gh-comment-id:236778353 --> @jach11 commented on GitHub (Aug 2, 2016): It might also be worth adding `host_info_show 2` to allow game-trackers to query the server and `host_players_show 2` to show what players are playing on that server, as well as `host_name_store 1` to show the host name in queries as well. Most community servers will usually want to have this enabled by default. There are quite a few other things that could also be included, but it would require input from the user during installation.
Author
Owner

@UltimateByte commented on GitHub (Aug 2, 2016):

Found some doc about it.
I'll add those with a comment.
https://www.gametracker.com/games/csgo/forum.php?thread=91691

Edit: Done github.com/dgibbs64/linuxgsm@cc4d103dad

<!-- gh-comment-id:236888621 --> @UltimateByte commented on GitHub (Aug 2, 2016): Found some doc about it. I'll add those with a comment. https://www.gametracker.com/games/csgo/forum.php?thread=91691 Edit: Done https://github.com/dgibbs64/linuxgsm/commit/cc4d103dad9505d0ed12813e16d4d95461df0064
Author
Owner

@jach11 commented on GitHub (Aug 2, 2016):

That looks good, it's sad that official documentation from valve is usually either outdated or hidden somewhere on an obscure page and people have to spend alot of time to figure things out.

<!-- gh-comment-id:236958868 --> @jach11 commented on GitHub (Aug 2, 2016): That looks good, it's sad that official documentation from valve is usually either outdated or hidden somewhere on an obscure page and people have to spend alot of time to figure things out.
Author
Owner

@UltimateByte commented on GitHub (Aug 2, 2016):

From what i know, there is no actual official documentation from valve. It's a wiki, so anyone can write it, as i did for Rust, because when i needed it, i found information in it to be quite poor.
https://developer.valvesoftware.com/wiki/Rust_Dedicated_Server

I think this is solved. If you got more suggestions for the default config, or even things that people might wanna change that we could put at their default value, don't hesitate to share it. :)

<!-- gh-comment-id:236993189 --> @UltimateByte commented on GitHub (Aug 2, 2016): From what i know, there is no actual official documentation from valve. It's a wiki, so anyone can write it, as i did for Rust, because when i needed it, i found information in it to be quite poor. https://developer.valvesoftware.com/wiki/Rust_Dedicated_Server I think this is solved. If you got more suggestions for the default config, or even things that people might wanna change that we could put at their default value, don't hesitate to share it. :)
Author
Owner

@lock[bot] commented on GitHub (Jul 19, 2018):

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:406188659 --> @lock[bot] commented on GitHub (Jul 19, 2018): This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#754
No description provided.