[pulseaudio-discuss] paplay by normal user, would launch pulseaudio daemon automatically

Chen, Hao H hao.h.chen at intel.com
Wed Dec 17 07:51:17 PST 2008


Hi,

Strange behavior for paplay. 
[As normal user]
No pulseaudio daemon launched before, paplay audio file => caused new pulseaudio daemon launched automatically.
[As root]
No pulseaudio daemon launched before, paplay audio file, "connection refused"

Please refer to attached logs of normal user and root.
Tested on FC10, with pulseaudio 0.9.13 integrated.

===========log:  as normal user===============
(Notes:
1> Though paplay caused pa daemon launched,while without alsa sink/source module loaded, (instead null-sink attached) maybe it's due to access configuration of alsa framework for this normal user.
2> After somewhile , PA daemon quits, I guess it's due to exit-idle-time=20, or internal time out
3>this normal user account is created, just using command "useradd test"
)

[root at hchen59 ~]# su test
[test at hchen59 root]$ ps -f -U test | grep pulse
test   16917 16897  0 22:36 pts/2    00:00:00 grep pulse
[test at hchen59 root]$ paplay /usr/share/sounds/alsa/Side_Left.wav
I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
I: caps.c: Dropping root privileges.
I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
[WARN 16940] polkit-session.c:144:polkit_session_set_uid(): session != NULL
 Not built with -rdynamic so unable to print a backtrace
[test at hchen59 root]$ ps -f -U test | grep pulse
test   16943     1  1 22:37 ?        00:00:00 /usr/bin/pulseaudio --start --log-target=syslog
test   16945 16943  0 22:37 ?        00:00:00 /usr/libexec/pulse/gconf-helper
test   16949 16897  0 22:37 pts/2    00:00:00 grep pulse
[test at hchen59 root]$ pacmd
Welcome to PulseAudio! Use "help" for usage information.
>>> list-sinks
1 sink(s) available.
    index: 0
	name: <auto_null>
	driver: <modules/module-null-sink.c>
	flags: DECIBEL_VOLUME LATENCY 
	state: SUSPENDED
	volume: 0:   0% 1:   0%
	muted: no
	current latency: 0.00 ms
	configured latency: 0.00 ms; range is 4.00 .. 2000.00 ms
	max request: 344 KiB
	max rewind: 344 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	used by: 0
	linked by: 0
	module: 7
	properties:
device.description = "Null Output"
device.class = "abstract"
>>> list-modules
14 module(s) loaded.
    index: 0
	name: <module-hal-detect>
	argument: <>
	used: -1
	auto unload: no
    index: 1
	name: <module-esound-protocol-unix>
	argument: <>
	used: -1
	auto unload: no
    index: 2
	name: <module-native-protocol-unix>
	argument: <>
	used: -1
	auto unload: no
    index: 3
	name: <module-stream-restore>
	argument: <>
	used: -1
	auto unload: no
    index: 4
	name: <module-device-restore>
	argument: <>
	used: -1
	auto unload: no
    index: 5
	name: <module-default-device-restore>
	argument: <>
	used: -1
	auto unload: no
    index: 6
	name: <module-rescue-streams>
	argument: <>
	used: -1
	auto unload: no
    index: 7
	name: <module-null-sink>
	argument: <sink_name=auto_null>
	used: -1
	auto unload: no
    index: 8
	name: <module-always-sink>
	argument: <>
	used: -1
	auto unload: no
    index: 9
	name: <module-suspend-on-idle>
	argument: <>
	used: -1
	auto unload: no
    index: 10
	name: <module-console-kit>
	argument: <>
	used: -1
	auto unload: no
    index: 11
	name: <module-position-event-sounds>
	argument: <>
	used: -1
	auto unload: no
    index: 12
	name: <module-gconf>
	argument: <>
	used: -1
	auto unload: no
    index: 13
	name: <module-cli-protocol-unix>
	argument: <>
	used: -1
	auto unload: no
>>> ^C
[test at hchen59 root]$ ps -f -U test | grep pulse
test   16974 16897  0 22:39 pts/2    00:00:00 grep pulse
[test at hchen59 root]$ pulseaudio --dump-conf | grep idle
I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
I: caps.c: Dropping root privileges.
I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
[WARN 16979] polkit-session.c:144:polkit_session_set_uid(): session != NULL
 Not built with -rdynamic so unable to print a backtrace
E: polkit.c: Cannot set UID on session object.
N: main.c: Called SUID root and real-time/high-priority scheduling was requested in the configuration. However, we lack the necessary privileges:
N: main.c: We are not in group 'pulse-rt' and PolicyKit refuse to grant us privileges. Dropping SUID again.
N: main.c: For enabling real-time scheduling please acquire the appropriate PolicyKit privileges, or become a member of 'pulse-rt', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user.
W: main.c: High-priority scheduling enabled in configuration but not allowed by policy.
exit-idle-time = 20
module-idle-time = 20
scache-idle-time = 20

==============log:  as root=================
[root at hchen59 ~]# ps -f -U root | grep pulseaudio
root     17036 15450  0 22:43 pts/1    00:00:00 grep pulseaudio
[root at hchen59 ~]# paplay /usr/share/sounds/alsa/Side_Left.wav
Connection failure: Connection refused
[root at hchen59 ~]# pulseaudio --exit-idle-time=-1 --start
W: main.c: This program is not intended to be run as root (unless --system is specified).
[root at hchen59 ~]# ps -f -U root | grep pulseaudio
root     12035     1  0 16:39 ?        00:00:00 pulseaudio --exit-idle-time=-1 --start
root     16997 15450  0 22:40 pts/1    00:00:00 grep pulseaudio
[root at hchen59 ~]# pacmd
Welcome to PulseAudio! Use "help" for usage information.
>>> list-sinks
1 sink(s) available.
  * index: 0
	name: <alsa_output.pci_8086_284b_sound_card_0_alsa_playback_0>
	driver: <modules/module-alsa-sink.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
	state: SUSPENDED
	volume: 0:  37% 1:  37%
	muted: no
	current latency: 0.00 ms
	configured latency: 0.00 ms; range is 4.00 .. 371.52 ms
	max request: 64 KiB
	max rewind: 64 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	used by: 0
	linked by: 0
	module: 0
	properties:
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC262 Analog"
alsa.id = "ALC262 Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "HDA Intel"
alsa.long_card_name = "HDA Intel at 0xf0620000 irq 21"
device.description = "HDA Intel - ALC262 Analog"
device.string = "front:0"
device.buffering.buffer_size = "65536"
device.buffering.fragment_size = "32768"
device.access_mode = "mmap+timer"
>>> ^C
[root at hchen59 ~]# paplay /usr/share/sounds/alsa/Side_Left.wav
[root at hchen59 ~]#



More information about the pulseaudio-discuss mailing list