Bug 513579 - GDM's PulseAudio doesn't die (no sound in user session after login)
GDM's PulseAudio doesn't die (no sound in user session after login)
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: pulseaudio (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Lennart Poettering
Fedora Extras Quality Assurance
: Reopened
: 514992 (view as bug list)
Depends On:
Blocks: F12Blocker/F12FinalBlocker
  Show dependency treegraph
 
Reported: 2009-07-24 07:08 EDT by Bastien Nocera
Modified: 2009-09-16 22:34 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-16 22:34:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Bastien Nocera 2009-07-24 07:08:09 EDT
Still here.

$ ps aux | grep pulse
gdm       1406  0.0  0.1  88032  3188 ?        Ssl  10:57   0:00 /usr/bin/pulseaudio --start --log-target=syslog
gdm       1424  0.0  0.1  10112  2376 ?        S    10:57   0:00 /usr/libexec/pulse/gconf-helper
hadess    2179  0.0  0.2 100564  4736 pts/0    S<l  11:29   0:00 pulseaudio
hadess    2182  0.0  0.1  10136  2684 pts/0    S    11:29   0:00 /usr/libexec/pulse/gconf-helper
hadess    4691  0.0  0.0   4204   704 pts/3    S+   12:06   0:00 grep pulse

This is causing SELinux errors.
Comment 1 Lennart Poettering 2009-07-24 08:07:09 EDT
PA stays around as long as it is being used and then terminates itself after 5s or so. "Being used" means that one or more of these conditions are true:

- The XSM session manager of the gdm session still is around

- The gdm session is listed as CK session

- At least one client connection is up, be it via the esd, the native proto or the CLI proto. 

If you want to know if any of the three conditions are true, simply send PA a SIGHUP in which case it will dump it's state to syslog. If you post that here, I can tell you what is keeping PA running.

Why have this logic? Because PA is a per-user, not a per-session daemon, and we want to share it between multiple sessions of the same user. Now, for the gdm user this probably doesn't make much sense, since there won't be more than one gdm user session at the same time. But from PA's perspective this is not really distuingishable. Maybe gdbm should run pulseaudio -k before leaving the gdm session?

And why does SELinux get annoyed by this?
Comment 2 Samuel Sieb 2009-07-25 02:29:38 EDT
I'm using a fully updated F11.  If I cause gdm to beep, then when I login, I will have no sound capability.  There is a pulseaudio process owned by gdm that won't go away.  Checking the log after I login, there are three clients: "GNOME Volume Control", another "GNOME Volume Control" which actually turns out to be gnome-settings-daemon, and libcanberra which is actually metacity.  All these processes use the native connection and are owned by me.

pulseaudio does not have the device open, I can play music if I tell the program to use the direct alsa hardware device.  But I can't start my own pulseaudio daemon because the ports are held by gdm's.  Any program trying to play audio triggers this in the log:

Jul 24 23:22:51 localhost pulseaudio[4905]: alsa-sink.c: Error opening PCM device front:0: Invalid argument
Jul 24 23:22:51 localhost pulseaudio[4905]: sink-input.c: Failed to create sink input: sink is suspended.

Process 4905 is gdm's pulseaudio.

I don't know about any selinux errors as I have it disabled.  It would seem that gdm should kill its pulseaudio daemon before starting the user session.
Comment 3 Lennart Poettering 2009-07-25 07:43:15 EDT
(In reply to comment #2)
> Checking the log after I login, there are three clients: "GNOME
> Volume Control", another "GNOME Volume Control" which actually turns out to be
> gnome-settings-daemon, and libcanberra which is actually metacity.  All these
> processes use the native connection and are owned by me.

Which log? syslog after enabling the debug output? Are you sure that the data generated in syslog is actually the state data of the gdm pa process?

> pulseaudio does not have the device open, I can play music if I tell the
> program to use the direct alsa hardware device.  But I can't start my own
> pulseaudio daemon because the ports are held by gdm's.  Any program trying to
> play audio triggers this in the log:

PA closes the audio devices when idle, to save power. Ports are held by gdm's? Uh? What do you mean by "ports"? IP ports? PA does not use IP, unless configured so, and the gdm PA certainly is not configured that way.
Comment 4 Bastien Nocera 2009-07-31 21:27:51 EDT
*** Bug 514992 has been marked as a duplicate of this bug. ***
Comment 5 Bastien Nocera 2009-07-31 21:37:58 EDT
PA should be using CK to go away too. In the default.pa:
### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
load-module module-console-kit

If PA used CK to know which is the current user session, then it could exit cleanly.

If anyone encounters this and could run:
killall -HUP pulseaudio
when the problem happens and post the resulting output in /var/log/messages, that would be appreciated.
Comment 6 Stephen 2009-07-31 22:21:12 EDT
dbus: Rejected send message, 2 matched rules; type="method_call", sender=":1.149" (uid=42 pid=9244 comm="/usr/bin/pulseaudio --start --log-target=syslog ") interface="org.bluez.Manager" member="ListAdapters" error name="(unset)" requested_reply=0 destination="org.bluez" (uid=0 pid=1567 comm="/usr/sbin/bluetoothd "))
pulseaudio[9244]: bluetooth-util.c: Error from ListAdapters reply: org.freedesktop.DBus.Error.AccessDenied
kernel: ===>rt_ioctl_giwscan. 4(4) BSS returned, data->length = 502
pulseaudio[9244]: main.c: 1 sink(s) available.
pulseaudio[9244]: main.c:   * index: 0
pulseaudio[9244]: main.c: #011name: <alsa_output.pci_8086_27d8_sound_card_0>
pulseaudio[9244]: main.c: #011driver: <module-alsa-card.c>
pulseaudio[9244]: main.c: #011flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
pulseaudio[9244]: main.c: #011state: IDLE
pulseaudio[9244]: main.c: #011volume: 0: 100% 1: 100%
pulseaudio[9244]: main.c: #011        0: 0.00 dB 1: 0.00 dB
pulseaudio[9244]: main.c: #011        balance 0.00
pulseaudio[9244]: main.c: #011base volume: 100%
pulseaudio[9244]: main.c: #011             0.00 dB
pulseaudio[9244]: main.c: #011volume steps: 65537
pulseaudio[9244]: main.c: #011muted: no
pulseaudio[9244]: main.c: #011current latency: 892.62 ms
pulseaudio[9244]: main.c: #011max request: 344 KiB
pulseaudio[9244]: main.c: #011max rewind: 344 KiB
pulseaudio[9244]: main.c: #011monitor source: 0
pulseaudio[9244]: main.c: #011sample spec: s16le 2ch 44100Hz
pulseaudio[9244]: main.c: #011channel map: front-left,front-right
pulseaudio[9244]: main.c: #011             Stereo
pulseaudio[9244]: main.c: #011used by: 0
pulseaudio[9244]: main.c: #011linked by: 0
pulseaudio[9244]: main.c: #011configured latency: 1999.82 ms; range is 0.50 .. 1999.82 ms
pulseaudio[9244]: main.c: #011card: 0 <alsa_card.pci_8086_27d8_sound_card_0>
pulseaudio[9244]: main.c: #011module: 4
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011alsa.resolution_bits = "16"
pulseaudio[9244]: main.c: #011#011alsa.mixer_element = "PCM"
pulseaudio[9244]: main.c: #011#011device.api = "alsa"
pulseaudio[9244]: main.c: #011#011device.class = "sound"
pulseaudio[9244]: main.c: #011#011alsa.class = "generic"
pulseaudio[9244]: main.c: #011#011alsa.subclass = "generic-mix"
pulseaudio[9244]: main.c: #011#011alsa.name = "ALC269 Analog"
pulseaudio[9244]: main.c: #011#011alsa.id = "ALC269 Analog"
pulseaudio[9244]: main.c: #011#011alsa.subdevice = "0"
pulseaudio[9244]: main.c: #011#011alsa.subdevice_name = "subdevice #0"
pulseaudio[9244]: main.c: #011#011alsa.device = "0"
pulseaudio[9244]: main.c: #011#011alsa.card = "0"
pulseaudio[9244]: main.c: #011#011alsa.card_name = "HDA Intel"
pulseaudio[9244]: main.c: #011#011alsa.long_card_name = "HDA Intel at 0xf7eb8000 irq 16"
pulseaudio[9244]: main.c: #011#011alsa.driver_name = "snd_hda_intel"
pulseaudio[9244]: main.c: #011#011device.bus = "pci"
pulseaudio[9244]: main.c: #011#011device.vendor.id = "8086"
pulseaudio[9244]: main.c: #011#011device.vendor.name = "Intel Corporation"
pulseaudio[9244]: main.c: #011#011device.product.id = "27d8"
pulseaudio[9244]: main.c: #011#011device.product.name = "82801G (ICH7 Family) High Definition Audio Controller"
pulseaudio[9244]: main.c: #011#011device.form_factor = "internal"
pulseaudio[9244]: main.c: #011#011device.bus_path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
pulseaudio[9244]: main.c: #011#011hal.udi = "/org/freedesktop/Hal/devices/pci_8086_27d8_sound_card_0"
pulseaudio[9244]: main.c: #011#011hal.product = "HDA Intel Sound Card"
pulseaudio[9244]: main.c: #011#011hal.card_id = "HDA Intel"
pulseaudio[9244]: main.c: #011#011device.string = "front:0"
pulseaudio[9244]: main.c: #011#011device.buffering.buffer_size = "352768"
pulseaudio[9244]: main.c: #011#011device.buffering.fragment_size = "176384"
pulseaudio[9244]: main.c: #011#011device.access_mode = "mmap+timer"
pulseaudio[9244]: main.c: #011#011device.profile.name = "analog-stereo"
pulseaudio[9244]: main.c: #011#011device.profile.description = "Analog Stereo"
pulseaudio[9244]: main.c: #011#011device.description = "Internal Audio"
pulseaudio[9244]: main.c: #011#011device.icon_name = "audio-card-pci"
pulseaudio[9244]: main.c: 2 source(s) available.
pulseaudio[9244]: main.c:     index: 0
pulseaudio[9244]: main.c: #011name: <alsa_output.pci_8086_27d8_sound_card_0.monitor>
pulseaudio[9244]: main.c: #011driver: <module-alsa-card.c>
pulseaudio[9244]: main.c: #011flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
pulseaudio[9244]: main.c: #011state: IDLE
pulseaudio[9244]: main.c: #011volume: 0: 100% 1: 100%
pulseaudio[9244]: main.c: #011        0: 0.00 dB 1: 0.00 dB
pulseaudio[9244]: main.c: #011        balance 0.00
pulseaudio[9244]: main.c: #011base volume: 100%
pulseaudio[9244]: main.c: #011             0.00 dB
pulseaudio[9244]: main.c: #011volume steps: 65537
pulseaudio[9244]: main.c: #011muted: no
pulseaudio[9244]: main.c: #011current latency: 0.00 ms
pulseaudio[9244]: main.c: #011max rewind: 344 KiB
pulseaudio[9244]: main.c: #011sample spec: s16le 2ch 44100Hz
pulseaudio[9244]: main.c: #011channel map: front-left,front-right
pulseaudio[9244]: main.c: #011             Stereo
pulseaudio[9244]: main.c: #011used by: 0
pulseaudio[9244]: main.c: #011linked by: 0
pulseaudio[9244]: main.c: #011configured latency: 1999.82 ms; range is 0.50 .. 1999.82 ms
pulseaudio[9244]: main.c: #011monitor_of: 0
pulseaudio[9244]: main.c: #011card: 0 <alsa_card.pci_8086_27d8_sound_card_0>
pulseaudio[9244]: main.c: #011module: 4
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011device.description = "Monitor of Internal Audio"
pulseaudio[9244]: main.c: #011#011device.class = "monitor"
pulseaudio[9244]: main.c: #011#011alsa.card = "0"
pulseaudio[9244]: main.c: #011#011alsa.card_name = "HDA Intel"
pulseaudio[9244]: main.c: #011#011alsa.long_card_name = "HDA Intel at 0xf7eb8000 irq 16"
pulseaudio[9244]: main.c: #011#011alsa.driver_name = "snd_hda_intel"
pulseaudio[9244]: main.c: #011#011device.bus = "pci"
pulseaudio[9244]: main.c: #011#011device.vendor.id = "8086"
pulseaudio[9244]: main.c: #011#011device.vendor.name = "Intel Corporation"
pulseaudio[9244]: main.c: #011#011device.product.id = "27d8"
pulseaudio[9244]: main.c: #011#011device.product.name = "82801G (ICH7 Family) High Definition Audio Controller"
pulseaudio[9244]: main.c: #011#011device.form_factor = "internal"
pulseaudio[9244]: main.c: #011#011device.bus_path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
pulseaudio[9244]: main.c: #011#011hal.udi = "/org/freedesktop/Hal/devices/pci_8086_27d8_sound_card_0"
pulseaudio[9244]: main.c: #011#011hal.product = "HDA Intel Sound Card"
pulseaudio[9244]: main.c: #011#011hal.card_id = "HDA Intel"
pulseaudio[9244]: main.c: #011#011device.string = "0"
pulseaudio[9244]: main.c: #011#011device.icon_name = "audio-card-pci"
pulseaudio[9244]: main.c:   * index: 1
pulseaudio[9244]: main.c: #011name: <alsa_input.pci_8086_27d8_sound_card_0>
pulseaudio[9244]: main.c: #011driver: <module-alsa-card.c>
pulseaudio[9244]: main.c: #011flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
pulseaudio[9244]: main.c: #011state: SUSPENDED
pulseaudio[9244]: main.c: #011volume: 0: 100% 1: 100%
pulseaudio[9244]: main.c: #011        0: 0.00 dB 1: 0.00 dB
pulseaudio[9244]: main.c: #011        balance 0.00
pulseaudio[9244]: main.c: #011base volume:  67%
pulseaudio[9244]: main.c: #011             -29.00 dB
pulseaudio[9244]: main.c: #011volume steps: 65537
pulseaudio[9244]: main.c: #011muted: no
pulseaudio[9244]: main.c: #011current latency: 0.00 ms
pulseaudio[9244]: main.c: #011max rewind: 0 KiB
pulseaudio[9244]: main.c: #011sample spec: s16le 2ch 44100Hz
pulseaudio[9244]: main.c: #011channel map: front-left,front-right
pulseaudio[9244]: main.c: #011             Stereo
pulseaudio[9244]: main.c: #011used by: 0
pulseaudio[9244]: main.c: #011linked by: 0
pulseaudio[9244]: main.c: #011configured latency: 0.00 ms; range is 0.50 .. 1999.82 ms
pulseaudio[9244]: main.c: #011card: 0 <alsa_card.pci_8086_27d8_sound_card_0>
pulseaudio[9244]: main.c: #011module: 4
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011alsa.resolution_bits = "16"
pulseaudio[9244]: main.c: #011#011alsa.mixer_element = "Capture"
pulseaudio[9244]: main.c: #011#011device.api = "alsa"
pulseaudio[9244]: main.c: #011#011device.class = "sound"
pulseaudio[9244]: main.c: #011#011alsa.class = "generic"
pulseaudio[9244]: main.c: #011#011alsa.subclass = "generic-mix"
pulseaudio[9244]: main.c: #011#011alsa.name = "ALC269 Analog"
pulseaudio[9244]: main.c: #011#011alsa.id = "ALC269 Analog"
pulseaudio[9244]: main.c: #011#011alsa.subdevice = "0"
pulseaudio[9244]: main.c: #011#011alsa.subdevice_name = "subdevice #0"
pulseaudio[9244]: main.c: #011#011alsa.device = "0"
pulseaudio[9244]: main.c: #011#011alsa.card = "0"
pulseaudio[9244]: main.c: #011#011alsa.card_name = "HDA Intel"
pulseaudio[9244]: main.c: #011#011alsa.long_card_name = "HDA Intel at 0xf7eb8000 irq 16"
pulseaudio[9244]: main.c: #011#011alsa.driver_name = "snd_hda_intel"
pulseaudio[9244]: main.c: #011#011device.bus = "pci"
pulseaudio[9244]: main.c: #011#011device.vendor.id = "8086"
pulseaudio[9244]: main.c: #011#011device.vendor.name = "Intel Corporation"
pulseaudio[9244]: main.c: #011#011device.product.id = "27d8"
pulseaudio[9244]: main.c: #011#011device.product.name = "82801G (ICH7 Family) High Definition Audio Controller"
pulseaudio[9244]: main.c: #011#011device.form_factor = "internal"
pulseaudio[9244]: main.c: #011#011device.bus_path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
pulseaudio[9244]: main.c: #011#011hal.udi = "/org/freedesktop/Hal/devices/pci_8086_27d8_sound_card_0"
pulseaudio[9244]: main.c: #011#011hal.product = "HDA Intel Sound Card"
pulseaudio[9244]: main.c: #011#011hal.card_id = "HDA Intel"
pulseaudio[9244]: main.c: #011#011device.string = "front:0"
pulseaudio[9244]: main.c: #011#011device.buffering.buffer_size = "352768"
pulseaudio[9244]: main.c: #011#011device.buffering.fragment_size = "176384"
pulseaudio[9244]: main.c: #011#011device.access_mode = "mmap+timer"
pulseaudio[9244]: main.c: #011#011device.profile.name = "analog-stereo"
pulseaudio[9244]: main.c: #011#011device.profile.description = "Analog Stereo"
pulseaudio[9244]: main.c: #011#011device.description = "Internal Audio"
pulseaudio[9244]: main.c: #011#011device.icon_name = "audio-card-pci"
pulseaudio[9244]: main.c: 0 sink input(s) available.
pulseaudio[9244]: main.c: 0 source outputs(s) available.
pulseaudio[9244]: main.c: 2 client(s) logged in.
pulseaudio[9244]: main.c:     index: 0
pulseaudio[9244]: main.c: #011driver: <module-console-kit.c>
pulseaudio[9244]: main.c: #011owner module: 14
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011application.name = "ConsoleKit Session /org/freedesktop/ConsoleKit/Session5"
pulseaudio[9244]: main.c: #011#011console-kit.session = "/org/freedesktop/ConsoleKit/Session5"
pulseaudio[9244]: main.c:     index: 1
pulseaudio[9244]: main.c: #011driver: <protocol-native.c>
pulseaudio[9244]: main.c: #011owner module: 8
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011application.name = "libcanberra"
pulseaudio[9244]: main.c: #011#011native-protocol.peer = "UNIX socket client"
pulseaudio[9244]: main.c: #011#011native-protocol.version = "15"
pulseaudio[9244]: main.c: #011#011application.process.id = "9223"
pulseaudio[9244]: main.c: #011#011application.process.user = "gdm"
pulseaudio[9244]: main.c: #011#011application.process.host = "banana"
pulseaudio[9244]: main.c: #011#011application.process.binary = "metacity"
pulseaudio[9244]: main.c: #011#011window.x11.display = ":0.0"
pulseaudio[9244]: main.c: #011#011application.language = "en_US.UTF-8"
pulseaudio[9244]: main.c: #011#011application.process.machine_id = "76b042e2669e294fd5c374794a300c56"
pulseaudio[9244]: main.c: #011#011application.process.session_id = "76b042e2669e294fd5c374794a300c56-1249092582.784424-1547080767"
pulseaudio[9244]: main.c: 1 card(s) available.
pulseaudio[9244]: main.c:     index: 0
pulseaudio[9244]: main.c: #011name: <alsa_card.pci_8086_27d8_sound_card_0>
pulseaudio[9244]: main.c: #011driver: <module-alsa-card.c>
pulseaudio[9244]: main.c: #011owner module: 4
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011alsa.card = "0"
pulseaudio[9244]: main.c: #011#011alsa.card_name = "HDA Intel"
pulseaudio[9244]: main.c: #011#011alsa.long_card_name = "HDA Intel at 0xf7eb8000 irq 16"
pulseaudio[9244]: main.c: #011#011alsa.driver_name = "snd_hda_intel"
pulseaudio[9244]: main.c: #011#011device.bus = "pci"
pulseaudio[9244]: main.c: #011#011device.vendor.id = "8086"
pulseaudio[9244]: main.c: #011#011device.vendor.name = "Intel Corporation"
pulseaudio[9244]: main.c: #011#011device.product.id = "27d8"
pulseaudio[9244]: main.c: #011#011device.product.name = "82801G (ICH7 Family) High Definition Audio Controller"
pulseaudio[9244]: main.c: #011#011device.form_factor = "internal"
pulseaudio[9244]: main.c: #011#011device.bus_path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
pulseaudio[9244]: main.c: #011#011hal.udi = "/org/freedesktop/Hal/devices/pci_8086_27d8_sound_card_0"
pulseaudio[9244]: main.c: #011#011hal.product = "HDA Intel Sound Card"
pulseaudio[9244]: main.c: #011#011hal.card_id = "HDA Intel"
pulseaudio[9244]: main.c: #011#011device.string = "0"
pulseaudio[9244]: main.c: #011#011device.description = "Internal Audio"
pulseaudio[9244]: main.c: #011#011device.icon_name = "audio-card-pci"
pulseaudio[9244]: main.c: #011profiles:
pulseaudio[9244]: main.c: #011#011output-analog-stereo+input-analog-stereo: Output Analog Stereo + Input Analog Stereo (priority 81010)
pulseaudio[9244]: main.c: #011#011output-analog-stereo: Output Analog Stereo (priority 51000)
pulseaudio[9244]: main.c: #011#011input-analog-stereo: Input Analog Stereo (priority 30010)
pulseaudio[9244]: main.c: #011#011off: Off (priority 0)
pulseaudio[9244]: main.c: #011active profile: <output-analog-stereo+input-analog-stereo>
pulseaudio[9244]: main.c: #011sinks:
pulseaudio[9244]: main.c: #011#011alsa_output.pci_8086_27d8_sound_card_0/#0: Internal Audio
pulseaudio[9244]: main.c: #011sources:
pulseaudio[9244]: main.c: #011#011alsa_output.pci_8086_27d8_sound_card_0.monitor/#0: Monitor of Internal Audio
pulseaudio[9244]: main.c: #011#011alsa_input.pci_8086_27d8_sound_card_0/#1: Internal Audio
pulseaudio[9244]: main.c: 17 module(s) loaded.
pulseaudio[9244]: main.c:     index: 0
pulseaudio[9244]: main.c: #011name: <module-device-restore>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "Automatically restore the volume/mute state of devices"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 1
pulseaudio[9244]: main.c: #011name: <module-stream-restore>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "Automatically restore the volume/mute/device state of streams"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 2
pulseaudio[9244]: main.c: #011name: <module-card-restore>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "Automatically restore profile of cards"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 3
pulseaudio[9244]: main.c: #011name: <module-augment-properties>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "Augment the property sets of streams with additional static information"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 4
pulseaudio[9244]: main.c: #011name: <module-alsa-card>
pulseaudio[9244]: main.c: #011argument: <device_id=0 name=pci_8086_27d8_sound_card_0 card_name=alsa_card.pci_8086_27d8_sound_card_0 tsched=1>
pulseaudio[9244]: main.c: #011used: 0
pulseaudio[9244]: main.c: #011load once: no
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "ALSA Card"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 5
pulseaudio[9244]: main.c: #011name: <module-hal-detect>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Shahms King"
pulseaudio[9244]: main.c: #011#011module.description = "Detect available audio hardware and load matching drivers"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 6
pulseaudio[9244]: main.c: #011name: <module-bluetooth-discover>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Joao Paulo Rechi Vita"
pulseaudio[9244]: main.c: #011#011module.description = "Detect available bluetooth audio devices and load bluetooth audio drivers"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 7
pulseaudio[9244]: main.c: #011name: <module-esound-protocol-unix>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: no
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "ESOUND protocol (UNIX sockets)"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 8
pulseaudio[9244]: main.c: #011name: <module-native-protocol-unix>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: no
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "Native protocol (UNIX sockets)"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 9
pulseaudio[9244]: main.c: #011name: <module-gconf>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "GConf Adapter"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 10
pulseaudio[9244]: main.c: #011name: <module-default-device-restore>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "Automatically restore the default sink and source"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 11
pulseaudio[9244]: main.c: #011name: <module-rescue-streams>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "When a sink/source is removed, try to move their streams to the default sink/source"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 12
pulseaudio[9244]: main.c: #011name: <module-always-sink>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Colin Guthrie"
pulseaudio[9244]: main.c: #011#011module.description = "Always keeps at least one sink loaded even if it's a null one"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 13
pulseaudio[9244]: main.c: #011name: <module-suspend-on-idle>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "When a sink/source is idle for too long, suspend it"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 14
pulseaudio[9244]: main.c: #011name: <module-console-kit>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "Create a client for each ConsoleKit session of this user"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 15
pulseaudio[9244]: main.c: #011name: <module-position-event-sounds>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "Position event sounds between L and R depending on the position on screen of the widget triggering them."
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c:     index: 16
pulseaudio[9244]: main.c: #011name: <module-cork-music-on-phone>
pulseaudio[9244]: main.c: #011argument: <>
pulseaudio[9244]: main.c: #011used: -1
pulseaudio[9244]: main.c: #011load once: yes
pulseaudio[9244]: main.c: #011properties:
pulseaudio[9244]: main.c: #011#011module.author = "Lennart Poettering"
pulseaudio[9244]: main.c: #011#011module.description = "Mute or cork music while a phone stream exists"
pulseaudio[9244]: main.c: #011#011module.version = "0.9.15"
pulseaudio[9244]: main.c: 0 cache entrie(s) available.
kernel: integrated sync not supported
kernel: integrated sync not supported
kernel: integrated sync not supported
pulseaudio[9404]: pid.c: Daemon already running.
pulseaudio[9439]: pid.c: Daemon already running.
Comment 7 Stephen 2009-07-31 22:43:59 EDT
btw, sound from gdm is incredibly laggy.

With the first name in the gdm chooser selected, press the up arrow. The 'bongo' sound bongs... anything up to 2 seconds later.  That horrible guitar strum login sound always stutters in the middle.

Logged-in desktop sounds are responsive. Music, videos also fine.
Comment 8 Samuel Sieb 2009-07-31 23:52:53 EDT
On a hunch, I checked my default.pa file and discovered that there was a default.pa.rpmnew in the directory.  I moved it into place and now there's no problem with logging in.  However, gdm doesn't make a sound anymore even though it still starts up pulseaudio.  The other part that was probably causing a problem was that I had turned on the native-tcp module, and that is the port that was conflicting.  So if I put that back in, this problem will most likely start all over again.  gdm should kill its pulseaudio daemon or else I will have to set pulseaudio up as a system daemon instead.
Comment 9 Lennart Poettering 2009-08-01 12:40:38 EDT
(In reply to comment #6)

So here you go:

> pulseaudio[9244]: main.c: 2 client(s) logged in.
> pulseaudio[9244]: main.c:     index: 0
> pulseaudio[9244]: main.c: #011driver: <module-console-kit.c>
> pulseaudio[9244]: main.c: #011owner module: 14
> pulseaudio[9244]: main.c: #011properties:
> pulseaudio[9244]: main.c: #011#011application.name = "ConsoleKit Session
> /org/freedesktop/ConsoleKit/Session5"
> pulseaudio[9244]: main.c: #011#011console-kit.session =
> "/org/freedesktop/ConsoleKit/Session5"
> pulseaudio[9244]: main.c:     index: 1
> pulseaudio[9244]: main.c: #011driver: <protocol-native.c>
> pulseaudio[9244]: main.c: #011owner module: 8
> pulseaudio[9244]: main.c: #011properties:
> pulseaudio[9244]: main.c: #011#011application.name = "libcanberra"
> pulseaudio[9244]: main.c: #011#011native-protocol.peer = "UNIX socket client"
> pulseaudio[9244]: main.c: #011#011native-protocol.version = "15"
> pulseaudio[9244]: main.c: #011#011application.process.id = "9223"
> pulseaudio[9244]: main.c: #011#011application.process.user = "gdm"
> pulseaudio[9244]: main.c: #011#011application.process.host = "banana"
> pulseaudio[9244]: main.c: #011#011application.process.binary = "metacity"
> pulseaudio[9244]: main.c: #011#011window.x11.display = ":0.0"
> pulseaudio[9244]: main.c: #011#011application.language = "en_US.UTF-8"
> pulseaudio[9244]: main.c: #011#011application.process.machine_id =
> "76b042e2669e294fd5c374794a300c56"
> pulseaudio[9244]: main.c: #011#011application.process.session_id =
> "76b042e2669e294fd5c374794a300c56-1249092582.784424-1547080767"

1) The gdm session is listed in CK which tells us that PA is still necessary

2) metacity runs as gdm user and is keeps PA running, too.

