[Bug 30038] New: Detect CPU speed by using sysctl "hw.clockrate" instead of "dev.cpu.0.freq"
http://bugs.winehq.org/show_bug.cgi?id=30038 Bug #: 30038 Summary: Detect CPU speed by using sysctl "hw.clockrate" instead of "dev.cpu.0.freq" Product: Wine Version: 1.4-rc5 Platform: x86 OS/Version: FreeBSD Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs(a)winehq.org ReportedBy: hardy.schumacher(a)gmx.de Classification: Unclassified In dlls/ntdll/nt.c cpu speed on FreeBSD is actually taken from sysctl "dev.cpu.0.freq". If the related value could not be found default value of 1GHz is used. Actually FreeBSD does not provide a sysctl variable "dev.cpu.0.freq". The actual speed of the cpu is stored in sysctl variable "hw.clockrate". Potential fix: Change in dlls/ntdll/nt.c (line 1181) --if (!sysctlbyname("dev.cpu.0.freq", &num, &len, NULL, 0)) +++if (!sysctlbyname("hw.clockrate", &num, &len, NULL, 0)) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30038 Dmitry Timoshkov <dmitry(a)baikal.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |minor --- Comment #1 from Dmitry Timoshkov <dmitry(a)baikal.ru> 2012-02-28 20:24:59 CST --- http://wiki.winehq.org/SendingPatches -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30038 --- Comment #2 from Dmitry Timoshkov <dmitry(a)baikal.ru> 2012-02-28 20:26:17 CST --- http://wiki.winehq.org/SubmittingPatches is correct url for reading how to send a patch for inclusion into Wine. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30038 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |78f82fa063bdbbe319eadb45772 | |5e28af6b1ca19 Status|UNCONFIRMED |RESOLVED Resolution| |FIXED Severity|minor |normal --- Comment #3 from Austin English <austinenglish(a)gmail.com> 2012-03-01 13:14:21 CST --- http://source.winehq.org/git/wine.git/commitdiff/78f82fa063bdbbe319eadb45772... Thanks for the report! -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30038 Gerald Pfeifer <gerald(a)pfeifer.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish(a)gmail.com, | |gerald(a)pfeifer.com --- Comment #4 from Gerald Pfeifer <gerald(a)pfeifer.com> 2012-03-01 13:56:34 CST --- Hmm, I see both sysctl variables on a system as old as FreeBSD 7 and as new as FreeBSD 10, across i386 and amd64: ref7-amd64:~> sysctl dev.cpu.0.freq dev.cpu.0.freq: 1861 ref7-amd64:~> sysctl hw.clockrate hw.clockrate: 1861 ref10-i386:~> sysctl dev.cpu.0.freq dev.cpu.0.freq: 1861 ref10-i386:~> sysctl hw.clockrate hw.clockrate: 1861 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30038 --- Comment #5 from Austin English <austinenglish(a)gmail.com> 2012-03-01 14:03:03 CST --- For me on FreeBSD9, amd64: freebsd9# sysctl dev.cpu.0.freq sysctl: unknown oid 'dev.cpu.0.freq' freebsd9# sysctl hw.clockrate hw.clockrate: 3079 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30038 --- Comment #6 from Gerald Pfeifer <gerald(a)pfeifer.com> 2012-03-01 14:17:12 CST --- Are you running on physical hardware or virtually, Austin and Hardy? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30038 --- Comment #7 from Hardy Schumacher <hardy.schumacher(a)gmx.de> 2012-03-01 14:31:15 CST --- I'm running on physical hardware a FreeBSD-9 i386. And the original variable is not available: sysctl dev.cpu.0.freq sysctl: unknown oid 'dev.cpu.0.freq' While the new variable is available: sysctl hw.clockrate hw.clockrate: 2399 Regards, Hardy -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30038 --- Comment #8 from Austin English <austinenglish(a)gmail.com> 2012-03-01 14:36:40 CST --- (In reply to comment #6)
Are you running on physical hardware or virtually, Austin and Hardy?
Mine is VirtualBox. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30038 --- Comment #9 from Gerald Pfeifer <gerald(a)pfeifer.com> 2012-03-01 20:43:04 CST --- Interesting, my tests were on physical hardware, and there I always found both. Indeed on a virtual instance dev.cpu.0.freq was missing. This is consisent with Austin's findings, but not Hardy's. In any case, it seems hw.clockrate really is the way to go -- we all always found that one. :-) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=30038 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #10 from Alexandre Julliard <julliard(a)winehq.org> 2012-03-02 13:02:01 CST --- Closing bugs fixed in 1.4-rc6. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org