Bug 80821 - XPS 15 Headset Audio Noise
Summary: XPS 15 Headset Audio Noise
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
: 80811 (view as bug list)
Depends on:
Reported: 2014-07-21 13:11 UTC by Roland Jäger
Modified: 2015-06-25 13:02 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.16-rc6
Tree: Mainline
Regression: No

Noise fix (1.05 KB, text/x-python)
2014-07-21 13:11 UTC, Roland Jäger
3.15.6 alsa-info.sh --no-upload (4.52 KB, application/octet-stream)
2014-07-21 13:33 UTC, Roland Jäger
3.16-rc6 (40.97 KB, text/plain)
2014-07-21 13:42 UTC, Roland Jäger
3.16-rc6 (40.95 KB, text/plain)
2014-07-21 13:46 UTC, Roland Jäger
3.15.6 (37.19 KB, text/plain)
2014-07-21 13:51 UTC, Roland Jäger
3.16-rc6 (37.19 KB, text/plain)
2014-07-21 13:52 UTC, Roland Jäger
Test fix patch (791 bytes, patch)
2014-07-21 14:12 UTC, Takashi Iwai
Details | Diff
Test fix patch #2 (1.23 KB, patch)
2014-07-22 13:16 UTC, Takashi Iwai
Details | Diff

Description Roland Jäger 2014-07-21 13:11:19 UTC
Created attachment 143661 [details]
Noise fix


this is my first bug report so I hope I do everything right...

This should be probably redirected to:
David Henningsson

XPS 15

Ubuntu 14.04

The problem is the following:
Up until now (pre 3.16) I was able to workaround the bug by running a python script - the script is not working any more (because the recent audio changes).

The Bug:
When I plug my headphones in the jack I get static noise (CPU noise if you will). Everything works but has noise ...

The fix (pre 3.16):
The attached python script

Thank you for your great work (all of you)!
Comment 1 Roland Jäger 2014-07-21 13:21:36 UTC
*** Bug 80811 has been marked as a duplicate of this bug. ***
Comment 2 Takashi Iwai 2014-07-21 13:28:31 UTC
So, the analog loopback gives some wrong signal?  Then you could override mixer_nid=0 hint.  In anyway, please give alsa-info.sh outputs, preferably in both 3.15 and 3.16 kernels.  Run it with --no-upload option and attach to Bugzilla.
Comment 3 Roland Jäger 2014-07-21 13:33:30 UTC
Created attachment 143671 [details]
3.15.6 alsa-info.sh --no-upload
Comment 4 Roland Jäger 2014-07-21 13:34:01 UTC
Comment on attachment 143671 [details]
3.15.6 alsa-info.sh --no-upload

with the python script run (no noise)
Comment 5 Takashi Iwai 2014-07-21 13:37:41 UTC
Oh, no, just upload the single file made by "alsa-info.sh --no-upload", not the contents of the working directory...
Comment 6 Roland Jäger 2014-07-21 13:41:42 UTC
Actually the script works with 3.16 (I have no Idea why it didn't worked when I field the bug ...) but it would be nice if I wouldn't have to use the script! ;)
Comment 7 Roland Jäger 2014-07-21 13:42:21 UTC
Created attachment 143681 [details]

with noise fix
Comment 8 Roland Jäger 2014-07-21 13:46:40 UTC
Created attachment 143691 [details]

without the noise fix
Comment 9 Roland Jäger 2014-07-21 13:51:52 UTC
Created attachment 143701 [details]

without noise fix
Comment 10 Roland Jäger 2014-07-21 13:52:36 UTC
Created attachment 143711 [details]

with noise fix
Comment 11 Roland Jäger 2014-07-21 13:53:09 UTC
Comment on attachment 143711 [details]

Comment 12 Takashi Iwai 2014-07-21 13:56:34 UTC
What if you pass model=nofixup,nofixup option to snd-hda-intel module?
This will disable the existing fixup for headset jack.  I'd like to know whether the problem comes from the headset jack setup or it's a hardware-native problem.
Comment 13 Roland Jäger 2014-07-21 14:00:49 UTC
I'm not sure what you mean (I'm a beginner at this type of configuration - I found the script in a bug report)

