You are not logged in.

#1 2015-05-21 23:11:22

nonis
Member
Registered: 2009-05-20
Posts: 43

[solved-ish] Constant low-volume white noise / clicks from speakers

Bit of a weird problem with a laptop I'm setting up arch on. It's a 2015 Dell Inspiron 7348.

There's a constant noise coming from the speakers as long as I'm running linux. It's pretty low volume, sounds like white noise to me, but with intermittent short crackles/clicks. It's super quiet; I can barely hear the noise unless I put my ear to the speakers, but the crackles can be heard with the laptop on my desk or lap. It doesn't go away when I plug in headphones. Doesn't matter if I'm plugged in or on battery.

Sounds like interference to me. I've heard similar sounds coming from powered speakers when the cable is crossed with a mouse or keyboard cable, I think. (Maybe it's a coincidence but I've also noticed that one of my pairs of headphones picks up a bit of RFI when plugged into this laptop, too)

This seems like a hardware issue, so why am I posting on the Arch Linux Laptop Issues forum instead of contacting Dell? Well, this only occurs when I'm booted into linux. No noise when I'm in UEFI menus. No noise when I'm in Windows 8.1 (installed it just to check. =P) The noise starts during dmesg output.

I unloaded every module that comes up with 'lsmod | grep snd' and the noise is still there.

My thinking is that either the windows driver for the sound chip does something to negate the speaker noise, or some other component is interfering with the speakers but ONLY under linux.

Anyone have any ideas on where to start with something like this?

I'm tempted to just pop the bottom of the computer off and unplug the speakers from the main board, but that seems like cheating. =P

Last edited by nonis (2015-05-22 00:03:10)

Offline

#2 2015-05-21 23:17:43

nonis
Member
Registered: 2009-05-20
Posts: 43

Re: [solved-ish] Constant low-volume white noise / clicks from speakers

Just did a quick check and the same problem occurs if I boot into the live system I used to install arch from a usb stick.

Offline

#3 2015-05-21 23:32:59

mwillems
Member
Registered: 2014-08-09
Posts: 89

Re: [solved-ish] Constant low-volume white noise / clicks from speakers

Some windows audio drivers mute the outputs when the device is not in use.  You can test for this by playing music with long silent passages in it on the windows side.  If you hear your static during the quiet passages, then windows is just muting the outputs when nothing is playing.  If you can't hear the static during the music silences, then there's definitely something up on the Linux side.

Offline

#4 2015-05-21 23:34:44

nonis
Member
Registered: 2009-05-20
Posts: 43

Re: [solved-ish] Constant low-volume white noise / clicks from speakers

Eh... posted prematurely, I suppose.

Found a solution in the arch wiki page for the 2015 Dell XPS 13 (I figured it probably has the same or similar audio hardware). Somebody wrote a python2 script which apparently flips two bits in the hda driver to fix a loopback problem and although the wiki said it's a headphone-jack issue, the script fixed my speaker issue. Reposting the python script here:

#!/usr/bin/env python

import os
import struct
from fcntl import ioctl

def __ioctl_val(val):
  # workaround for OverFlow bug in python 2.4
  if val & 0x80000000:
    return -((val^0xffffffff)+1)
  return val

IOCTL_INFO = __ioctl_val(0x80dc4801)
IOCTL_PVERSION = __ioctl_val(0x80044810)
IOCTL_VERB_WRITE = __ioctl_val(0xc0084811)

def set(nid, verb, param):
  verb = (nid << 24) | (verb << 8) | param
  res = ioctl(FD, IOCTL_VERB_WRITE, struct.pack('II', verb, 0))  

FD = os.open("/dev/snd/hwC1D0", os.O_RDONLY)
info = struct.pack('Ii64s80si64s', 0, 0, '', '', 0, '')
res = ioctl(FD, IOCTL_INFO, info)
name = struct.unpack('Ii64s80si64s', res)[3]
if not name.startswith('HDA Codec'):
  raise IOError, "unknown HDA hwdep interface"
res = ioctl(FD, IOCTL_PVERSION, struct.pack('I', 0))
version = struct.unpack('I', res)
if version < 0x00010000:	# 1.0.0
  raise IOError, "unknown HDA hwdep version"

# initialization sequence starts here...

set(0x0c, 0x300, 0x5180) # 0x0c035180 (SET_AMP_GAIN_MUTE)
set(0x0c, 0x300, 0x6180) # 0x0c036180 (SET_AMP_GAIN_MUTE)

os.close(FD)

Not sure where it comes from or why it works, since I just found it on that wiki page, so I can't give any more valuable info than that. If anyone can provide greater detail, please do! big_smile

Last edited by nonis (2015-05-21 23:35:42)

Offline

#5 2015-05-21 23:40:30

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,793

Re: [solved-ish] Constant low-volume white noise / clicks from speakers

One thing I always ask in these cases -- do you have an audio input turned on that you are not using -- like a microphone? Mute your inputs and see if it helps.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2015-05-22 00:02:43

nonis
Member
Registered: 2009-05-20
Posts: 43

Re: [solved-ish] Constant low-volume white noise / clicks from speakers

@ewaller Thanks for the response. That's one of the first things I checked actually. I found a (temporary) solution, though, in the post above yours, in the form of a script that sorta fixes a driver bug. It's possibly fixed in the next kernel, though.

Offline

Board footer

Powered by FluxBB