Where is the problem here?
Comment 10 Samuel Sieb 2009-08-01 16:12:39 EDT
Why is metacity running as the gdm user?
Comment 11 Bastien Nocera 2009-08-01 18:04:06 EDT
(In reply to comment #9)
> (In reply to comment #6)
> 
> So here you go:
<snip>
> 1) The gdm session is listed in CK which tells us that PA is still necessary
> 
> 2) metacity runs as gdm user and is keeps PA running, too.
> 
> Where is the problem here?  

The problem is that metacity is being kept running, that stops gdm's PA from exiting, which stops the user's PA from running.

Can we have some proactivity isn't of gallic shrugging at problems?
Comment 12 Lennart Poettering 2009-08-07 09:46:21 EDT
Hm, so I really don't get what is considered a bug here, and why this is supposedly F12Blocker?

First of all, I don't see what the problem is with PA continuing to run for 5s after the gdm session exited. That's how we handle things for normal user sessions too, and I don't see how gdm should be handled differently here. Bastien, you mention "SELinux errors", could you please be a bit more elaborate about that?

I also get the idea that the output in #6 does not actually fit here. It suggests that the gdm session is actually active, given that metacity is still around and CK shows it as actvie still. In which case everything is fine. And if this indeed a dead session and CK is wrong and metacity some kind of orphan then the bug should be fixed in GDM or metacity or CK -- and not PA?

