# Problem z konfiguracja i uruchomieniem pulseaudio

## plusz01

Witam!

Mam pewien problem z konfiguracją pulseaudio. Korzystałem z tej strony http://en.gentoo-wiki.com/wiki/PulseAudio ale j. angielski znam srednio wiec dużą część musiałęm się domyślać moj problem polega na tym że jak chce włączyć pulse audio "/etc/init.d/pulseaudio start" to sie nie uruchamia nie zwraca tez błędu tylko 2 czerwone wykrzykniki [!!] jak skonfigurowac te 3 pliki konfiguracyjne bo nie są one opisane w tym poradniku co korzystałem proszę o pomoc i z góry dziękuję za pomoc

----------

## plusz01

Naprawde nikt nie może mi pomoc to dla mnie ważne a nie moge sobie z tym poradzić

----------

## lmmsci

Wiesz, spokojnie  :Wink:  Ostatnio ruch na forum nie jest zbyt wielki, więc po prostu cierpliwie poczekaj (w tzw. międzyczasie szlifując angielski  :Smile:  ). Próbowałeś googlać np. pulseaudio + configuration ?

----------

## caruso

Witam,

spróbuj w konsoli wklepac pulseaudio i wklej co wyskoczy.

----------

## plusz01

Wynki polecenia pulseaudio jezeli uruchamiam jako root:

 *Quote:*   

> W: main.c: This program is not intended to be run as root (unless --system is specified).
> 
> E: main.c: daemon startup without any loaded modules, refusing to work.

 

A to jak uruchamiam jako zwykly user:

 *Quote:*   

> N: main.c: Called SUID root and real-time/high-priority scheduling was requested in the configuration. However, we lack the necessary priviliges:
> 
> N: main.c: We are not in group 'realtime' and PolicyKit refuse to grant us priviliges. Dropping SUID again.
> 
> N: main.c: For enabling real-time scheduling please acquire the appropriate PolicyKit priviliges, or become a member of 'realtime', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user.
> ...

 

----------

## caruso

Ta droga chyba nic nam nie powie.  Sprawdz w logach po uruchomieniu usługi pulseaudio co wyskakuje i wklej na forum. Jeżeli masz plik /var/log/everything/current to możesz zrobić to następująco:

cat /var/log/everything/current  | grep pulse > /tmp/xxx

i wklejasz zawartosc /tmp/xxx. Oczywiście spod konta roota.

----------

## plusz01

Tylko że nie ma żadnych logow pulseaudio przynajmniej w katalogu /var/log/. pulseaudio sie wogole nie uruchamia jak daje /etc/init.d/pulseaudio start to mam tylko [!!] przeszukalem system w poszukiwaniu wszystkich logów "find -name *.log" ale nie znalazlo nic do pulseaudio

----------

## rofro

po prostu wklej wynik tej komendy:

```
cat /var/log/everything/current | grep pulse > /tmp/xxx 
```

Ze zrozumieniem czytaj

----------

## plusz01

cat: /var/log/everything/current: Nie ma takiego pliku ani katalogu

----------

## caruso