I guess you want me to put following line in my /etc/modprobe.d/alsa-base.conf file:
options snd_hda_intel  model=nofixup,nofixup
Comment 14 Takashi Iwai 2014-07-21 14:06:52 UTC
Comment 15 Roland Jäger 2014-07-21 14:10:40 UTC
Reboot to:
Kernel 3.16-rc6

options snd_hda_intel  model=nofixup,nofixup


after script:
no noise
Comment 16 Takashi Iwai 2014-07-21 14:12:11 UTC
Then try the patch below (and clear model options again).
Comment 17 Takashi Iwai 2014-07-21 14:12:35 UTC
Created attachment 143731 [details]
Test fix patch
Comment 18 Roland Jäger 2014-07-21 14:16:15 UTC
How do I test a patch?
(just point me in the direction - do I have to compile the kernel source code?)
Comment 19 Takashi Iwai 2014-07-21 14:20:53 UTC
Yes, you need to build the kernel (or the module) by yourself.
Comment 20 Roland Jäger 2014-07-21 14:22:07 UTC
Ok - I will do that tomorrow - as it is 0:21 am (Oz).

Thank you so far!
Comment 21 Roland Jäger 2014-07-22 12:37:22 UTC
Well I tried to compile the kernel but when I use following command

sudo make modules_install install

it hangs at
DEPMOD  3.16.0-031600rc6-Pached+

Could you tell me what I do wrong - or what I can do different (I didn't find any good explanation on how to test it as module) 

Thank you!
Comment 22 Roland Jäger 2014-07-22 13:07:19 UTC
after 2 hours I got following message from the above command

Error! Bad return status for module build on kernel: 3.16.0-031600rc6-Pached+ (x86_64)
Comment 23 Roland Jäger 2014-07-22 13:12:25 UTC
well I booted into the kernel 
Linux eyenseo-XPS15 3.16.0-031600rc6-Pached+ #3 SMP Tue Jul 22 21:49:25 EST 2014 x86_64 x86_64 x86_64 GNU/Linux

but the noise is still there ...
Comment 24 Takashi Iwai 2014-07-22 13:16:21 UTC
Then try the patch below instead.  The existing fixup via pincfg might override the new fixup.  It has to be disabled.
Comment 25 Takashi Iwai 2014-07-22 13:16:49 UTC
Created attachment 143891 [details]
Test fix patch #2
Comment 26 Roland Jäger 2014-07-22 13:17:49 UTC
Is there a faster way to test this? or will I have to wait again 2h on the DEPMOD?
Comment 27 Roland Jäger 2014-07-22 13:35:05 UTC
I wasn't able to apply the patch trough git 
error: patch failed: sound/pci/hda/patch_realtek.c:5858
error: sound/pci/hda/patch_realtek.c: patch does not apply

Did it by hand and am now recompiling the kernel and installing it again
Comment 28 Takashi Iwai 2014-07-22 14:09:26 UTC
The patch is cleanly applicable to the latest Linus git tree.  You must have applied it wrongly.

Recompiling the kernel must be quick.  It just touches one file, so it'll take less than one minute.

And, you don't have to build all modules.  One good way to configure your kernel is to run "make localmodconfig" once.  Then it creates .config file that enables only the modules that are currently running on your system.
Comment 29 Roland Jäger 2014-07-22 14:12:30 UTC
yeah compiling is ok but
sudo make modules_install install
takes it's sweet time

If there is a next time I will try the localmodconfig - thank you!
Comment 30 Roland Jäger 2014-07-22 15:14:12 UTC
Boot into 
Linux eyenseo-XPS15 3.16.0-rc6+ #4 SMP Tue Jul 22 23:54:36 EST 2014 x86_64 x86_64 x86_64 GNU/Linux

No noise!
Comment 31 Roland Jäger 2014-07-24 02:31:24 UTC
Will this fix make it into 3.16?
Comment 32 Takashi Iwai 2014-07-24 10:07:17 UTC
No, it'll be in 3.17.
Comment 33 Takashi Iwai 2015-06-25 13:02:51 UTC
The recent kernel already contains the fix.  Feel free to reopen if you still see the problem.

Note You need to log in before you can comment on or make changes to this bug.