[2.1.1] CPU speed detection under Linux

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany
Contact:

[2.1.1] CPU speed detection under Linux

Post by Hirogen2 »

CPU speed detection seems borked on Linux:

Code: Select all

18:32 shanghai:../BUILD/zdoom-2.1.1 > zdoom
 adding /usr/src/packages/BUILD/zdoom-2.1.1/zdoom.pk3
 adding /usr/share/zdoom/doom2.wad (2919 lumps)
CPU Speed: ~0.038825 MHz
CPU Vendor ID: AuthenticAMD
  Name: AMD Athlon(tm) XP 2000+
  Family 6 (7), Model 8, Stepping 0
  Features: MMX MMX+ SSE 3DNow! 3DNow!+
0.03 MHz cannot be. For the record, CONFIG_HZ=100 here. The real thing is

Code: Select all

18:34 shanghai:../BUILD/zdoom-2.1.1 > cat /proc/cpuinfo 
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 8
model name      : AMD Athlon(tm) XP 2000+
stepping        : 0
cpu MHz         : 1666.747
cache size      : 256 KB
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts
bogomips        : 3335.23
User avatar
Siggi
Posts: 3288
Joined: Sun Oct 03, 2004 8:57 am
Preferred Pronouns: They/Them
Location: South Africa

Post by Siggi »

I'm also having this.
Ussualy it reports my CPU speed to be 1000mhz, when it's really 1800mhz (sempron 3000+).
Sometimes it shows it as 0.03mhz.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

It's only used for some statistics timers that are normally offscreen. I've also known for years that it won't work properly on systems that change the processor's frequency on demand, but that hasn't motivated me to do anything about it.

If you'd like to see this fixed, feel free to write a better routine yourself. I'd be happy to use it.
Post Reply

Return to “Closed Bugs [GZDoom]”