Masz uruchomionego jakiegos logera? Czy /var/log/* masz kompletnie puste?

----------

## plusz01

mam syslog-ng bo w /var/log/ sa tam logi innych programow

EDIT: 

Jeżeli to pomoże to w pliku /var/log/messages znalazlem cos takiego:

```
Mar 15 21:36:12 localhost pulseaudio[12624]: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operacja niedozwolona

Mar 15 21:36:12 localhost pulseaudio[12624]: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operacja niedozwolona

Mar 15 21:36:12 localhost pulseaudio[12624]: main.c: daemon startup without any loaded modules, refusing to work.

Mar 15 21:36:12 localhost pulseaudio[12623]: main.c: daemon startup failed.
```

----------

## caruso

Właśnie o coś takiego mi chodziło.

/etc/pulse/default.pa:

Pisze żeby dodać/odkomentować:

load-module module-x11-publish

load-module module-gconf

load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16

i prawdopodobnie:

load-module module-alsa-sink

----------

## plusz01

Ok brakowało tylko jednego 

 *Quote:*   

> load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16 

 

reszta była odhaszowana ale pulse dalej się nie włącza. Może inne pliki konfiguracyjne sa zle skonfigurowane oto moje pliki

/etc/pulse/client.conf

```
# $Id: client.conf.in 2030 2007-11-08 22:31:30Z lennart $

#

# 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, write to the Free Software

# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307

# USA.

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

## more information. Default values a commented out.  Use either ; or # for

## commenting.

 default-sink =

 default-source =

 default-server =

 autospawn = no

 daemon-binary = /usr/bin/pulseaudio

 extra-arguments =

 cookie-file =

 disable-shm = 

```

/etc/pulse/daemon.conf

```
# $Id: daemon.conf.in 2067 2007-11-21 01:30:40Z lennart $

#

# 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, write to the Free Software

# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307

# USA.

## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for

## more information. Default values a commented out.  Use either ; or # for

## commenting.

 daemonize = no

 fail = yes

 disallow-module-loading = no

 use-pid-file = yes

 system-instance = no

 disable-shm = no

 high-priority = yes

 nice-level = -11

 realtime-scheduling = no

 realtime-priority = 5

 exit-idle-time = -1

 module-idle-time = 20

 scache-idle-time = 20

 dl-search-path = /usr/lib/pulse-0.9/modules/

 default-script-file = 

 log-target = auto

 log-level = notice

 resample-method = speex-float-3

 disable-remixing = no

 no-cpu-limit = no

 rlimit-as = -1

 rlimit-core = -1

 rlimit-data = -1

 rlimit-fsize = -1

 rlimit-nofile = 256

 rlimit-stack = -1

 rlimit-nproc = -1

 rlimit-memlock = -1

 rlimit-nice = 31

 rlimit-rtprio = 9

 default-sample-format = s16le

 default-sample-rate = 44100

 default-sample-channels = 2

 default-fragments = 4

 default-fragment-size-msec = 25

```

i /etc/pulse/default.pa

```
#!/usr/bin/pulseaudio -nF

#

# 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, write to the Free Software Foundation,

# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

.nofail

### Load something into the sample cache

#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav

load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav

#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav

#load-sample-lazy pulse-access /usr/share/sounds/generic.wav

.fail

### Load audio drivers statically (it's probably better to not load

### these drivers manually, but instead use module-hal-detect --

### see below -- for doing this automatically)

load-module module-alsa-sink

#load-module module-alsa-source device=hw:1,0

#load-module module-oss device="/dev/dsp" sink_name=output source_name=input

#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input

#load-module module-null-sink

#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available

.ifexists /usr/lib/pulse-0.9/modules//module-hal-detect.so

load-module module-hal-detect

.else

### Alternatively use the static hardware detection module (for systems that

### lack HAL support)

load-module module-detect

.endif

### Load several protocols

load-module module-esound-protocol-unix

load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented

### here if you plan to use paprefs)

#load-module module-esound-protocol-tcp

#load-module module-native-protocol-tcp

#load-module module-zeroconf-publish

### Load the RTP reciever module (also configured via paprefs, see above)

#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)

#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 description="RTP Multicast Sink"

#load-module module-rtp-send source=rtp.monitor

### Automatically restore the volume of playback streams

load-module module-volume-restore

### Automatically restore the default sink/source when changed by the user during runtime

load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are

### connected to dies, similar for sources

load-module module-rescue-streams

### Automatically suspend sinks/sources that become idle for too long

load-module module-suspend-on-idle

### Load X11 bell module

#load-module module-x11-bell sample=x11-bell

### Publish connection data in the X11 root window

.ifexists /usr/lib/pulse-0.9/modules//module-x11-publish.so

load-module module-x11-publish

.endif

### Register ourselves in the X11 session manager

# Deactivated by default, to avoid deadlock when PA is started as esd from gnome-session

# Instead we load this via /etc/xdg/autostart/ and "pactl load-module" now

# load-module module-x11-xsmp

### Load additional modules from GConf settings. This can be configured with the paprefs tool.

### Please keep in mind that the modules configured by paprefs might conflict with manually

### loaded modules.

.ifexists /usr/lib/pulse-0.9/modules//module-gconf.so

load-module module-gconf

.endif

### Make some devices default

#set-default-sink output

#set-default-source input

load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16 

```

----------

## caruso

Wygląda na to że sie pomyliłem i powinno byc:

```
load-module module-x11-publish

load-module module-gconf 
```

zakomentowane.

A 

```
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16

load-module module-alsa-sink
```

dodane.

[edit]

W logach wyskakuje ten sam komunikat błędu?

----------

## plusz01

Tak jest ten sam

EDIT

Zakomentowalem ale dalej nie mozna uruchomic pulseaudio

----------

## caruso

Z jakimi flagami emergowałeś pulseaudio?

----------

## plusz01

a make.conf: alsa oss X avahi dbus hal jack tcpd

a w /etc/portage/package.use nie mam żadnych flag do pulseaudio

----------

## SlashBeast

...

Wklej co Ci zwraca emerge pulseaudio -pv

----------

## plusz01

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] media-sound/pulseaudio-0.9.9  USE="X alsa avahi dbus hal jack oss tcpd -asyncns (-bluetooth) -caps -gnome -libsamplerate -lirc (-policykit)" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

----------

## plusz01

Witam odświerzę troche temat po zainstalowaniu nowszej wersji pulseaduio po wpisaniu komendy pulseaudio mam taki komunikat

```
W: main.c: This program is not intended to be run as root (unless --system is specified).

N: module-alsa-sink.c: Disabling timer-based scheduling because high-resolution timers are not available from the kernel.

W: alsa-util.c: Device default doesn't support 44100 Hz, changed to 48000 Hz.

W: alsa-util.c: Device default doesn't support sample format s16le, changed to s32le.

N: module-alsa-sink.c: Disabling timer-based scheduling because high-resolution timers are not available from the kernel.

E: alsa-util.c: Error opening PCM device hw:0: UrzÄdzenie lub zasoby zajÄte

E: module.c: Failed to load  module "module-alsa-sink" (argument: "device_id=0 sink_name=alsa_output.pci_10de_3f0_alsa_playback_0 tsched=1"): initialization failed.

N: module-alsa-source.c: Disabling timer-based scheduling because high-resolution timers are not available from the kernel.
```

a jak uruchomie /etc/init.d/pulseaudio start to po wpisaniu w konsoli pulseaudio cos takiego

```
W: main.c: This program is not intended to be run as root (unless --system is specified).

N: module-alsa-sink.c: Disabling timer-based scheduling because high-resolution timers are not available from the kernel.

W: alsa-util.c: Device default doesn't support 44100 Hz, changed to 48000 Hz.

W: alsa-util.c: Device default doesn't support sample format s16le, changed to s32le.

N: module-alsa-sink.c: Disabling timer-based scheduling because high-resolution timers are not available from the kernel.

E: alsa-util.c: Error opening PCM device hw:0: UrzÄdzenie lub zasoby zajÄte

E: module.c: Failed to load  module "module-alsa-sink" (argument: "device_id=0 sink_name=alsa_output.pci_10de_3f0_alsa_playback_0 tsched=1"): initialization failed.

N: module-alsa-source.c: Disabling timer-based scheduling because high-resolution timers are not available from the kernel.

E: socket-server.c: bind(): Adres jest juÅŒ w uÅŒyciu

E: module.c: Failed to load  module "module-esound-protocol-unix" (argument: ""): initialization failed.

E: main.c: Module load failed.

E: main.c: Failed to initialize daemon.
```

----------

## p1c2u

masz uzytkowników w grupach pulse i pulse-access?

----------

## plusz01

Tak oczywiscie

----------

## p1c2u

Wiec moze powiem jak ja mam ustawione (ze zdalnym dostepem).

client.cong

wszystko zakomentowalem oprocz cookie-file gdzie podalem sciezke z ciastkiem z innego serwera PA.

daemon.cfg:

podaje tylko uzyte parametry

```

 use-pid-file = yes

 nice-level = -11

 no-cpu-limit = no

 default-sample-rate = 48000

 default-fragments = 8

 default-fragment-size-msec = 5

```

default.pa

```

.nofail

load-sample-lazy pulse-access /usr/share/sounds/generic.wav

.fail

load-module module-device-restore

load-module module-stream-restore

.ifexists module-hal-detect.so

load-module module-hal-detect

.else

load-module module-detect

.endif

load-module module-native-protocol-unix

load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;10.0.1.0/16

load-module module-zeroconf-publish

load-module module-default-device-restore

load-module module-rescue-streams

load-module module-always-sink

load-module module-suspend-on-idle

load-module module-console-kit

load-module module-position-event-sounds

.ifexists module-gconf.so

.nofail

load-module module-gconf

.fail

.endif

```

przy load-module module-native-protocol-tcp auth-ip-acl musisz podac swoja siec

W preferencjach PA trzeba pamietac o zaznaczeniu "Dostęp sieciowy do lokalnych urządzeń sieciowych" i "Bez wymogu uwierzyteniania"

Taka konfiguracja u mnie działa lokalnie i zdalnie.

----------

## plusz01

Nawet przy takiej konfiguracji jak podal kolega wyzej nie dziala dzwiek z pulse audio

----------

## ryba84

 *Quote:*   

> E: alsa-util.c: Error opening PCM device hw:0: UrzÄdzenie lub zasoby zajÄte

  Nie masz przypadkiem odpalonego innego programu używającego alsy?

Alsa skonfigurowana?

----------

