You are not logged in.

#1 2021-04-25 21:33:48

Zingiber
Member
Registered: 2021-04-25
Posts: 2

Pipewire: Missing devices after log out and login to another user

Hi, on my system I use two separate user accounts for personal and work. I use KDE Plasma as my desktop environment and SDDM as my display manager.
For sound I use an external SMSL AD13 amplifier as my audio device connected via USB, but also keep my motherboard's Realtek audio enabled to make use of the headphone/microphone front connectors.
When I log out of one user account and then log into the other (actually logging out, not KDE's "Switch User"), I lose both those devices, leaving only the motherboard's SPDIF output.

Now I can run usbreset on the SMSL amplifier and then restart pipewire-media-session to get it working again.
What I'm asking is, is there a more elegant solution rather than having to reset my USB device? I feel like I'm using a sledgehammer to crack a nut.

Also just to rule it out, there's no .pacnew files in the /etc/pipewire/media-session.d directory.

Offline

#2 2021-04-25 22:51:55

icar
Member
Registered: 2020-07-31
Posts: 129

Re: Pipewire: Missing devices after log out and login to another user

I am having the same issue. I sometimes need to log out of Gnome wayland session and log in to Xorg session. Then this happens.
Restarting the user service you mentioned solves the issue.
I have no DAC, only built-in laptop sound system. This probably rules out the sound device as culprit.

Last edited by icar (2021-04-25 22:52:55)

Offline

#3 2021-04-26 18:23:24

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,265

Re: Pipewire: Missing devices after log out and login to another user

Created a shell function for it , only to discover almost the same thing exists(what's the chance), I use 'usbip', used it to create a script, rewrote it to this.
Fill in your product number (second behind :colon)

usbreset() {
Product=''
for slink in $(find /sys/bus/usb/devices); do
  if [ -e "$slink"/idProduct ] && [ "$(more "$slink"/idProduct)" = "$Product" ]; then
    [ "$(cat "$slink"/authorized)" = 1 ] && printf "%s" "0" > "$slink"/authorized || exit 1
     sleep 1
    printf "%s" "1" > "$slink"/authorized && exit
  fi
done
}

It may be a small hammer compared to 'usbreset' ;-)
However, I do think you should open a bug report (systemd?) because a USB device should not be held hostage by a user.
Though, this could be intentional, a usbdisk should be removed safely , a webcam won't mind!

Offline

#4 2021-04-28 08:48:24

Zingiber
Member
Registered: 2021-04-25
Posts: 2

Re: Pipewire: Missing devices after log out and login to another user

I don't think it's a hardware bug. My guess is Pipewire on the first user is still "using" the sound devices which doesn't allow the other user to use them without resetting the USB device.

I'll have another look though the system logs to see if there's anything.

Offline

Board footer

Powered by FluxBB