[pulseaudio-discuss] Hpw to start the pa server

Gene Heskett gene.heskett at verizon.net
Mon Apr 12 12:33:21 PDT 2010


On Monday 12 April 2010, Colin Guthrie wrote:
>'Twas brillig, and Gene Heskett at 12/04/10 16:31 did gyre and gimble:
>> On Monday 12 April 2010, Colin Guthrie wrote:
>>> 'Twas brillig, and Gene Heskett at 12/04/10 07:34 did gyre and gimble:
>>>> How do I go about starting or restarting PA from a root shell?  None of
>>>> the other paman or pactl utilities can connect to the server so
>>>> everything is greyed out ATM.
>>>
>>> This is quite a specific question, but I want to ask a more basic
>>> question in return. Why do you want to run pulse from a root shell? Is
>>> there a specific reason to do this.
>>>
>>> Normally PA is started at X11 login by a normal user (see
>>> start-pulseaudio-x11) but also via autospawning whenever it's needed
>>> (see client.conf)
>>>
>>> The normal situation of running a sound producing application as root is
>>> to piggy back on to the X11 root window in order to get connection
>>> credentials. The root user would then connect to the users PA daemon and
>>> not create his own one.
>>>
>>> The reason for this revolves around which user is "active". When you
>>> become root via e.g. su or sudo, the root session is not considered
>>> "active" and thus consolekit will not hand over device control
>>> gracefully. If your sound h/w supports it, it would be possible to run
>>> two PAs at the same time, but like I say, it's generally easier to just
>>> piggy back on to the users PA via it's root window.
>>>
>>> See here for an explanation of how piggy backing on ot the X11 root
>>> window actually works.
>>>
>>> http://colin.guthr.ie/2009/08/sound-on-linux-is-confusing-defuzzing-part
>>>-2- pulseaudio/
>>>
>>> HTHs
>>
>> And I just found xinitd/50pulseaudio, which when I try to launch it as
>> root, replies:
>> [root at coyote xinit.d]# ./50pulseaudio
>> Pulseaudio startup disabled due to soundprofile configuration
>
>This means you've used draksound to configure your system not to use PA.
>draksound takes care of setting up autospawn and other things for you.
>
>If you use draksound to re-enable pulse, this will work (as will
> autospawn).
>
>> However, going into the desktop configuration tool->multimedia, shows
>> that the PAServer is the only facility, and the test audio button does
>> nothing but kill time while the test plays.  And running paman as me the
>> user now shows its connected.  But I'm still silent.
>
>When this happens (e.g. while it's silent but "playing", run pacmd ls
>and then pastebin or attach the oputput.
>
>Cheers.
>
I blew it, it wasn't trying to play anything.  Here is one where a cnn video 
(flash) was playing.


-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
The one charm of marriage is that it makes a life of deception a neccessity.
		-- Oscar Wilde
-------------- next part --------------
Welcome to PulseAudio! Use "help" for usage information.
>>> Memory blocks currently allocated: 2, size: 127.9 KiB.
Memory blocks allocated during the whole lifetime: 115138, size: 91.7 MiB.
Memory blocks imported from other processes: 0, size: 0 B.
Memory blocks exported to other processes: 0, size: 0 B.
Total sample cache size: 0 B.
Default sample spec: s16le 2ch 44100Hz
Default channel map: front-left,front-right
Default sink name: alsa_output.0.analog-stereo
Default source name: alsa_input.0.analog-stereo
Memory blocks of type POOL: 2 allocated/73996 accumulated.
Memory blocks of type POOL_EXTERNAL: 0 allocated/0 accumulated.
Memory blocks of type APPENDED: 0 allocated/0 accumulated.
Memory blocks of type USER: 0 allocated/0 accumulated.
Memory blocks of type FIXED: 0 allocated/33919 accumulated.
Memory blocks of type IMPORTED: 0 allocated/7223 accumulated.
23 module(s) loaded.
    index: 0
	name: <module-device-restore>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore the volume/mute state of devices"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 1
	name: <module-stream-restore>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore the volume/mute/device state of streams"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 2
	name: <module-card-restore>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore profile of cards"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 3
	name: <module-augment-properties>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Augment the property sets of streams with additional static information"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 4
	name: <module-alsa-sink>
	argument: <device=dmix>
	used: 0
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "ALSA Sink"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 5
	name: <module-alsa-sink>
	argument: <device_id=0>
	used: 0
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "ALSA Sink"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 6
	name: <module-alsa-source>
	argument: <device_id=0>
	used: 0
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "ALSA Source"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 8
	name: <module-bluetooth-discover>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Joao Paulo Rechi Vita"
		module.description = "Detect available bluetooth audio devices and load bluetooth audio drivers"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 9
	name: <module-esound-protocol-unix>
	argument: <>
	used: -1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "ESOUND protocol (UNIX sockets)"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 10
	name: <module-native-protocol-unix>
	argument: <>
	used: -1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "Native protocol (UNIX sockets)"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 11
	name: <module-zeroconf-publish>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "mDNS/DNS-SD Service Publisher"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 12
	name: <module-combine>
	argument: <>
	used: -1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "Combine multiple sinks to one"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 13
	name: <module-gconf>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "GConf Adapter"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 14
	name: <module-default-device-restore>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore the default sink and source"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 15
	name: <module-rescue-streams>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "When a sink/source is removed, try to move their streams to the default sink/source"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 16
	name: <module-always-sink>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Colin Guthrie"
		module.description = "Always keeps at least one sink loaded even if it's a null one"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 17
	name: <module-intended-roles>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically set device of streams based of intended roles of devices"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 18
	name: <module-suspend-on-idle>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "When a sink/source is idle for too long, suspend it"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 19
	name: <module-console-kit>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Create a client for each ConsoleKit session of this user"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 20
	name: <module-position-event-sounds>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Position event sounds between L and R depending on the position on screen of the widget triggering them."
		module.version = "0.9.21-0.1mdv2010.0"
    index: 21
	name: <module-cork-music-on-phone>
	argument: <>
	used: -1
	load once: yes
	properties:
		module.author = "Lennart Poettering"
		module.description = "Mute or cork music while a phone stream exists"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 22
	name: <module-device-manager>
	argument: <do_routing=1>
	used: -1
	load once: yes
	properties:
		module.author = "Colin Guthrie"
		module.description = "Keep track of devices (and their descriptions) both past and present and prioritise by role"
		module.version = "0.9.21-0.1mdv2010.0"
    index: 23
	name: <module-cli-protocol-unix>
	argument: <>
	used: -1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "Command line interface protocol (UNIX sockets)"
		module.version = "0.9.21-0.1mdv2010.0"
3 sink(s) available.
    index: 0
	name: <alsa_output.dmix>
	driver: <module-alsa-sink.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME 
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 9000
	volume: 0: 480% 1: 480%
	        0: 40.87 dB 1: 40.87 dB
	        balance 0.00
	base volume: 100%
	             0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 0
	sample spec: s16le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	fixed latency: 106.67 ms
	module: 4
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "dmix"
		alsa.id = "dmix"
		alsa.subdevice = "0"
		alsa.subdevice_name = "dmix"
		alsa.device = "0"
		device.string = "dmix"
		device.buffering.buffer_size = "20480"
		device.buffering.fragment_size = "4096"
		device.access_mode = "mmap"
		device.description = "dmix"
		device.icon_name = "audio-card"
  * index: 1
	name: <alsa_output.0.analog-stereo>
	driver: <module-alsa-sink.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 9059
	volume: 0: 279% 1: 279%
	        0: 26.72 dB 1: 26.72 dB
	        balance 0.00
	base volume: 100%
	             0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 1
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 371.52 ms
	module: 5
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ADC Capture/Standard PCM Playback"
		alsa.id = "emu10k1"
		alsa.subdevice = "1"
		alsa.subdevice_name = "subdevice #1"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "SB Audigy 2 Value [SB0400]"
		alsa.long_card_name = "SB Audigy 2 Value [SB0400] (rev.0, serial:0x10011102) at 0x9c00, irq 17"
		alsa.driver_name = "snd_emu10k1"
		device.bus_path = "/devices/pci0000:00/0000:00:06.0/0000:01:07.0/sound/card0"
		sysfs.path = "/devices/pci0000:00/0000:00:06.0/0000:01:07.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "1102"
		device.product.id = "0008"
		hal.udi = "/org/freedesktop/Hal/devices/pci_1102_8_sound_card_0"
		hal.product = "SB Audigy 2 Value [SB0400] (rev.0, serial:0x10011102) Sound Card"
		hal.card_id = "SB Audigy 2 Value [SB0400] (rev.0, serial:0x10011102)"
		device.string = "front:0"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "65536"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "SB Audigy 2 Value [SB0400] Analog Stereo"
		alsa.mixer_name = "SigmaTel STAC9750,51"
		alsa.components = "AC97a:83847650"
		device.icon_name = "audio-card-analog-pci"
	ports:
		analog-output;output-amplifier-on: Analog Output / Amplifier (priority 9910)
		analog-output;output-amplifier-off: Analog Output / No Amplifier (priority 9900)
		analog-output-headphones;output-amplifier-on: Analog Headphones / Amplifier (priority 9010)
		analog-output-headphones;output-amplifier-off: Analog Headphones / No Amplifier (priority 9000)
	active port: <analog-output;output-amplifier-on>
    index: 2
	name: <combined>
	driver: <module-combine.c>
	flags: DECIBEL_VOLUME LATENCY FLAT_VOLUME 
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 1000
	volume: 0: 290% 1: 290%
	        0: 27.70 dB 1: 27.70 dB
	        balance 0.00
	base volume: 100%
	             0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max request: 34 KiB
	max rewind: 0 KiB
	monitor source: 3
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	fixed latency: 200.00 ms
	module: 12
	properties:
		device.class = "filter"
		device.description = "Simultaneous output to dmix, SB Audigy 2 Value [SB0400] Analog Stereo"
		device.icon_name = "audio-card"
4 source(s) available.
    index: 0
	name: <alsa_output.dmix.monitor>
	driver: <module-alsa-sink.c>
	flags: DECIBEL_VOLUME LATENCY 
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 1000
	volume: 0: 400% 1: 400%
	        0: 36.12 dB 1: 36.12 dB
	        balance 0.00
	base volume: 100%
	             0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max rewind: 0 KiB
	sample spec: s16le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	fixed latency: 106.67 ms
	monitor_of: 0
	module: 4
	properties:
		device.description = "Monitor of dmix"
		device.class = "monitor"
		device.icon_name = "audio-input-microphone"
    index: 1
	name: <alsa_output.0.analog-stereo.monitor>
	driver: <module-alsa-sink.c>
	flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 1000
	volume: 0: 271% 1: 271%
	        0: 25.99 dB 1: 25.99 dB
	        balance 0.00
	base volume: 100%
	             0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max rewind: 0 KiB
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 371.52 ms
	monitor_of: 1
	module: 5
	properties:
		device.description = "Monitor of SB Audigy 2 Value [SB0400] Analog Stereo"
		device.class = "monitor"
		device.icon_name = "audio-input-microphone"
  * index: 2
	name: <alsa_input.0.analog-stereo>
	driver: <module-alsa-source.c>
	flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 9059
	volume: 0: 418% 1: 418%
	        0: 37.25 dB 1: 37.25 dB
	        balance 0.00
	base volume: 100%
	             0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max rewind: 0 KiB
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 371.52 ms
	module: 6
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ADC Capture/Standard PCM Playback"
		alsa.id = "emu10k1"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "SB Audigy 2 Value [SB0400]"
		alsa.long_card_name = "SB Audigy 2 Value [SB0400] (rev.0, serial:0x10011102) at 0x9c00, irq 17"
		alsa.driver_name = "snd_emu10k1"
		device.bus_path = "/devices/pci0000:00/0000:00:06.0/0000:01:07.0/sound/card0"
		sysfs.path = "/devices/pci0000:00/0000:00:06.0/0000:01:07.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "1102"
		device.product.id = "0008"
		hal.udi = "/org/freedesktop/Hal/devices/pci_1102_8_sound_card_0"
		hal.product = "SB Audigy 2 Value [SB0400] (rev.0, serial:0x10011102) Sound Card"
		hal.card_id = "SB Audigy 2 Value [SB0400] (rev.0, serial:0x10011102)"
		device.string = "front:0"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "SB Audigy 2 Value [SB0400] Analog Stereo"
		alsa.mixer_name = "SigmaTel STAC9750,51"
		alsa.components = "AC97a:83847650"
		device.icon_name = "audio-input-microphone-analog-pci"
    index: 3
	name: <combined.monitor>
	driver: <module-combine.c>
	flags: DECIBEL_VOLUME LATENCY 
	state: SUSPENDED
	suspend cause: IDLE 
	priority: 1000
	volume: 0: 480% 1: 480%
	        0: 40.87 dB 1: 40.87 dB
	        balance 0.00
	base volume: 100%
	             0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max rewind: 0 KiB
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	fixed latency: 200.00 ms
	monitor_of: 2
	module: 12
	properties:
		device.description = "Monitor Source of Simultaneous output to dmix, SB Audigy 2 Value [SB0400] Analog Stereo"
		device.class = "monitor"
		device.icon_name = "audio-input-microphone"
3 client(s) logged in.
    index: 0
	driver: <module-console-kit.c>
	owner module: 19
	properties:
		application.name = "ConsoleKit Session /org/freedesktop/ConsoleKit/Session1"
		console-kit.session = "/org/freedesktop/ConsoleKit/Session1"
    index: 17
	driver: <protocol-native.c>
	owner module: 10
	properties:
		application.name = "libcanberra"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "16"
		application.id = "org.freedesktop.Notifications"
		window.x11.screen = ":0"
		application.process.id = "6421"
		application.process.user = "gene"
		application.process.host = "coyote.coyote.den"
		application.process.binary = "notification-daemon"
		application.language = "C"
		window.x11.display = ":0"
		application.process.machine_id = "e3798933d9477c588aeff5a04a5f4893"
		application.process.session_id = "e3798933d9477c588aeff5a04a5f4893-1271088948.504017-1317440216"
    index: 32
	driver: <cli.c>
	owner module: 23
	properties:
		application.name = "UNIX socket client"
0 card(s) available.
0 sink input(s) available.
0 source outputs(s) available.
0 cache entrie(s) available.
>>> 


More information about the pulseaudio-discuss mailing list