Workaround for FATAL: cannot locate cpu MHz in /proc/cpuinf

I’ve seen mention of this error on this forum and wanted to let you know how I got past it. I don’t think I did this in the proper way, so I’d like to hear from others on what that proper way might be.

If you start an audio application that uses the jack audio server you will get this error and the app won’t work:

FATAL: cannot locate cpu MHz in /proc/cpuinfo

For me this happened with Supercollider. The jack2 audio server has fixed this issue with this checkin:

So, we just need to build and install a new jack2 library. This isn’t difficult, just see step3 here http://supercollider.github.io/development/building-beagleboneblack.html

Next, we need to get the old libjack out of the way. I found it was installed via this package: libjack-jackd2-0:armhf

But, removing that package via apt-get appeared to want to remove many, many dependent packages. That seemed like a bad idea. Instead, I found the libjack libraries in /usr/lib/arm-linux-gnueabihf and just moved them aside. After running

sudo ldconfig

then I was able to get Supercollider running for myself.

So, that’s how I got past this…is there a better way to do this?

When using distros, you should update packages, not individual binaries.

Usually I do that by checking from http://packages.ubuntu.com/ if there’s new enough version of the package in any Ubuntu version. If there is, get the sources with dget and rebuild with dpkg-buildpackage. That’s relatively easy and works often, although in some cases you’ll end up in a dependency hell.

Another way would be to get sources for the package using “apt-get source” and then adding that one patch to the package and rebuilding with dpkg-buildpackage. That of course assumes that the patch applies to the older version already in the distro.

Thank you for the response, kulve. I’ll look into your suggestions. In the meantime, I have written this bug to hopefully get this fixed officially.

It would help raise the priority if others seeing this issue would click the “this bug affects me” link.

I followed the same basic instructions from the beaglebone link and had the same issue with the old jack2 libraries still being picked up instead of the ones I compiled. I think this is fundamentally caused by the search priority for libraries not looking in /usr/local before looking in /usr.

Have a look at your /etc/ld.so.conf file. By default mine looked like this:

include /etc/ld.so.conf.d/*.conf

I think that causes the files under the /etc/ld.so.conf.d/ directory to get included in alphabetical order:

arm-linux-gnueabihf.conf ← this is where is where the path to the old libs is specified
arm-linux-gnueabihf_EGL.conf
arm-linux-gnueabihf_GL.conf
fakeroot-arm-linux-gnueabihf.conf
libc.conf ← this is where /usr/local/lib is specified
nvidia-tegra.conf

I found two different ways around this.

(1) edit /etc/ld.so.conf to look like this so that it picks up /usr/local/lib first.

/usr/local/lib
include /etc/ld.so.conf.d/*.conf

(2) The above worked for me, but I was still spooked by having multiple copies of the libs and executables lying around, so I used a slight modification to the instructions on the beaglebone page:

./waf configure --alsa --prefix=/usr --libdir=/usr/lib/arm-linux-gnueabihf

After the build, the install command will put the new executables and libs under /usr instead of /usr/local.

If anyone has troubles with the instructions so far (I for my part didnt quite get it at first reading this thread ^^) I found another site with instructions, which are pretty straight forward. The whole process takes 10 minutes and the error message does not appear any more. Also you dont need to remove any packages or dependencies.

(I did not test anything with an audio application though, for me this error appeared when using the “florence” virtual keyboard. Guess it is connected to florences abbility to make sounds when keys are pressed. Florence now works fine but I am not using audio, so I cannot say anything in that matter.)

https://gist.github.com/rogerallen/0346a1812deda2a380da

Just follow the instructions and it should work! ( What I encountered doing this:

  • At line 19 and 20 you need to download the repository from line 20 and copy the jackd2.patch into the folder where you are in the console, the info in line 19 is only there for information.
  • Also if the patch command says file to patch you need to type: "linux/JackLinuxTime.c" For some reason this file is not found automatically although it appears to be in the right place.

)

Hope this helps someone ;)
Best regards
Gerald

hello - the FLDigi or WSJTX Ham Radio Amateur Software got the same error with ‘cannot locate cpu MHz in /proc/cpuinfo’

ubuntu@tegra-ubuntu:/usr/bin$ ./wsjtx 
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Połączenie odrzucone (111)
bt_audio_service_open: connect() failed: Połączenie odrzucone (111)
bt_audio_service_open: connect() failed: Połączenie odrzucone (111)
bt_audio_service_open: connect() failed: Połączenie odrzucone (111)
ALSA lib pcm_dmix.c:961:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
FATAL: cannot locate cpu MHz in /proc/cpuinfo

how to fix this global in L4T 24.1 ?

I found that: [PATCH v2 1/2] ARM: delay: don't bother reporting bogomips in /proc/cpuinfo
and
QtMultimedia: FATAL: cannot locate cpu MHz in /proc/cpuinfo – The Red–black tree - but it no working in my case (FLdigi and WSJTX @ L4T 24.1 TK1)

cat /proc/cpuinfo

@L4T 24.1 (TK1)

processor	: 0
model name	: ARMv7 Processor rev 3 (v7l)
Features	: swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x3
CPU part	: 0xc0f
CPU revision	: 3

processor	: 1
model name	: ARMv7 Processor rev 3 (v7l)
Features	: swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x3
CPU part	: 0xc0f
CPU revision	: 3

processor	: 2
model name	: ARMv7 Processor rev 3 (v7l)
Features	: swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x3
CPU part	: 0xc0f
CPU revision	: 3

processor	: 3
model name	: ARMv7 Processor rev 3 (v7l)
Features	: swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x3
CPU part	: 0xc0f
CPU revision	: 3

Hardware	: jetson-tk1
Revision	: 0000
Serial		: 0177000045440000
Processor	: ARMv7 Processor rev 3 (v7l)

@Ubuntu 16.04 (64bit, Intel Q6600) :

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 15
model name	: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
stepping	: 11
microcode	: 0xba
cpu MHz		: 1596.000
cache size	: 4096 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 4
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm tpr_shadow vnmi flexpriority
bugs		:
bogomips	: 4775.63
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 15
model name	: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
stepping	: 11
microcode	: 0xba
cpu MHz		: 1596.000
cache size	: 4096 KB
physical id	: 0
siblings	: 4
core id		: 2
cpu cores	: 4
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm tpr_shadow vnmi flexpriority
bugs		:
bogomips	: 4775.63
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 2
vendor_id	: GenuineIntel
cpu family	: 6
model		: 15
model name	: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
stepping	: 11
microcode	: 0xba
cpu MHz		: 1596.000
cache size	: 4096 KB
physical id	: 0
siblings	: 4
core id		: 1
cpu cores	: 4
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm tpr_shadow vnmi flexpriority
bugs		:
bogomips	: 4775.63
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 15
model name	: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
stepping	: 11
microcode	: 0xba
cpu MHz		: 1596.000
cache size	: 4096 KB
physical id	: 0
siblings	: 4
core id		: 3
cpu cores	: 4
apicid		: 3
initial apicid	: 3
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm tpr_shadow vnmi flexpriority
bugs		:
bogomips	: 4775.63
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

Hello SQ7MRU, this question is a bit confusing, since you are mentioning L4T 24.1 which is not available for the Jetson TK1. Are you sure that this is the correct version?