KDE's audio volume is empty

I’ve just installed LEAP 42.3 and

KDE System Settings > Hardware > Multimedia > Audio Volume

is completely empty (even after configuring the sound card through YAST). I had the same problem with LEAP 42.2 but back then some fiddling around managed to solve the problem (somehow).

NOTE: Sound works fine. Test sounds, music and video all work; I’ve gone the multimedia guide.

So the audio volume in the system tray is the only thing that doesn’t do its job. How can I solve this?

Is PulseAudio running? Check with

setup-pulseaudio --status

or

ps -A|grep pulse

If necessary enable it with

sudo setup-pulseaudio --enable

Do you now have mixer devices present? Can you play a test sound via PulseAudio successfully?

paplay /usr/share/sounds/alsa/test.wav

If not, try removing any existing user configuration

rm -f ~/rm -rf ~/.config/pulse

then kill the daemon with

pulseaudio -k

It will respawn automatically by default. Any different?

I just tried that.

I found two things there. I found “Notification Sounds” (set to 0%),
and I found “virt-manager: playback” set to 73%.

I happened to be running “virt-manager”. If I were not running that, then I would have only had “Notification Sounds”. And if I had disabled notification sounds, then it would not be surprising if there was nothing there.

So I started playing some music with Amarok. And that immediately showed up in the Audio Volume window.

So my question: were you actually playing any sounds at the time you opened the audio volume window?

Output devices should still be present though. The OP needs to clarify a little more perhaps.

Yes. It says “enabled”.

That plays fine.

So far, so good…and is it the ‘Device’ mixers that are missing from the KDE mixer?

As for the applications tab: it’s not showing anything when I’m playing music or video. It remains empty. Thanks nrickert for making me check that.

As for the devices tab: that’s empty as well. This was the problem I noticed.

Yes.

Post the output of

pacmd list-sinks

*This should be representative of the output mixer device(s) available to you.

You can also use the PA volume control GUI

pavucontrol

If not present, it can be installed with

zypper in pavucontrol

So I was checking

KDE System Settings > Hardware > Multimedia > Audio and Video

and I noticed the “Audio Hardware Setup” tab is missing (in the fresh profile compared to the old profile).

No PulseAudio daemon running, or not running as session daemon.

pavucontrol wasn’t installed so I installed it

The symptoms of no ‘Audio Hardware Setup’ would be consistent with the pulseaudio daemon not running. A bit confusing though, since earlier you reported that it was running. What happens if you try launching it manually from a terminal (as user) like this?

pulseaudio -D

then check the KDE System Settings > Hardware > Multimedia > Audio and Video again

pavucontrol wasn’t installed so I installed it

Ok

I was using “switch user”. The new user profile has the problems, while I’m using the old user profile to post. Thinking I might have made a mistake, I checked the earlier requests.

This says “enabled”.

I got this one wrong.

Connection failure: Connection refused
pa_context_connect() failed: Connection refused

Enable pulseaudio for the user concerned as I explained in post #2. You might also need to logout and back in again.

That solved the problem. Thanks.

You mean

sudo setup-pulseaudio --enable

or

pulseaudio -k
sudo setup-pulseaudio --enable

gives

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...

while

pulseaudio -k

gives

E: [pulseaudio] main.c: Failed to kill daemon: No such process

while

pulseaudio -D

solves the problem but that doesn’t stick after logging out and back in again.

No, it won’t be persistent, I just wanted to know if it would start for the new user. In general if pulse-audio is enabled already, then when you switch user there should be another instance of the daemon for that user. For reference I get…

ps -aux|grep pulseaudio
dean      2494  1.4  0.7 429592 11208 ?        S<l  14:02   0:00 /usr/bin/pulseaudio --start --log-target=syslog
user2     2787  1.5  0.7 513772 11440 ?        S<l  14:03   0:00 /usr/bin/pulseaudio --start --log-target=syslog
user2     2938  0.0  0.1  10544  1576 pts/1    S+   14:03   0:00 grep --color=auto pulseaudio

Try removing any existing pulse configuration from the second user’s home directory…

rm -rf ~/.config/pulse

then logout and back in to that user account.

Check that there is a pulseuadio daemon running for that user…

ps -aux|grep pulseaudio

I’m not sure why PulseAudio is not started for your second user account, but one possible workaround would be to make it autostart at login via
System Settings > Startup and Shutdown > Autostart > Add Program…, then type ‘pulseaudio’, select the ‘Application’ tab and ensure that the command is ‘pulseaudio -D’, then click ‘OK’. That should be all that’s required. It will take effect when you next login as this user.

Log out and log in didn’t work yesterday. But after booting the computer today, it seems to have worked. Weird.

Another weird thing: the problem remains when logging into my root account so I ran the above command. Again, logging out and logging in did nothing, but I expect it will work after booting the computer tomorrow.

I always use a fresh user account to make sure everything works fine. This differentiates between (a) real problems and (b) problems that occur because of old configuration files.

Anyway, decided to make another fresh user account to make sure it creates a functioning user account. AND IT DID !!! The problem seems to be solved.

I think, with hindsight, that the problem started with the installation procedure not configuring my sound card. Thus pulseaudio probably couldn’t create a proper set-up. Configuring my sound card made the sound work, but did nothing for the pulseaudio set-up. It had to be run again. At least that’s my amateur perspective on it.

Anyway…

Thanks for the help, deano_ferrari

My monitor died, so I decided to do a complete reinstall.

Configured the sound card then ran the following commands:

setup-pulseaudio --status

sudo setup-pulseaudio --enable

paplay /usr/share/sounds/alsa/test.wav

rm -f ~/rm -rf ~/.config/pulse

pulseaudio -k

This works in my user accounts. The pulseaudio daemon restarts. Everything works.

Why doesn’t this work from the root account? Because then I have to use

pulseaudio -D

each time. It’s weird that I can configure the sound card, perform the updates, add Packman and install the packages for multimedia, yet be unable to make the pulseaudio daemon persistent in the root account.