Bug 86158 - Analog Output blinks or resets with pop or stutter
Summary: Analog Output blinks or resets with pop or stutter
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-11 14:43 UTC by Chris
Modified: 2018-07-30 10:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
alsa-info MrNice same issue other hardware (46.18 KB, text/plain)
2014-11-26 09:07 UTC, MrNice
Details

Description Chris 2014-11-11 14:43:15 UTC
CentOS 7 x86_64
Asus P8Z68-V motherboard
Realtek ALC892
Gnome 3 desktop
nVidia GTX 770 with nVidia's driver

I have 3 devices I can choose from in Gnome's Sound Setting applet:

HDMI / DisplayPort2 - GK104 HDMI Audio Controller
Digital Output (S/PDIF) - Built-in Audio
Analog Output - Built-in Audio

I use Analog Output and sound is heard through the external speakers.

The volume icon on the top of the Gnome desktop blinks randomly and the sound skips at the same moment.  I've updated to the latest mainline kernel but the issue still persists.  It's like the application momentarily switches output devices.  When the disconnect/reconnect occurs, the blue selection bar that highlights which device you want to use for sound output "blinks" and a 4th output device is momentarily shown/removed.  The 4th device is "Headphones - Built-in Audio"

I've searched for a fix and the most promising leads didn't work:

options snd_hda_intel powersave=0 position_fix=1 or 2

I've tried disabling auto-muting in alsamixer... no luck

This card works flawlessly in Gnome 3 under archlinux, ubuntu, as well as Windows 7.  Something about CentOS?
Comment 1 Chris 2014-11-11 16:06:44 UTC
I spoke too soon... just booted up a Fedora 20 Live DVD and the exact same behavior is occuring.  Will investigate further.
Comment 2 Chris 2014-11-11 16:32:48 UTC
When I remove the speaker plug from the green socket in back of the motherboard, the listing for Line Out - Built-in Audio goes away and the problem is gone and I'm left still left with the nvidia HDMI and motherboard optical out choices.

If I have the speaker wire plugged in, and add a pair of headphones plugged into the front of the machine, the problem persists: Headphones - Built-in Audio is selected but the indicator will skip to Line Out - Built-in Audio for a split second.

If I remove the speaker wire from the green plug in back and use headphones up front, they work for a while and then the audio gets switched to SPDIF and it stays there until I manually switch it back...?

This is weird.
Comment 4 Chris 2014-11-11 17:57:27 UTC
I "fixed" it.  In the bios I selected AC97 for the front panel jacks and left the rear set as HD.  When I booted into CentOS, sound was stable and the controllers weren't fighting for control.  Now I have the following four items permanently displayed in my Gnome sound settings applet, even with the headphones unplugged:

HDMI/DisplayPort 2 - GK104 HDMI Audio Controller
Digital Output (S/PDIF) - Built-in Audio
Headphones - Built-in Audio
Analog Output - Built-in Audio

