LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 06-11-2020, 02:12 PM   #1
AnthonyL
LQ Newbie
 
Registered: Jun 2020
Posts: 10

Rep: Reputation: Disabled
Recent Pulse Audio output oddity


Running (K)Ubuntu 18.04 LTS on HP Elitebook 8440p dual boot with Win10. PulseAudio, everything installed via Discover.

Play audio with nothing connected - sound through internal speakers - ok

Plug headphone in, all software shows the headphones are now connected - no sound at all

Change output from Headphone to Speaker and I get sound in the headphones as desired.

Unplug or reboot and have to repeat process.

This is a consistent anomaly that after 12+ months of working ok has just manifested itself in the past few weeks and first notices on a Zoom session when I couldn't hear anybody. The last Zoom session was fine once I forced headphone=speaker.

There has to be a configuration system file that has a stuck/corrupt setting and help would be much appreciated.
 
Old 06-11-2020, 05:33 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,837

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
Try removing the existing user pulseaudio config...
Code:
rm -r ~/.config/pulse; pulseaudio -k
More info...
https://wiki.ubuntu.com/PulseAudio#U...28and_later.29

Any difference?
 
Old 06-12-2020, 03:00 AM   #3
AnthonyL
LQ Newbie
 
Registered: Jun 2020
Posts: 10

Original Poster
Rep: Reputation: Disabled
Unfortunately not. I had already a week or so ago executed:

Code:
mv  ~/.config/pulse/ ~/.config/pulse_old/
which is perhaps a safer way, minus the 'kill'. But nonetheless I used your suggestion exactly and there is no change.
 
Old 06-12-2020, 04:01 AM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,837

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
It is a strange issue. Is it just a simple case of speaker/headphone outputs transposed?

What is shown by the following command
Code:
pactl list | grep 'Active Port.*output.*'
a) before the headphones are plugged in?
b) after the headphones are plugged in?

You might also be able to generate some useful diagnostic info in a terminal with
Code:
pulseaudio -k && pulseaudio -vvv
Observe/capture the output from before plugging in the headphones, selecting the speaker output (to get sound), and finally unplugging the headphones again.

Last edited by ferrari; 06-12-2020 at 04:03 AM.
 
Old 06-12-2020, 05:55 AM   #5
AnthonyL
LQ Newbie
 
Registered: Jun 2020
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
It is a strange issue. Is it just a simple case of speaker/headphone outputs transposed?

What is shown by the following command
Code:
pactl list | grep 'Active Port.*output.*'
a) before the headphones are plugged in?
b) after the headphones are plugged in?

You might also be able to generate some useful diagnostic info in a terminal with
Code:
pulseaudio -k && pulseaudio -vvv
Observe/capture the output from before plugging in the headphones, selecting the speaker output (to get sound), and finally unplugging the headphones again.
It is not simply that speaker and headphones are transposed as internal speakers work with nothing connected. Headphones only work after connection and then being instructed to use speaker output. I'll hasten to add that all works as it should when I boot up and into Windows 10, but then it all used to work anyway.

Outputs of tests:

1) Nothing connected:
~$ pactl list | grep 'Active Port.*output.*'
Active Port: analog-output-speaker
2) Headphone connected
~$ pactl list | grep 'Active Port.*output.*'
Active Port: analog-output-headphones
But no sound either from speakers or headphones
3) Now set output to Speakers in System Settings
~$ pactl list | grep 'Active Port.*output.*'
Active Port: analog-output-speaker
Sound comes out of headphones

I'm not sure that I'm seeing any differences in the outputs of:

Code:
pulseaudio -k && pulseaudio -vvv
This is the output with as per Test2 above (headphones but no sound and the first 2 lines and the last are in all three tests. I don't understand enough to know which lines are important.

Code:
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: RealtimeKit worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 11.1
D: [pulseaudio] main.c: Compilation host: x86_64-pc-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/pulseaudio-Ytpi3P/pulseaudio-11.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
D: [pulseaudio] main.c: Running on host: Linux x86_64 5.0.0-36-generic #39~18.04.1-Ubuntu SMP Tue Nov 12 11:09:50 UTC 2019
D: [pulseaudio] main.c: Found 4 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is 448c2d6ad9df4a619a1f3bdc188891d0.
I: [pulseaudio] main.c: Session ID is 3.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/al/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-11.1/modules.
I: [pulseaudio] main.c: Running in system mode: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.

Last edited by AnthonyL; 06-12-2020 at 07:02 AM. Reason: Correction to spelling of Test2
 
Old 06-12-2020, 02:23 PM   #6
AnthonyL
LQ Newbie
 
Registered: Jun 2020
Posts: 10

Original Poster
Rep: Reputation: Disabled
This maybe off the track but I note I have a whole load of new .conf files in /usr/share/pulseaudio/alsa-mixer/paths.
The files are dated 14/05/2020 06.20 but I don't know when they were installed but my Headphone issue started towards the end of May.
 
Old 06-12-2020, 05:43 PM   #7
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,837

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
Quote:
It is not simply that speaker and headphones are transposed as internal speakers work with nothing connected. Headphones only work after connection and then being instructed to use speaker output. I'll hasten to add that all works as it should when I boot up and into Windows 10, but then it all used to work anyway.

Outputs of tests:

1) Nothing connected:
~$ pactl list | grep 'Active Port.*output.*'
Active Port: analog-output-speaker
2) Headphone connected
~$ pactl list | grep 'Active Port.*output.*'
Active Port: analog-output-headphones
But no sound either from speakers or headphones
3) Now set output to Speakers in System Settings
~$ pactl list | grep 'Active Port.*output.*'
Active Port: analog-output-speaker
Sound comes out of headphones
Ok, thanks for the requested information. Always of benefit to get solid definitive information when trying to help from a distance.

