Strange problem with Plasma5 Volume Manager (plasma5-pa)

OK, brief background info.

When Tumbleweed first shipped plasma 5 the Plasma5 Volume Manager was quite basic, with no options to individually control applications. Therefore I uninstalled it and installed kmix. Recently, on another PC I installed Leap 42.3 and saw that Plasma5 Volume Manager was quite improved.

So, on the Tumbleweed PC I removed kmix and installed plasma5-pa-5.10.4-1.1

Now for the strange problem, apologies, this is rather lengthy.

At initial boot and login all appears OK.

However, if the user logs out, then upon (re)login the Plasma5 Volume Manager does not work. The plasmoid displays the message “No output or input devices found.”

This is the same for two existing users, and a freshly created new user.

In the process of testing with my other existing, and the newly created user, a rather strange discovery was made…

Boot
User 1 (Primary existing user) logs in — plasma5-pa ok
User 1 logs out
User 1 again logs in — plasma5-pa fails
User 1 logs out

User 2 (Secondary existing user) logs in — plasma5-pa ok
User 2 logs out
User 2 again logs in — plasma5-pa fails
User 2 logs out

And the same for User 3 (Freshly created new user)

The first time any user logs in, following either a boot, or the logout of another user then plasma5-pa is ok. If the same users logs out, then in, plasma5-pa fails.

So this, for example works…

Boot
User 1 (Primary existing user) logs in — plasma5-pa ok
User 1 logs out
User 2 (Secondary existing user) logs in — plasma5-pa ok
User 2 logs out
User 1 (Primary existing user) logs in — plasma5-pa ok
User 1 logs out
User 3 (Primary existing user) logs in — plasma5-pa ok
User 3 logs out

When the plasmoid fails and shows “No output or input devices found.” “System Settings -> Multimedia -> Audio & Video -> Device Preference” shows the device to be “Default”

http://paste.opensuse.org/view/raw/e74a485d

Rather than “Built-in Audio Analog Stereo” it normally shows.

http://paste.opensuse.org/view/raw/a12aa56e

Just to get a handle on this, run the following from first login after boot, and then again after logging out/in as same user…

pactl info

Report back here with the output from both occasions.

Thanks…

Boot
Login User 1 (Primary existing user)

paul@Orion-Tumble:~$ pactl info
Server String: unix:/run/user/1000/pulse/native
Library Protocol Version: 32
Server Protocol Version: 32
Is Local: yes
Client Index: 12
Tile Size: 65472
User Name: paul
Host Name: Orion-Tumble.SUSE
Server Name: pulseaudio
Server Version: 10.0-rebootstrapped
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_14.2.analog-stereo
Default Source: alsa_input.pci-0000_00_14.2.analog-stereo
Cookie: 1f9f:c176
paul@Orion-Tumble:~$ 

Logout User 1
Login User 1

paul@Orion-Tumble:~$ pactl info
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
paul@Orion-Tumble:~$ 


Additionally:...

Logout User 1
Login User 3 (New User, default settings)

soundtest@Orion-Tumble:~> pactl info
Server String: unix:/run/user/1002/pulse/native
Library Protocol Version: 32
Server Protocol Version: 32
Is Local: yes
Client Index: 7
Tile Size: 65472
User Name: soundtest
Host Name: Orion-Tumble.SUSE
Server Name: pulseaudio
Server Version: 10.0-rebootstrapped
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_14.2.analog-stereo
Default Source: alsa_input.pci-0000_00_14.2.analog-stereo
Cookie: 6b2f:bea6
soundtest@Orion-Tumble:~>  

Logout User 3
Login User 1

paul@Orion-Tumble:~$ pactl info
Server String: unix:/run/user/1000/pulse/native
Library Protocol Version: 32
Server Protocol Version: 32
Is Local: yes
Client Index: 12
Tile Size: 65472
User Name: paul
Host Name: Orion-Tumble.SUSE
Server Name: pulseaudio
Server Version: 10.0-rebootstrapped
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_14.2.analog-stereo
Default Source: alsa_input.pci-0000_00_14.2.analog-stereo
Cookie: 5215:b454
paul@Orion-Tumble:~$

Any user’s second and subsequent logins return the “pa_context_connect() failed: Connection refused” until a different user has logged in/out.

To the best of my knowledge, and recollection, I’ve only made one change to the pulse audio configuration (Set “flat-volumes = no” in “daemon.conf”) since TW was first installed on this PC back in June 2015.

Googling around for the error “pa_context_connect() failed: Connection refused” didn’t return a great deal that either seemed relevant, or I could understand :\

There was mention on the Gentoo forum relating to failure after re-boot, one suggestion being to add the user(s) to the Group “audio”.

For lack of anything else to try… all users now belong to group audio… no difference, still fails on second login of same user.

It is perplexing, but try

sudo setup-pulseaudio --enable

then log out and back in…

Any different?

No, I’m afraid not…

boot
login user 'paul'

paul@Orion-Tumble:~$ pactl info
Server String: unix:/run/user/1000/pulse/native
Library Protocol Version: 32
Server Protocol Version: 32
Is Local: yes
Client Index: 14
Tile Size: 65472
User Name: paul
Host Name: Orion-Tumble.SUSE
Server Name: pulseaudio
Server Version: 10.0-rebootstrapped
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_14.2.analog-stereo
Default Source: alsa_input.pci-0000_00_14.2.analog-stereo
Cookie: 6b71:ad9c

