How to fix “Unable to determine CPU Frequency” error in HLDS
If you are running HLDS on a Windows Server or you manage your server via FTP, you may never see this error throughout your life.
Since I am running HLDS on CentOS Virtual Machine (using Virtual Box), I occasionally see new errors like this one. The reason behind using VM is that CentOS is much stable as compared to Windows Server 2003/2008/2012 which is notorious for crashes and messy permission issues. The complete error message that I received on console was this:
Auto detecting CPU
Using Pentium II Optimised binary.
Auto-restarting the server on crash
Unable to open tty(/dev/tty) for output
Console initialized.
Using breakpad crash handler
Setting breakpad minidump AppID = 10
Forcing breakpad minidump interfaces to load
Unable to determine CPU Frequency. Try defining CPU_MHZ.
Everything else was running fine on that VM except HLDS. I ran cat /proc/cpuinfo
on Linux console and got this result:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Xeon(R) CPU X3440 @ 2.53GHz
stepping : 5
microcode : 1558
cpu MHz : 0.000
cache size : 6144 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 rdtscp constant_tsc up pni monitor ssse3
bogomips : 5066.83
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
As you can see, the “cpu MHz” is shown as “0.000” which is not normal.
This error was initially seen when I installed CentOS on VBox for the first time and ran HLDS binary. After spending many hours trying to figure out the problem, I came across this simple fix:
Open the VM’s settings and change Chipset to ICH9 in System tab.
In Storage tab, change Type to ICH6 and press Ok.
Now start the VM and type cat /proc/cpuinfo | grep "cpu MHz"
in Linux console. You should see something like this:
Your HLDS should be running fine now!