Ticket #1729 (new defect)

Opened 5 years ago

Last modified 5 years ago

pulseaudio consumes 6% cpu time constantly

Reported by: lindi Owned by: openmoko-devel
Priority: normal Milestone:
Component: unknown Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

Steps to reproduce:
1) boot the system

Expected results:
1) system should be mostly idle

Actual results:
1) pulseaudio consumes 6% cpu time according to top.

More info:
1) I am using

http://buildhost.openmoko.org/daily/freerunner/200807/20080722/Openmoko-openmoko-devel-image-glibc-ipk-P1-Snapshot-20080722-om-gta02.rootfs.jffs2

http://buildhost.openmoko.org/daily/freerunner/200807/20080730/uImage-2.6.24+git25+8533927964761f4e2078ccd8607b90f5acc60b93-r1-om-gta02.bin

on freerunner.

2) strace -p pidof pulseaudio -f -o /tmp/s -s245 -tt shows the following patterns:

1381  22:15:42.054924 SYS_298(0x8001, 0x411d3cfc, 0x2, 0x1000, 0x3952634c) = 0
1381  22:15:42.058088 SYS_298(0x8001, 0x411d3d62, 0x1, 0x1800, 0x4ccc8) = 0
1381  22:15:42.059321 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.061548 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.062966 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.064297 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.065431 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.066598 SYS_298(0x8001, 0x411d3cfc, 0x2, 0x1000, 0x39527000) = 0
1381  22:15:42.071400 SYS_298(0x8001, 0x411d3d62, 0x1, 0x1800, 0x4ccc8) = 0
1381  22:15:42.072529 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.073744 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.075161 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.076298 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.077434 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.078697 SYS_298(0x8001, 0x411d3cfc, 0x2, 0x1000, 0x39528000) = 0
1381  22:15:42.083701 SYS_298(0x8001, 0x411d3d62, 0x1, 0x1800, 0x4ccc8) = 0
1381  22:15:42.084831 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.086077 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.087488 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.088713 ioctl(17, 0xc0844123, 0x4e668) = 0
1381  22:15:42.091026 ioctl(17, 0xc0844123, 0x4e668) = 0

and

# ls -l /proc/1381/fd/17
lrwx------    1 root     root           64 Aug  2 22:16 /proc/1381/fd/17 -> /dev/snd/pcmC0D0p

shows that it is really talking to the sound card.

Change History

comment:1 Changed 5 years ago by johnleach

Confirmed here on the same image AND after a opkg upgrade:

root@om-gta02:~# opkg list_installed pulse*
pulseaudio-lib-alsa-util - 0.9.10-r4 - 
pulseaudio-lib-authkey - 0.9.10-r4 - 
pulseaudio-lib-authkey-prop - 0.9.10-r4 - 
pulseaudio-lib-cli - 0.9.10-r4 - 
pulseaudio-lib-iochannel - 0.9.10-r4 - 
pulseaudio-lib-ioline - 0.9.10-r4 - 
pulseaudio-lib-ipacl - 0.9.10-r4 - 
pulseaudio-lib-packet - 0.9.10-r4 - 
pulseaudio-lib-pdispatch - 0.9.10-r4 - 
pulseaudio-lib-protocol-cli - 0.9.10-r4 - 
pulseaudio-lib-protocol-esound - 0.9.10-r4 - 
pulseaudio-lib-protocol-native - 0.9.10-r4 - 
pulseaudio-lib-protocol-simple - 0.9.10-r4 - 
pulseaudio-lib-pstream - 0.9.10-r4 - 
pulseaudio-lib-pstream-util - 0.9.10-r4 - 
pulseaudio-lib-socket-server - 0.9.10-r4 - 
pulseaudio-lib-socket-util - 0.9.10-r4 - 
pulseaudio-lib-strlist - 0.9.10-r4 - 
pulseaudio-lib-tagstruct - 0.9.10-r4 - 
pulseaudio-module-alsa-sink - 0.9.10-r4 - 
pulseaudio-module-alsa-source - 0.9.10-r4 - 
pulseaudio-module-cli - 0.9.10-r4 - 
pulseaudio-module-cli-protocol-unix - 0.9.10-r4 - 
pulseaudio-module-esound-protocol-unix - 0.9.10-r4 - 
pulseaudio-module-native-protocol-unix - 0.9.10-r4 - 
pulseaudio-module-simple-protocol-tcp - 0.9.10-r4 - 
pulseaudio-server - 0.9.10-r4 - 

comment:2 Changed 5 years ago by lindi

Installing pulseaudio-module-suspend-on-idle_0.9.10-r4_armv4t.ipk and adding

load-module module-suspend-on-idle

to /etc/pulse/session seems to solve this. Is there any chance you could make this default?

comment:3 Changed 5 years ago by RuiSeabra

root@om-gta02:/etc/wpa_supplicant# ps axfuw | grep 1374
root      1374 10.6  2.3  16732  2972 ?        S<Lsl 13:28   4:23 /usr/bin/pulseaudio --no-cpu-limit --resample-method=trivial -D -nF /etc/pulse/session

root@om-gta02:/etc/wpa_supplicant# strace -c -p 1374
Process 1374 attached - interrupt to quit
Process 1374 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 99.52   21.367374       55356       386           poll
  0.25    0.053164          34      1542           gettimeofday
  0.23    0.050000       50000         1           restart_syscall
------ ----------- ----------- --------- --------- ----------------
100.00   21.470538                  1929           total

I don't seem to have that module installed.

Note: See TracTickets for help on using tickets.