Bastien, please enlighten me what's the bug here!
Comment 13 Bastien Nocera 2009-08-07 09:59:05 EDT
*** Bug 514992 has been marked as a duplicate of this bug. ***
Comment 14 Bastien Nocera 2009-08-07 10:04:02 EDT
(In reply to comment #12)
> Hm, so I really don't get what is considered a bug here, and why this is
> supposedly F12Blocker?

The problem is that the GDM session isn't getting cleaned up properly.

> First of all, I don't see what the problem is with PA continuing to run for 5s
> after the gdm session exited. That's how we handle things for normal user
> sessions too, and I don't see how gdm should be handled differently here.

Well, maybe it's not a bug in PulseAudio then, but in GDM not cleaning up it session properly. Or a bug in gnome-session.

> Bastien, you mention "SELinux errors", could you please be a bit more elaborate
> about that?

You get errors through auditd about rejected messages. PulseAudio is trying to talk to bluetoothd, but as it belongs to GDM, it's not on the console. The bluetoothd D-Bus rules reject the message.

> I also get the idea that the output in #6 does not actually fit here. It
> suggests that the gdm session is actually active, given that metacity is still
> around and CK shows it as actvie still. In which case everything is fine. And
> if this indeed a dead session and CK is wrong and metacity some kind of orphan
> then the bug should be fixed in GDM or metacity or CK -- and not PA?

Hey, maybe not. A bit of swamp-draining would be appreciated. PA doesn't run in a vacuum.

> Bastien, please enlighten me what's the bug here!  

The problem is that, at the end of the day, audio doesn't work as expected once the user's logged in. That's a blocker.
Comment 15 Samuel Sieb 2009-08-07 10:37:48 EDT
I would be inclined to call this a gdm bug, that it should kill its pulseaudio daemon before logging the user in.  The problem is that if I enable the TCP protocol, the second pulseaudio session can't run.  Or should I just be running a --system pulseaudio daemon instead?  This also affects multi-user switching.
Comment 16 Lennart Poettering 2009-08-07 12:15:35 EDT
(In reply to comment #14)
> (In reply to comment #12)
> > Hm, so I really don't get what is considered a bug here, and why this is
> > supposedly F12Blocker?
> 
> The problem is that the GDM session isn't getting cleaned up properly.

Hmm? How's that? I mean, PA tries its best to escape the session since it is supposed to be a user daemon, not a session daemon.

So I really don't see how this is a bug in gdm either. There is no way how gdm could cleanup PA, since it cannot keep track of processes that try to escape its session management. 

I mean, you can argue that PA escaping the session manager is a bad idea, but that's a different question, and as long as D-Bus lacks a user bus this is going to stay that way. Also this was already discussed in long in the past.

Also, I don't see why no cleaning up the session correctly is a bug at all.

> > First of all, I don't see what the problem is with PA continuing to run for 5s
> > after the gdm session exited. That's how we handle things for normal user
> > sessions too, and I don't see how gdm should be handled differently here.
> 
> Well, maybe it's not a bug in PulseAudio then, but in GDM not cleaning up it
> session properly. Or a bug in gnome-session.

But neither gdm nor gnome-session could keep track of PA here, since PA actively tries to escape them. (by doing double fork, yadda yadda).
 
> > Bastien, you mention "SELinux errors", could you please be a bit more elaborate
> > about that?
> 
> You get errors through auditd about rejected messages. PulseAudio is trying to
> talk to bluetoothd, but as it belongs to GDM, it's not on the console. The
> bluetoothd D-Bus rules reject the message.

Hmm, so this is about bluetoothd usng at_console?

> > Bastien, please enlighten me what's the bug here!  
> 
> The problem is that, at the end of the day, audio doesn't work as expected once
> the user's logged in. That's a blocker.  

How exactly does audio not work? What's broken? A lingering PA from gdm should not influence the PA of the user session. 

Please describe how exactly the user's PA instance fails to work.
Comment 17 Lennart Poettering 2009-08-07 12:16:54 EDT
(In reply to comment #15)
> I would be inclined to call this a gdm bug, that it should kill its pulseaudio
> daemon before logging the user in.  The problem is that if I enable the TCP
> protocol, the second pulseaudio session can't run.  Or should I just be running
> a --system pulseaudio daemon instead?  This also affects multi-user switching.  

No, you should not enable it globally for all sessions. I mean, if you enable it globally all sessons will fight for the TCP port, isn't that expected and obvious?

The way to go here is to enable it locally for your user. You can do that very easily via paprefs, or simple by editing ~/.pulse/default.pa.
Comment 18 Bastien Nocera 2009-08-07 12:50:28 EDT
(In reply to comment #16)
> (In reply to comment #14)
> > (In reply to comment #12)
> > > Hm, so I really don't get what is considered a bug here, and why this is
> > > supposedly F12Blocker?
> > 
> > The problem is that the GDM session isn't getting cleaned up properly.
> 
> Hmm? How's that? I mean, PA tries its best to escape the session since it is
> supposed to be a user daemon, not a session daemon.
> 
> So I really don't see how this is a bug in gdm either. There is no way how gdm
> could cleanup PA, since it cannot keep track of processes that try to escape
> its session management. 
> 
> I mean, you can argue that PA escaping the session manager is a bad idea, but
> that's a different question, and as long as D-Bus lacks a user bus this is
> going to stay that way. Also this was already discussed in long in the past.
> 
> Also, I don't see why no cleaning up the session correctly is a bug at all.

It's a bug because it ends up causing problems in the user's session.

> > > First of all, I don't see what the problem is with PA continuing to run for 5s
> > > after the gdm session exited. That's how we handle things for normal user
> > > sessions too, and I don't see how gdm should be handled differently here.
> > 
> > Well, maybe it's not a bug in PulseAudio then, but in GDM not cleaning up it
> > session properly. Or a bug in gnome-session.
> 
> But neither gdm nor gnome-session could keep track of PA here, since PA
> actively tries to escape them. (by doing double fork, yadda yadda).
> 
> > > Bastien, you mention "SELinux errors", could you please be a bit more elaborate
> > > about that?
> > 
> > You get errors through auditd about rejected messages. PulseAudio is trying to
> > talk to bluetoothd, but as it belongs to GDM, it's not on the console. The
> > bluetoothd D-Bus rules reject the message.
> 
> Hmm, so this is about bluetoothd usng at_console?

That causes errors that are popped back through auditd, and into the SELinux applet.

> > > Bastien, please enlighten me what's the bug here!  
> > 
> > The problem is that, at the end of the day, audio doesn't work as expected once
> > the user's logged in. That's a blocker.  
> 
> How exactly does audio not work? What's broken? A lingering PA from gdm should
> not influence the PA of the user session. 
> 
> Please describe how exactly the user's PA instance fails to work.  

The bug is that gdm's PA isn't releasing the audio device, and the user's PA doesn't work.
Comment 19 Matthias Clasen 2009-08-07 13:37:25 EDT
Really, just make the gdm pa die with the login session. I realize there may be uses cases that require PAs odd per-user, session-escaping behaviour, but none of them involve the gdm user...
Comment 20 Lennart Poettering 2009-08-19 11:53:19 EDT
Hmm, there seems to be no way to synchronously kill PA from gdm when the gdm session ends. All we can do is do it asynchronously -- which we already do (although with a 2s delay).

So I am not sure how to fix this properly. Also, I am not really that concerned about this if all that this is about is that dbus logs a message.
Comment 21 Bastien Nocera 2009-08-19 13:55:54 EDT
(In reply to comment #20)
> Also, I am not really that concerned
> about this if all that this is about is that dbus logs a message.  

No, the bug is that audio doesn't work in the user's session.
Comment 22 Lennart Poettering 2009-08-19 16:03:20 EDT
What exactly doesn't work? Could you please be more elaborate? Is PA unable to discover the device? Does it appear in g-v-c?
Comment 23 Lennart Poettering 2009-08-23 22:26:59 EDT
OK, I think I tracked this down. It's a race between gdm's PA closing of the audio devices and the user session's PA opening them. Is fixed now upstream and would be in rawhide too, but perl is broken and makes it impossible for me to buid PA in koji.
Comment 24 Bastien Nocera 2009-09-16 10:01:18 EDT
*** Bug 523560 has been marked as a duplicate of this bug. ***
Comment 25 Bastien Nocera 2009-09-16 10:02:06 EDT
Reopen bug, as it also happens in Fedora 11:
https://bugzilla.redhat.com/show_bug.cgi?id=523560
Comment 26 Lennart Poettering 2009-09-16 22:34:54 EDT
Hmpf, these are different bugs.

BlueZ is not really compatible with session switching. That all that is to it.

PA not dying is unrelated to it. which is what this bug is about. Or which i made it to be about given that originally it was about multiple unrelated things... Will split this now again.

Note You need to log in before you can comment on or make changes to this bug.