Le 27/08/2014 12:50, Tanu Kaskinen a ?crit : > On Mon, 2014-08-25 at 10:31 +0200, DIEHCO R&D wrote: >> Le 24/08/2014 11:16, Tanu Kaskinen a ?crit : >>> On Wed, 2014-08-20 at 14:51 +0200, DIEHCO R&D wrote: >>>> Hello, I hope it is good place for my request. I am looking for some >>>> tips to configure the pulseaudio server on an embedded system. The >>>> program is in the system, but I have difficult to lauch it correctly. >>>> >>>> After setting >>>> DBUS_SESSION_BUS_ADDRESS=unix:path=/var/run/dbus/system_bus_socket and >>>> DBUS_SESSION_BUS_PID=`cat /var/run/dbus/pid` >>> Why do you do that? It's not exactly a surprise that things break if you >>> make PulseAudio connect to the system bus when PulseAudio expects a >>> session bus. >>> >> I understand now it was not a logical try. >> Maybe I can start from the beginning if someone can respond to me. >> So I am using Open Embedded daisy without X11, PulseAudio 5.0, Linux >> armv5tejl 2.6.37.6 #18 PREEMPT. >> crw-rw---- 1 root root 116, 16 Aug 25 07:09 pcmC0D0p >> Aplay works correctly from root but not from an other user (I should do >> setup of the sound card). >> From root : >> pulseaudio --system met the error shm.c: mmap() failed: Cannot allocate >> memory > Does this error prevent pulseaudio from starting? What's the output of > "pulseaudio --system -vvv --log-meta"? > Yes, pulseaudio is not running after that. See attached complete log. E: [pulseaudio] shm.c: mmap() failed: Cannot allocate memory E: [pulseaudio] core.c: pa_mempool_new() failed. E: [pulseaudio] main.c: pa_core_new() failed. Is it the usual way in embedded to launch from root with --system mode ? -------------- next part -------------- root at eukrea-cpuimx25:~# root at eukrea-cpuimx25:~# pulseaudio --system -vvv W: [pulseaudio] main.c: Running in system mode, but --disallow-exit not set! W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set! N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode! N: [pulseaudio] main.c: Running in system mode, forcibly disabling exit idle time! D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us. D: [pulseaudio] core-util.c: setpriority() worked. I: [pulseaudio] core-util.c: Successfully gained nice level -11. I: [pulseaudio] main.c: Found user 'pulse' (UID 998) and group 'pulse' (GID 1000). I: [pulseaudio] main.c: Successfully changed user to "pulse". I: [pulseaudio] main.c: This is PulseAudio 5.0 D: [pulseaudio] main.c: Compilation host: arm-oe-linux-gnueabi D: [pulseaudio] main.c: Compilation CFLAGS: -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wextra -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option D: [pulseaudio] main.c: Running on host: Linux armv5tejl 2.6.37.6 #18 PREEMPT Fri Mar 1 03:08:50 PST 2013 D: [pulseaudio] main.c: Found 1 CPUs. I: [pulseaudio] main.c: Page size is 4096 bytes D: [pulseaudio] main.c: Compiled with Valgrind support: no D: [pulseaudio] main.c: Running in valgrind mode: no D: [pulseaudio] main.c: Running in VM: no D: [pulseaudio] main.c: Optimized build: yes D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled. I: [pulseaudio] main.c: Machine ID is b58e603397a605bce66ca0af53f618c8. I: [pulseaudio] main.c: Using runtime directory /var/run/pulse. I: [pulseaudio] main.c: Using state directory /var/lib/pulse. I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-5.0/modules. I: [pulseaudio] main.c: Running in system mode: yes W: [pulseaudio] main.c: OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that. W: [pulseaudio] main.c: If you do it nonetheless then it's your own fault if things don't work as expected. W: [pulseaudio] main.c: Please read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an explanation why system mode is usually a bad idea. I: [pulseaudio] main.c: Fresh high-resolution timers available! Bon appetit! E: [pulseaudio] shm.c: mmap() failed: Cannot allocate memory E: [pulseaudio] core.c: pa_mempool_new() failed. E: [pulseaudio] main.c: pa_core_new() failed. root at eukrea-cpuimx25:~# root at eukrea-cpuimx25:~# root at eukrea-cpuimx25:~# root at eukrea-cpuimx25:~# root at eukrea-cpuimx25:~# pulseaudio --system -vvv --log-meta ; ps W: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioRunning in system mode, but --disallow-exit not set! W: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioRunning in system mode, but --disallow-module-loading not set! N: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioRunning in system mode, forcibly disabling SHM mode! N: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioRunning in system mode, forcibly disabling exit idle time! D: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioTimer slack is set to 50 us. D: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudiosetpriority() worked. I: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioSuccessfully gained nice level -11. I: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioFound user 'pulse' (UID 998) and group 'pulse' (GID 1000). I: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioSuccessfully changed user to "pulse". I: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioThis is PulseAudio 5.0 D: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioCompilation host: arm-oe-linux-gnueabi D: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioCompilation CFLAGS: -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wextra -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option D: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioRunning on host: Linux armv5tejl 2.6.37.6 #18 PREEMPT Fri Mar 1 03:08:50 PST 2013 D: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioFound 1 CPUs. I: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioPage size is 4096 bytes D: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioCompiled with Valgrind support: no D: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioRunning in valgrind mode: no D: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioRunning in VM: no D: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioOptimized build: yes D: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioFASTPATH defined, only fast path asserts disabled. I: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioMacase read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an explanation why system mode is usually a bad idea. I: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudioFresh high-resolution timers available! Bon appetit! E: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudiommap() failed: Cannot allocate memory E: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudiopa_mempool_new() failed. E: [pulseaudio][/home/vincent/oe_daisy/setup-scripts/build/tmp-defaultsetup-eglibc-eglibc/work/armv5te-oe-linux-gnueabi/pulseaudiopa_core_new() failed. PID USER VSZ STAT COMMAND 1 root 1716 S init [5] 2 root 0 SW [kthreadd] 3 root 0 SW [ksoftirqd/0] 5 root 0 SW [kworker/u:0] 6 root 0 SW< [khelper] 7 root 0 SW [sync_supers] 8 root 0 SW [bdi-default] 9 root 0 SW< [kblockd] 10 root 0 SW [khubd] 11 root 0 SW< [kmmcd] 12 root 0 SW< [cfg80211] 13 root 0 SW< [rpciod] 15 root 0 SW [kswapd0] 16 root 0 SW [fsnotify_mark] 17 root 0 SW< [aio] 18 root 0 SW< [nfsiod] 19 root 0 SW< [crypto] 28 root 0 SW [mtdblock0] 29 root 0 SW [mtdblock1] 30 root 0 SW [mtdblock2] 31 root 0 SW [mtdblock3] 32 root 0 SW [ubi_bgt0d] 35 root 0 SW [kworker/u:1] 36 root 0 SW< [usbhid_resumer] 37 root 0 SW< [l2cap] 38 root 0 SW< [krfcommd] 39 root 0 SW [imx_adc_ts] 40 root 0 SW [ubifs_bgt0_0] 47 root 1880 S /usr/bin/psplash --angle 0 195 messageb 2708 S /usr/bin/dbus-daemon --system 199 root 2288 S /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host_key -p 22 -B 206 root 3364 S /sbin/syslogd -n -O /var/log/messages 208 root 3364 S /sbin/klogd -n 211 root 2496 S /usr/sbin/crond 234 root 4528 S /home/root/bin/wd 236 root 4556 S /home/root/bin/plannification 241 root 3368 S /sbin/getty 115200 ttymxc0 242 root 3368 S /sbin/getty 38400 tty1 243 root 4580 S controle 244 root 4552 S attente XXX 245 root 4564 S tacheSon 246 root 4560 S menu 245 247 root 4568 S escargot FRA 0 245 248 root 2464 S /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host_key -p 22 -B 249 root 3544 S -sh 261 root 11752 S /usr/sbin/console-kit-daemon --no-daemon 1146 root 0 SW [kworker/0:2] 1212 root 0 SW [flush-ubifs_0_0] 1213 root 0 SW [kworker/0:0] 1325 root 0 SW [kworker/0:1] 1333 root 3544 R ps root at eukrea-cpuimx25:~#