paul@Orion-Tumble:~$ sudo setup-pulseaudio --enable
[sudo] password for root: 
Enabling PulseAudio for ALSA...
Enabling PulseAudio for libao...
Default driver is pulse already in /etc/libao.conf
Enabling PulseAudio for mplayer...
Enabling PulseAudio for OSS...
Application aumix already setup for PulseAudio
Application sox already setup for PulseAudio
Enabling PulseAudio for SDL...
Enabling PulseAudio for Timidity...
Timidity already setup for using PulseAudio
Enabling PulseAudio for Phonon...
Enabling PulseAudio for Kmix...
Enabling PulseAudio for speech dispatcher...
Enabling PulseAudio for SoX...
Setting auto sink/src for gstreamer
Enabling PulseAudio for QEMU/KVM
Enabling PulseAudio autospawn...
paul@Orion-Tumble:~$ 

logout user 'paul'
login user 'paul'

paul@Orion-Tumble:~$ pactl info
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
paul@Orion-Tumble:~$ 

A long shot…starting with the first user, try removing the user config

rm -rf ~/.config/pulse/

then log out and back in.

Other than that I’m not sure what else could be the problem here. :\

Again, I’m afraid, no difference.

I’d already tried that, albeit with “~/.config/pulse” renamed rather than deleted. To be doubly sure though, this time I deleted it.

I don’t know if this is a bug per se, or “something” with the configuration of this PC. I don’t see it with another PC running 42.3, but that’s far from a valid comparison. As you’ve not said you do/don’t see the problem I assume your not running TW. It would be useful if another TW user was able to see if they too are afflicted.

Thanks for your help anyway, for the moment I’ll live with it. Just need to break an awfully old habit of logging out whenever I leave my PC :wink:

Yes, I’m running openSUSE 42.3 on two different laptops. As a workaround I guess you could add an auto-start program for each user like this…

System Settings > Startup and Shutdown > Add Program… with the command ‘pulseaudio -D’

It should take effect next time you log in, and if pulseaudio is already running (eg from boot) it will be ignored anyway.

Thanks for your help anyway, for the moment I’ll live with it. Just need to break an awfully old habit of logging out whenever I leave my PC :wink:

No worries. I’d hoped that we might find something obvious. Hopefully, someone else will be able to help progress this.

I tried to reproduce the problem. But I couldn’t.

However, on rereading this thread, I may have done it wrongly.

I tried: login as user S
logout
login as user R

and everything still worked. (I shortened the login names).

But, on rereading, I should have logged in as S, logged out, then logged in again as S. Maybe I’ll try that tomorrow.

Well, … that changed things, but not to the desired effect I’m afraid.

Added the command to user 1, logged out, and just for good measure re-booted to start completely afresh.

It seems to have crippled the sound altogether of the user, including at the first login. The plasmoid shows the correct playback device with the volume set as it should be, but there is no sound.

Just to ensure it wasn’t some strange coincidental fluke, re-booted and tried again, same result.

If you could just try I’d appreciate it, I’m beginning to think this may be a “just me”…

Yes, it’s on the second or subsequent logins of the same user.

I tried that. I’m still not seeing a problem.

I logged in as user S, logged out, logged in again. And audio and volume control looked okay.
I logged out, and let it set for 10 minutes. Then I logged in again, and everything still looked okay.

An additional comment. User S is really user “support”. I normally use that only for occasional admin purposes, where I login to “Icewm”. So when I first tried this yesterday, this was a new user to KDE – no existing KDE settings. I’m not sure if this is relevant, but mentioning it just in case. The other user I mentioned (“R”) is my regular login with KDE settings going back several years. But I’m not seeing the problem there, either.

Bother… OK. Many thanks for trying that, at least I now know it’s looking very much like a “just me”.

This is what I get on second and subsequent logins of the same user:

http://paste.opensuse.org/view/raw/1099d5d2

“Normality” is only restored with a logout, login/out of another user, then login of the original user.

I really don’t know where to go on this one, so, as I wrote earlier, I’ll just live with it.

Thanks :slight_smile:

I see that Bug 1052437 has been reported, and seems to be the same problem.

Thanks for posting with this. I suspected a bug at play.

Yes, thanks indeed. Well spotted. :slight_smile:

I had played around with this a little more after finding more information on the gentoo, debian and arch sites.

The pulseaudio --kill makes no difference to the behaviour.

I had already tried executing that from konsole prior to logging out “user 1”

paul@Orion-Tumble:~$ pulseaudio --kill
paul@Orion-Tumble:~$

It appears that pusleaudio is killed, however re-login of “user 1” still results in the “No output or input devices found.”

Attempting at that stage to use pulseaudio --kill fails

paul@Orion-Tumble:~$ pulseaudio --kill
E: [pulseaudio] main.c: Failed to kill daemon: No such process
paul@Orion-Tumble:~$

nor can it be started

paul@Orion-Tumble:~$ pulseaudio --start
E: [pulseaudio] main.c: Daemon startup failed.
paul@Orion-Tumble:~$

This, however does work

paul@Orion-Tumble:~$ killall pulseaudio
paul@Orion-Tumble:~$ pulseaudio --start -vvvv
D: [pulseaudio] conf-parser.c: Parsing configuration file '/etc/pulse/client.conf'
D: [pulseaudio] conf-parser.c: Parsing configuration file '/etc/pulse/client.conf.d/50-system.conf'
I: [pulseaudio] main.c: Daemon startup successful.
paul@Orion-Tumble:~$

I’ve also tried deleting all the pulse configuration files:

rm -rf ~/.config/pulse /tmp/pulse-*

and doing a forced reinstall of pulseaudio makes no difference, although I didn’t think it would anyway.

Follow up… I almost didn’t try this as I didn’t think it would be any different from executing via konsole prior to logout.

If a shutdown script is created to kill pulseaudio … then subequent logins of the same user are OK

#!/bin/bash
#
#    test - kill pulseaudio on logout 
#     
pulseaudio --kill
#

@nrickert a BIG thanks.

@deano_ferrari thanks for your initial input on this, appreciated.