[LAU] [SOLVED] Crackles in audio, drifting intermittent noise etc.

Joakim Hernberg jhernberg at alchemy.lu
Wed Nov 30 20:05:16 UTC 2016


On Tue, 29 Nov 2016 20:02:25 -0500
termtech <termtech at rogers.com> wrote:

> Fascinating! ANY one or two of the cores are OK, 
>  yet ANY three or all four of them causes the noises.

Don't know what CPU you have, but sounds like SMT (hyperthreading isn't
working well for you?

On my i7-2600k I've never seen problems with it.  You could try to
disable it in the BIOS, or try these scripts for turning SMT on and off:

$ cat bin/smt-off
#!/bin/bash

  # Be careful to not skip the space at the beginning nor the end
  CPUS_TO_SKIP=" $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | sed 's/[^0-9].*//' | sort | uniq | tr "\r\n" "  ") "

  for CPU_PATH in /sys/devices/system/cpu/cpu[0-9]*; do
      CPU="$(echo $CPU_PATH | tr -cd "0-9")"
      echo "$CPUS_TO_SKIP" | grep " $CPU " > /dev/null
      if [ $? -ne 0 ]; then
          echo 0 > $CPU_PATH/online
      fi
  done

$ cat bin/smt-on
#!/bin/bash

  # Be careful to not skip the space at the beginning nor the end
  CPUS_TO_SKIP=" $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | sed 's/[^0-9].*//' | sort | uniq | tr "\r\n" "  ") "

  for CPU_PATH in /sys/devices/system/cpu/cpu[0-9]*; do
      CPU="$(echo $CPU_PATH | tr -cd "0-9")"
      echo "$CPUS_TO_SKIP" | grep " $CPU " > /dev/null
      if [ $? -ne 0 ]; then
          echo 1 > $CPU_PATH/online
      fi
  done

-- 

   Joakim


More information about the Linux-audio-user mailing list