Bug#839993: pulseaudio: Pulseaudio is able to share non-ALSA audio devices across differens user sessions

2016-10-07 Thread Felipe Sateler
Control: tags -1 confirmed upstream
Control: forwarded -1 https://bugs.freedesktop.org/show_bug.cgi?id=98144

On 7 October 2016 at 05:02, Alexander Betaev  wrote:
> Package: pulseaudio
> Version: 9.0-3
> Severity: important
>
> Dear Maintainer,
>
> I found that Pulseaudio in per user session mode does not allow all users to
> use all devices I have on my machine.
> Only ALSA devices may be shared across different user sessions without an
> issue.
>
> I noticed such behaviour with native TCP device which is provided by my media
> center (JIC, also runs Stretch under KVM with GFX passthrough), and with
> Bluetooth device which works pretty well until you try to use it under another
> user.
>
> In order to achieve working Bluetooth Headset I had to disable pulseaudio for
> GDM3 user (Debian-gdm) because it grab it before my user almost each time.
>
> I believe there should be a hook which suspends pulseaudio when user looses
> focus on his/her session and a hook to restore when user grabs session focus.
>
> The only way to use pulseaudio in multi-user installations now is to make it
> system-wide which is also not recommended because of other issues
> (https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/)

I discussed this with upstream and they agree that this is only
implemented for alsa devices. I have thus created an issue upstream,
and am marking this bug as forwarded there. I have mainly focused in
the bluetooth case since that is the most likely to cause problems for
users.

-- 

Saludos,
Felipe Sateler



Bug#839993: pulseaudio: Pulseaudio is able to share non-ALSA audio devices across differens user sessions

2016-10-07 Thread Alexander Betaev
Package: pulseaudio
Version: 9.0-3
Severity: important

Dear Maintainer,

I found that Pulseaudio in per user session mode does not allow all users to
use all devices I have on my machine.
Only ALSA devices may be shared across different user sessions without an
issue.

I noticed such behaviour with native TCP device which is provided by my media
center (JIC, also runs Stretch under KVM with GFX passthrough), and with
Bluetooth device which works pretty well until you try to use it under another
user.

In order to achieve working Bluetooth Headset I had to disable pulseaudio for
GDM3 user (Debian-gdm) because it grab it before my user almost each time.

I believe there should be a hook which suspends pulseaudio when user looses
focus on his/her session and a hook to restore when user grabs session focus.

The only way to use pulseaudio in multi-user installations now is to make it
system-wide which is also not recommended because of other issues
(https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/)


Thanks and regards,
Alex



-- Package-specific info:
File '/etc/default/pulseaudio' does not exist


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=ru_RU.utf8, LC_CTYPE=ru_RU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages pulseaudio depends on:
ii  adduser  3.115
ii  libasound2   1.1.2-1
ii  libasound2-plugins   1.1.1-1
ii  libc62.24-3
ii  libcap2  1:2.25-1
ii  libdbus-1-3  1.10.10-1
ii  libgcc1  1:6.1.1-11
ii  libice6  2:1.0.9-1+b1
ii  libltdl7 2.4.6-2
ii  liborc-0.4-0 1:0.4.26-1
ii  libpulse09.0-3
ii  libsm6   2:1.2.2-1+b1
ii  libsndfile1  1.0.25-10
ii  libsoxr0 0.1.2-1
ii  libspeexdsp1 1.2~rc1.2-1
ii  libstdc++6   6.1.1-11
ii  libsystemd0  231-9
ii  libtdb1  1.3.9-1
ii  libudev1 231-9
ii  libwebrtc-audio-processing1  0.3-1
ii  libx11-6 2:1.6.3-1
ii  libx11-xcb1  2:1.6.3-1
ii  libxcb1  1.12-1
ii  libxtst6 2:1.2.2-1+b1
ii  lsb-base 9.20160629
ii  pulseaudio-utils 9.0-3

Versions of packages pulseaudio recommends:
ii  rtkit  0.11-4

Versions of packages pulseaudio suggests:
pn  paman
ii  paprefs  0.9.10-2
pn  pavucontrol  
pn  pavumeter
ii  udev 231-9

-- Configuration Files:
/etc/pulse/default.pa changed:
.fail
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore
load-module module-augment-properties
load-module module-switch-on-port-available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
load-module module-detect
.endif
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix
load-module module-native-protocol-tcp
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif
load-module module-default-device-restore
load-module module-rescue-streams
load-module module-always-sink
load-module module-intended-roles
load-module module-suspend-on-idle
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif
load-module module-position-event-sounds
load-module module-role-cork
load-module module-filter-heuristics
load-module module-filter-apply


-- no debconf information
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see .

## Configuration file for PulseAudio clients. See pulse-client.conf(5) for
## more information. Default