[Bug 1206760] New: Audio device locked / exclusively blocked for user session
http://bugzilla.opensuse.org/show_bug.cgi?id=1206760 Bug ID: 1206760 Summary: Audio device locked / exclusively blocked for user session Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.4 Hardware: x86-64 OS: openSUSE Leap 15.4 Status: NEW Severity: Normal Priority: P5 - None Component: Sound Assignee: tiwai@suse.com Reporter: friedemann@fschmieg.de QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- The situation is like that: I use a secondary audio card to play sounds based on home automation events. This worked fine probably until I upgraded from 15.3 to 15.4 (in September), however I am not 100% sure that this was the breaking change as I did not explicitly test it then and did not realize it until November 12. Now, if I try to use the secondary audio card as a different user than the one logged into the desktop, I get the following error output: aplay: main:831: audio open error: Device or resource busy This worked previously. Now, I have not found a solution yet, but one option might be to offer a way to exclude certain devices from being used by the desktop environment. Searching the internet for the problem, I found this, but I am not sure whether this is related: https://bugzilla.kernel.org/show_bug.cgi?id=216500 Thank you! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1206760 Friedemann Schmieg <friedemann@fschmieg.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |friedemann@fschmieg.de -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1206760 http://bugzilla.opensuse.org/show_bug.cgi?id=1206760#c2 --- Comment #2 from Friedemann Schmieg <friedemann@fschmieg.de> --- Created attachment 863756 --> http://bugzilla.opensuse.org/attachment.cgi?id=863756&action=edit Attachment as requested. output of alsa-info.sh Happy new Year! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1206760 http://bugzilla.opensuse.org/show_bug.cgi?id=1206760#c4 --- Comment #4 from Friedemann Schmieg <friedemann@fschmieg.de> --- Created attachment 863765 --> http://bugzilla.opensuse.org/attachment.cgi?id=863765&action=edit alsa-info after install pipewire-pulseaudio and reboot Done as recommended. Package installed and rebooted. New ALSA Info attached. Have now 2 different processes as expected: itsme 8900 3209 1 10:20 ? 00:00:29 /usr/bin/pipewire itsme 8902 3209 0 10:20 ? 00:00:19 /usr/bin/pipewire-pulse But result is the same: /usr/bin/aplay --device plughw:CARD=CMI8738 /home/itsme/Sounds/test.wav aplay: main:831: audio open error: Device or resource busy or sudo -u itsme /usr/bin/aplay --device plughw:CARD=CMI8738 /home/itsme/Sounds/test.wav aplay: main:831: audio open error: Device or resource busy -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1206760 http://bugzilla.opensuse.org/show_bug.cgi?id=1206760#c5 --- Comment #5 from Takashi Iwai <tiwai@suse.com> --- Wait, do you mean the C-Media card as the second device? It's rather the primary device. Which device is set as the input/output on your system with PulseAudio / pipewire? Check with pavucontrol, for example. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1206760 http://bugzilla.opensuse.org/show_bug.cgi?id=1206760#c6 --- Comment #6 from Friedemann Schmieg <friedemann@fschmieg.de> --- Phyically the internal (on board) sound is connected to the monitor. The CMI8738 sound card is connected to the home automation system. Desktop sound works as usual, but I can see both devices on KDE (as before). I installed pavucontrol. When starting the program the GUI starts showing the message: "Establishing connection to PulseAudio. Please wait..." but nothing happens anymore. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1206760 http://bugzilla.opensuse.org/show_bug.cgi?id=1206760#c7 --- Comment #7 from Takashi Iwai <tiwai@suse.com> --- Well, are you using PulseAudio for the audio, or are you playing directly via ALSA API? In the former case, check whether wireplumber and pipewire-pulse services are running in user mode, % systemctl --user status wireplumber % systemctl --user status pipewire-pulse OTOH, in the latter case (the raw ALSA usage), neither PulseAudio nor pipewire should have been started. If such a process is running, it may block your audio device usage. And, you can check which process uses the devices via fuser command % fuser -v /dev/snd/* -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1206760 http://bugzilla.opensuse.org/show_bug.cgi?id=1206760#c8 --- Comment #8 from Friedemann Schmieg <friedemann@fschmieg.de> --- After some tests: Already running pipewire processes are in deed the blocking factor. When rebooting the system and NOT logging in at console (GUI, KDE) it works fine. When KDE started I'm not able to get rid of them. Best would be to hide the second sound device for KDE. Is this possible? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1206760 http://bugzilla.opensuse.org/show_bug.cgi?id=1206760#c9 --- Comment #9 from Takashi Iwai <tiwai@suse.com> --- You can turn off the pipewire by running like % systemctl --user stop wireplumber (and restart by % systemctl --user start wireplumber too) But this means that KDE mixer and such application won't work well. In general, the modern desktops require the sound daemon. I guess it worked casually in your case because the primary card was selected to HD-audio. And this should still work. Try to choose HD-audio as the primary device via pavucontrol. After that (and a few seconds later), the PCM device for C-Media should be released, and you may use other applications with it. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1206760 http://bugzilla.opensuse.org/show_bug.cgi?id=1206760#c10 --- Comment #10 from Friedemann Schmieg <friedemann@fschmieg.de> --- BINGO! With pavucontrol I was able to set the profile of the CMI8738 to "off" which makes it available for scripting. Last error message is also gone. Thank you so much! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1206760 http://bugzilla.opensuse.org/show_bug.cgi?id=1206760#c11 Takashi Iwai <tiwai@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FEATURE Flags|needinfo?(friedemann@fschmi | |eg.de) | --- Comment #11 from Takashi Iwai <tiwai@suse.com> --- Good to hear. Let's close the bug now. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com