LacledesLAN / gamesvr-csgo-freeplay

LL Counter-Strike GO Freeplay Server in Docker
https://hub.docker.com/r/lacledeslan/gamesvr-csgo-freeplay/
The Unlicense
4 stars 1 forks source link

Unable to determine CPU Frequency. Try defining CPU_MHZ. #18

Open mich1990 opened 1 year ago

mich1990 commented 1 year ago

I am trying to run it in docker on new MAC with apple silicone, how do I add this flag?

dudleycodes commented 1 year ago

@mich1990 which flag are you looking to add exactly? What's the name of the flag? Is it a Docker of CSGO flag?

If you're looking at the launch options flags of -refresh - that is a CSGO client specific as far as I can tell.

I know the CS:GO game client can run on apple silicone via Rosetta 2 -- but can the CSGO server run on it?

From quick Googling- I can find no references online, indicating how to tell the CSGO dedicated server how to set CPU_MHZ

mich1990 commented 1 year ago

@mich1990 which flag are you looking to add exactly? What's the name of the flag? Is it a Docker of CSGO flag?

If you're looking at the launch options flags of -refresh - that is a CSGO client specific as far as I can tell.

I know the CS:GO game client can run on apple silicone via Rosetta 2 -- but can the CSGO server run on it?

From quick Googling- I can find no references online, indicating how to tell the CSGO dedicated server how to set CPU_MHZ

michalmichalski@mm ~ % docker run --rm lacledeslan/gamesvr-csgo-freeplay ./ll-tests/gamesvr-csgo-freeplay.sh WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell

RUNNING TEST: gamesvr-csgo-freeplay-130427 Command: /app/srcds_run -game csgo +game_type 0 +game_mode 1 +map poolday -insecure -tickrate 128 -norestart +sv_lan 1 Running under uid=999(CSGOFreeplay) gid=0(root) groups=0(root)

0...terminated.

Boot error: Test process self-terminated

[LOGFILE OUTPUT] »» /app/srcds_run: 32: pushd: not found »» /app/srcds_run: 35: popd: not found »» LD_LIBRARY_PATH=/app/bin:/app:/app/bin: »» # »» #Console initialized. »» Setting breakpad minidump AppID = 740 »» #Using breakpad minidump system 740/13846.1529.DC »» Using breakpad crash handler »» Forcing breakpad minidump interfaces to load »» Unable to determine CPU Frequency. Try defining CPU_MHZ. »»
»» Unable to determine CPU Frequency. Try defining CPU_MHZ.

This is what I get when I run the self test command, its talking about defying the CPU_MHZ, I assumed it was a flag

dudleycodes commented 1 year ago

Unable to determine CPU Frequency. Try defining CPU_MHZ. This line is definitely not coming from the self-test script, but the CSGO server itself.

What happens if you fire up a Debian image and run the command cat /proc/cpuinfo?

mich1990 commented 1 year ago

This is what I get, looks like garbage unfortunately.

`processor : 0 BogoMIPS : 48.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint CPU implementer : 0x00 CPU architecture: 8 CPU variant : 0x0 CPU part : 0x000 CPU revision : 0

processor : 1 BogoMIPS : 48.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint CPU implementer : 0x00 CPU architecture: 8 CPU variant : 0x0 CPU part : 0x000 CPU revision : 0

processor : 2 BogoMIPS : 48.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint CPU implementer : 0x00 CPU architecture: 8 CPU variant : 0x0 CPU part : 0x000 CPU revision : 0

processor : 3 BogoMIPS : 48.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint CPU implementer : 0x00 CPU architecture: 8 CPU variant : 0x0 CPU part : 0x000 CPU revision : 0

processor : 4 BogoMIPS : 48.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint CPU implementer : 0x00 CPU architecture: 8 CPU variant : 0x0 CPU part : 0x000 CPU revision : 0`

dudleycodes commented 1 year ago

Interesting.

I'm not sure how exactly CSGO/SRCDS determines the CPU_MHZ in the first place, but it appears the HLDS (goldsrc engine) used the same mechanism. I found no reference to it in the srcds_run shell script.

Most Google results I've found involve changing VM settings, but this article seems promising: https://www.mh-internetblog.de/gaming/csgo-unable-to-determine-cpu-frequency-try-defining-cpu_mhz.html. I'm not sure what/where the steam.sh is, but you can most definitely try setting that environment var.

docker run -e CPU_MHZ='3200' --rm lacledeslan/gamesvr-csgo-freeplay ./ll-tests/gamesvr-csgo-freeplay.sh;

Does this work for you @mich1990?

I also have no idea how SRCDS uses the information. It might be purely a hold-over from the goldsrc days that doesn't do much, or it might be critical to the server determining how to process tickrate. So, if this does work, I recommend lots of experimentation and possibly fine-tuning. I would definitely set the value, based upon your the max MHZ of your specific M1/M2 chip, as the starting point. In any testing, I would also make sure to dig into what happens when the processor lowers/raises the clock speed while it is running.

Let us know what happens!

mich1990 commented 1 year ago

@dudleycodes thats very much for the suggestions! I will try to do them this week or early next week and get back to you. But also thinking to run in on a spare test kubernetes server we have that will have linux on the nodes already...