There is no jack sensing now: I manually select between which items I want and set the others to a zero output volume if I want... example: if I select headphones and insert a headphone into the front jack, I have to manually select Line out and set that to zero and switch back to headphones... but this is workable.
Comment 5 Chris 2014-11-11 18:03:34 UTC
(In reply to Raymond from comment #3)
> https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/
> pci/hda?id=1565cc358585be40608b46f18f7ac431a1aae2bc
> 
> 
> seem like jack detection bug

Yes... that could be it.  My device has id 8086:1c20

I'll head over to the alsa devel mailing list.  Sorry for all the noise I created here.
Comment 6 Raymond 2014-11-12 07:44:31 UTC
(In reply to Chris from comment #4)
> I "fixed" it.  In the bios I selected AC97 for the front panel jacks and
> left the rear set as HD.  When I booted into CentOS, sound was stable and
> the controllers weren't fighting for control.  Now I have the following four
> items permanently displayed in my Gnome sound settings applet, even with the
> headphones unplugged:
> 
> HDMI/DisplayPort 2 - GK104 HDMI Audio Controller
> Digital Output (S/PDIF) - Built-in Audio
> Headphones - Built-in Audio
> Analog Output - Built-in Audio
> 
> There is no jack sensing now: I manually select between which items I want
> and set the others to a zero output volume if I want... example: if I select
> headphones and insert a headphone into the front jack, I have to manually
> select Line out and set that to zero and switch back to headphones... but
> this is workable.

post output of 

pactl list

you have to check the connector of your front audio panel of conputer chassis

and front audio connector in the user manual of Asus P8Z68-V motherboard

http://www.intel.com/support/motherboards/desktop/sb/cs-015851.htm
Comment 7 MrNice 2014-11-23 18:19:12 UTC
Hi Raymond

I am looking for a fix for this bug for very long time (months!!!).
I'll fill my config but let me know if I need to open another thread.

MoBo: ASRock 970 Extreme4
VGA compatible controller: NVIDIA Corporation GF119 [GeForce GT 520]
Audio device: NVIDIA Corporation GF119 HDMI Audio Controller
Fedora 20 Mate 1.8.1

How to reproduce:
Unplug all analogue audio input/output jack from computer
Run Pulseaudio Volume Control
Look at Ports in Output Devices and Input Devices tabs.
Everything is stable.

In Input Devices select “Line In (unplugged)”
Plug a headphone jack in the front headphone socket output
Wait few seconds, Input port will change from “Line In (unplugged)” to “Front Microphone (plugged in)”.
Everything is stable.

Now plug a jack with a player in Line Input (light blue) socket.
Wait few seconds, Input port will change to “Line In (plugged In)”.
Open the arrow to look at the Ports. Front Microphone changed to unplugged. Select “Front Microphone (unplugged).
Wait 1 second, Input port will change to “Line In (plugged In)”.
Look at Port. Every 1/2 to 2 seconds the Port will show “Front Microphone (unplugged)” for 1/4 second and back to “Line In (plugged In)”.

Now plug a microphone jack in the front microphone socket.
Wait 1 second, Input port will change to “Front Microphone (plugged In)”.
Look at Port. Every 1/2 to 2 seconds the Port will show “Line In (plugged In)” for 1/4 second and back to “Front Microphone (plugged In)”.


I can see the flickers/blinks in PuVuCtl, Sound Preference, alsamixer.

Thank you to let me know what to do.
Comment 8 MrNice 2014-11-26 09:07:00 UTC
Created attachment 110042 [details]
alsa-info MrNice same issue other hardware

More hardware info:
description: Motherboard
product: 970 Extreme4
vendor: ASRock
description: BIOS
vendor: American Megatrends Inc.
version: P2.60
Comment 9 Raymond 2014-11-28 14:43:49 UTC
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/Documentation/sound/alsa/HD-Audio.txt

you can use hint and early patching to disable jack detection of all jacks or disable hp or line out to find out the problematic jack

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_realtek.c?id=b2c53e206967d01fd4fb6dd525f89ae738beb2e6

you need to enable tracepoint to filter out those unsol event of jack plug and unplug event to find out the cause
Comment 10 MrNice 2014-11-29 10:14:39 UTC
Thank you for your answer.

I am not good at all with Linux.
What I did
As root:
# echo jack_detect = no > /sys/class/sound/hwC0D0/hints

I can see the string in the file however when I run PuVuCtl I still have the issue.
Then as user:
$ pulseaudio --kill
$ pulseaudio --start

Unfortunately still the issue.
And when I reboot the string in the hints file is gone. It was expected...

So could you let me know with details how to disable the jack detection?
Same I'd be happy with details to determin the culpride; How to disable hp or line out to find out the problematic jack?
I don't know what to do with the link to "ALSA: hda - Disable Front HP jack detection on Gigabyte Z87X-UD3H"
And how to run tracepoint.

If you have some time and patience, we could try to debug this issue.
Thank you for your help
Comment 11 Raymond 2014-11-29 11:38:17 UTC
http://git.alsa-project.org/?p=alsa-tools.git;a=blob;f=hdajackretask/README;hb=HEAD

the easy way is to use hda-jack-retask advanced override and set as boot default

 to set bit 8 misc of pin default to 1 of the problematic jack (usually headphone jack) to indicate there is no jack detection circuit and driver disable the creation of jack detection control




http://voices.canonical.com/david.henningsson/2011/11/29/turn-your-mic-jack-into-a-headphone-jack/
Comment 12 MrNice 2014-11-29 15:22:11 UTC
Your answer is very clear, so I installed alsa-tools, read the doc and started hdajackretask.
When I want to "Apply now" I get the error message:
"Failed to create file '/home/mrnice/.pulse/client.conf.MRTYPX': No such file or directory"
I run Fedora 20 the path is ~/.config/pulse > hdajackretask has a bad path

I had a look at the code
http://git.alsa-project.org/?p=alsa-tools.git;a=blob;f=hdajackretask/apply-changes.c;h=aa291ce2d86eb3f86146d9a415dbd4a0196c3aba;hb=HEAD
See from line 110
and checked the env variable XDG_CONFIG_HOME => Not set.
So the path should be /.config/pulse.

But it's not working and I am stucked.
Could you help me again?
Comment 13 MrNice 2014-12-05 19:59:48 UTC
I managed to install alsa-tools 1.0.28-2.fc22.
It's working fine.

I have set front headphone and line in at "Not present" and now I don't have any blinks.

Let me know if you want more tests if you want to fix the issue.
I am happy with the workaround.
So, better a "working manual" than a "non working automatic".

Many thanks for your help.
Comment 14 Raymond 2014-12-08 08:08:28 UTC
(In reply to MrNice from comment #13)
> I managed to install alsa-tools 1.0.28-2.fc22.
> It's working fine.
> 
> I have set front headphone and line in at "Not present" and now I don't have
> any blinks.
> 
> Let me know if you want more tests if you want to fix the issue.
> I am happy with the workaround.
> So, better a "working manual" than a "non working automatic".
> 
> Many thanks for your help.

https://bugzilla.kernel.org/enter_bug.cgi?product=Drivers

this look like driver bug or hardware fault of your front audio panel which cannot provide correct jack state



do you still get correct jack state when hp is plugged and unplugged

hda-jack-sense-test -a
Comment 15 GitLab Migration User 2018-07-30 10:07:27 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/215.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.