When I switch user the audio stop to work for one user

on my laptop running leap 15.6 with KDE I have 4 users, when I’m using two users and I switch back to the first user the audio doesn’t works anymore:
boot and login user1, audio works
switch to user2, audio works
switch to user1 audio stop to works
switch to user2 audio works
how can I have audio working in both users?

The sound server (e.g. pipewire) is started on a per-user basis, so when you switch to another user the server for the first user stops and a server for the second user starts.
Switching back and forth between two users should switch back and forth the two sound servers as well, e.g. you should hear two different songs playing, depending on which user has control of the desktop.
If that is not what you hear, please describe in technical terms what you mean by “works” and “stop to work”.

Sorry for the intrusion with my oddball question.

I’ve noticed this is not the first thread you’ve created, related to “user1 and user2” (etc) problems.

Okay, my silly question: Are these multiple user accounts only used by YOU?? If “yes”, what is the inspiration to do so?

stop to work means:
login user1 I hear song1
switch user2 I here song2
switch user1 I don’t hear song1 and neither other songs
switch user2 I hear song2
logout user2
login user1 I don’t hear song1 and neither other songs
logout user1
login user1 I hear song1

I have 4 users, user1 for me at work and some activities, user2 for me at home and sometimes my girlfriend, user3 for my son and nephews, user4 for my girlfriend when I have too many browser windows opened in user2 so she doesn’t close my windows

Looks like something is wrong in the config for user1. Are you using pipewire or pulseaudio?

I think pulseaudio, how can I check?

inxi -Axxz

What is against using more users in a multi-user (and multi-session) operating system like Unix/Linux?
I would always advise this regardless if this is not only about two different humans (then I would even say it is a must), but also when a human wants to use the system in different roles that should not be mixed. E.g. one for a person’s mailing, banking, browsing, etc. and another one for the same person’s function as secretary of the local football club. The best way to keep things apart. And when there comes a new secretary, then it is very clear what should be forwarded to her/him without any personal data involved.

1 Like

it seems both :open_mouth:

pla@plaTW:~> inxi -Axxz
Audio:
  Device-1: Intel Raptor Lake-P/U/H cAVS vendor: CLEVO/KAPOK
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:51ca
  API: ALSA v: k6.4.0-150600.23.42-default status: kernel-api with: aoss
    type: oss-emulator
  Server-1: PipeWire v: 1.0.5 status: off with: wireplumber status: active
  Server-2: PulseAudio v: 17.0 status: active with: pulseaudio-alsa
    type: plugin
pla@plaTW:~> 

OK, PulseAudio is active.
Look for /home/<user1>/.config/pulse (or possibly /home/<user1>/.pulse ), rename e.g. to pulse_backup or even delete if you have no custom configuration, logout, login and check again. The system should create a fresh PulseAudio config for user1.

well, I renamed /home/<user1>/.config/pulse and the sound worked for sometime, but randomly (as before) the sound disappeared again, the last time that happened I googled and I tried to restart pulseaudio and check it

pla@plaTW:~> systemctl --pla status pulseaudio.socket
Unit pulseaudio.socket could not be found.
pla@plaTW:~> systemctl --pla status pulseaudio
Unit pulseaudio.service could not be found.
pla@plaTW:~>  systemctl --pla restart pulseaudio.service
Unit pulseaudio.service could not be found.
pla@plaTW:~>

I had to reboot becouse relog didn’t worked
is there a way to restart pulseaudio without rebooting?

Try:

systemctl --user status pulseaudio
systemctl --user restart pulseaudio

since pulseaudio (and pipewire) are started on a per-user basis.

aaahhh manythaks, I thought that --user means --theusername not --user as written, it works

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.