It is what I'd expect for a functioning system, so we need to look elsewhere. A likely PullseAudio issue though.

Quote:
This maybe off the track but I note I have a whole load of new .conf files in /usr/share/pulseaudio/alsa-mixer/paths. The files are dated 14/05/2020 06.20 but I don't know when they were installed but my Headphone issue started towards the end of May.
That is one line of investigation that turns up in online searches for similar symptoms, so could well be relevant here. This regression may well take a bug report to resolve.
 
Old 06-12-2020, 06:19 PM   #8
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,837

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
IMHO, the files in question (based on your pactl output) are /usr/share/pulseaudio/alsa-mixer/paths/analog-output-speaker.conf and /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf perhaps. They're lengthy, so best shared via pastebin or similar. I'll share mine for reference (they're dated Dec 18 2018)...

https://pastebin.com/ep8EsdVt

https://pastebin.com/emHVZ1Mh

See if anything differs with yours.
 
Old 06-13-2020, 02:59 AM   #9
AnthonyL
LQ Newbie
 
Registered: Jun 2020
Posts: 10

Original Poster
Rep: Reputation: Disabled
I've uploaded the two files as suggested:

https://pastebin.com/wGaG0PRp
https://pastebin.com/S5Y8g10V

There are of course many other similarly name .conf files in that folder.

I'll try and compare with yours later in the day but I thought I'd get this out whilst you antipodeans are awake.

At the risk of obfuscating the issue, which has happened when I've posted on other forums, I'll add some background as there may be more clues in there and you may also be in a position to comment.

Firstly I'm a fairly recent Linux user and I'm not young - not a good combination.

I have a project in hand to convert all my analogue (Reel-Reel, Cassettes & Vinyl) to digital and had capture all into Audacity projects on a Windows machine. I've copied all the Vinyl projects to Linux, albeit to a Shared NTFS partition which contains most of my data. So a few weeks ago I started testing cataloging and outputting as mp3 (though Audacity has inconsistencies in ID3 tags), and trying to determine which player I'd prefer over and above VLC (Rhythmbox is winning). All this started about 6 weeks ago and coincided with my hobby group trying to setup a Teams meeting and then swapping to Zoom and I was delighted that both installed fine. My internal mics and speakers aren't brilliant and I prefer earphones so I used those. I also have the USB sound card (quite old) that I used to digitise the analogue and I tried that which gave better sound through the headphones. Sometime during the course of all this I've had Audacity hang. I can't be sure I've always managed to put the right jack in the right socket (whatever happened to the nice Pink and Green; black isn't cool!). One Zoom session failed as people complained about my sound (might have had mic volume too high, don't know) and then I hit the can't hear through headphones and finally I used a Windows Zoom. Somehow I stumbled on switching the setting to Speaker to get sound out of the headphones. There then was a recent update which I noted had a whole load of PulseAudion files and I was hopeful that this would fix the issue but unfortunately not. Diverting again I would have like to have had a backup strategy that would have enabled me to revert and if there is a preferred forum to discuss this I'll post there. I then did the moving of .config/pulse and that seemed to tidy up a lot, though probably only removed references to the USB sound card. After hitting a block on other forums someone suggested I post here and here I am.

I intend to install 20.04 which might provide the solution for this and also for an IMAP issue with Evolution. But I am nervous about losing my boot/grub and in particular when Windows updates and takes command of the machine (I'm still on MBR). I'll do more once I have a backup strategy that is a bit more sophisticated that a simply (though useful) Gparted partition copy.

Apologies for dumping all this on you and I don't expect dialogue here but pointers for further discussion welcomed and there may still be some clues in there for this topic's issue.
 
Old 06-13-2020, 04:45 AM   #10
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,837

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
Quote:
I've uploaded the two files as suggested:
Ok, I see nothing significantly different between the files, so maybe we can discount this.

Quote:
I then did the moving of .config/pulse and that seemed to tidy up a lot, though probably only removed references to the USB sound card. After hitting a block on other forums someone suggested I post here and here I am.
That just removes a user's config (including any custom settings), but is regenerated to defaults when next restarted. Any USB device would be dynamically handled at the time it is introduced.

Quote:
Diverting again I would have like to have had a backup strategy that would have enabled me to revert and if there is a preferred forum to discuss this I'll post there.
I'm not an Ubuntu user, so can't comment about what backup tools it has. Best discussed in its own dedicated thread as you already mentioned.

Quote:
Apologies for dumping all this on you and I don't expect dialogue here but pointers for further discussion welcomed and there may still be some clues in there for this topic's issue.
Unfortunately, nothing obvious (too me at east).

Having said that, I did find an interesting HP support page detailing "...plugging in external speakers or headphones does not cut off/route audio from the internal speakers to the external speakers/headphones connected to audio jack of the notebook. Therefore, there is no audio output from the external speakers/headphone." This was with respect to Windows 7, but ultimately due to a hardware quirk that needs to be handled by the hardware driver. Now, this would apply to the Linux (alsa) driver too. Since it was working up until a few weeks back, perhaps it is an alsa-related regression that you've encountered? Hard to say. (A distro/kernel upgrade might therefore be worth trying.)

Let's see any driver-specific options configured here...
Code:
cat /etc/modprobe.d/alsa-base.conf
The systool command can be used to show loaded driver options as well (should be consistent with config file options)...
Code:
systool -vm snd_hda_intel
FWIW, a very old thread concerning HP Elitebook 8440p...
https://askubuntu.com/questions/1328...litebook-8440p
 
Old 06-13-2020, 05:14 AM   #11
AnthonyL
LQ Newbie
 
Registered: Jun 2020
Posts: 10

Original Poster
Rep: Reputation: Disabled
alsa-base.conf
https://pastebin.com/ftXpvcpH

snd_hda_intel
https://pastebin.com/mNiEsatj

I needed to install systool.

I would have concerns over the hardware if it didn't all work under Windows 10 (and as best I recall previously under Win7). Last week I did a Zoom session in Windows 10 with all my headsets and Earphones to confirm that the devices and sockets were ok and didn't have random disconnects/broken cables etc.
 
Old 06-13-2020, 05:45 AM   #12
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,837

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
The alsa-base.conf shows no sign of any custom config for the 'snd_hda_intel' driver (and confirmed by the systool output).

It might be interesting to see if the following makes any difference. Create a custom file eg /etc/modprobe.d/10-custom.conf
and add
Code:
options snd-hda-intel model=auto, enable_msi=1
save when done, then
Code:
sudo alsa force-reload
(or just reboot).

Check behaviour again.
 
Old 06-13-2020, 07:00 AM   #13
AnthonyL
LQ Newbie
 
Registered: Jun 2020
Posts: 10

Original Poster
Rep: Reputation: Disabled
Neither forcing reload or rebooting made any difference. Should I now remove the file?

I've noticed another oddity and that is the System Settings shows Speaker placement for Headphones.

Click image for larger version

Name:	Screenshot_20200613_125627.png
Views:	20
Size:	201.6 KB
ID:	33385

I suspect that amending a setting to always use Speaker might well work if I knew how to do that.
 
Old 06-13-2020, 07:42 PM   #14
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,837

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
I haven't used KDE 4 for a few years now (openSUSE Leap has been using KDE Plasma 5 since last several versions now), so can't really offer specific advice unfortunately. It might be worth reaching out to the Kubuntu community...

https://kubuntu.org/community/
 
Old 06-14-2020, 02:45 AM   #15
AnthonyL
LQ Newbie
 
Registered: Jun 2020
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thank you for your efforts. I had the "brainwave" of trying 20.04 under Virtualbox but the sound ouptuts follow the Host.

I've followed your suggestion and posted the following with the suggestion to refer here for more detail:

https://www.kubuntuforums.net/showth...179#post438179
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Audio output to File - Pulse Audio pr0xibus Linux - Software 3 08-26-2019 06:36 AM
pulse audio can't split rear and front jack output orthusaku Linux - Software 6 03-30-2014 11:18 AM
puppy thoughts after having a recent look see -- given recent developments .. jonyo Puppy 0 11-29-2011 08:45 PM
Pulse counter or frequency of incoming pulse train jayhorizon Programming 15 10-29-2010 04:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration