Summary: | Pulseaudio 5.0 uses 100% CPU time after system resumes from hibernation. | ||
---|---|---|---|
Product: | PulseAudio | Reporter: | Dimitrios Semitsoglou-Tsiapos <kmhzsem> |
Component: | daemon | Assignee: | pulseaudio-bugs |
Status: | RESOLVED MOVED | QA Contact: | pulseaudio-bugs |
Severity: | normal | ||
Priority: | medium | CC: | lennart, main.haarp |
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
pulseaudio --log-time -vvvvv
more /etc/pulse/* full gdb backtrace asound.conf pulseaudio with dmixer as default pcm_rewindable.c output |
Description
Dimitrios Semitsoglou-Tsiapos
2014-06-30 12:13:29 UTC
Created attachment 102011 [details]
more /etc/pulse/*
Created attachment 102012 [details]
full gdb backtrace
Created attachment 102013 [details]
asound.conf
as you are customize pulseaudio to use dmix as default sink http://mailman.alsa-project.org/pipermail/alsa-devel/2014-May/076475.html you may need to use Alexander 's program whether dmix plugin should return zero for snd_pcm_rewindable and should alsa lib should return error when disable period wake-up when using dmix strange that stop threshold is zero when pulseaudio using dmix aplay -v -D plug:dmix Foo.wav (In reply to comment #4) As the configuration is now, and while pulseaudio is running `aplay -v -D plug:dmix Foo.wav` plays. > as you are customize pulseaudio to use dmix as default sink I added the following block and changed device="default" to device="dmixer", pcm.dmixer { type dmix ipc_key 1024 ipc_key_add_uid false ipc_perm 0660 slave { pcm "hw:0,0" period_time 0 period_size 1024 buffer_size 8192 rate 44100 channels 2 } } Now I get: ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.27.2/work/alsa-lib-1.0.27.2/src/pcm/pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave aplay: main:722: audio open error: Device or resource busy > http://mailman.alsa-project.org/pipermail/alsa-devel/2014-May/076475.html > > you may need to use Alexander 's program whether dmix plugin should return > zero for snd_pcm_rewindable and should alsa lib should return error when > disable period wake-up when using dmix I am not sure how to obtain Alexander's program or how to check for these values. Created attachment 102024 [details]
pulseaudio with dmixer as default
http://mailman.alsa-project.org/pipermail/alsa-devel/2014-May/076480.html does your sound card suspend and resume normally when not using pulseaudio ? aplay -D hw:0,0 stereo.wav aplay -D plughw:0,0 stereo.wav aplay -D plug:dmix stereo.wav refer to your log dmix usually set stop threshold to boundary ( 0.189| 0.000) D: [pulseaudio] alsa-util.c: start_threshold : 1 ( 0.189| 0.000) D: [pulseaudio] alsa-util.c: stop_threshold : 0 ( 0.189| 0.000) D: [pulseaudio] alsa-util.c: silence_threshold: 0 ( 0.189| 0.000) D: [pulseaudio] alsa-util.c: silence_size : 0 ( 0.189| 0.000) D: [pulseaudio] alsa-util.c: boundary : 4611686018427387904 ( 0.189| 0.000) D: [pulseaudio] alsa-util.c: appl_ptr : 0 ( 0.189| 0.000) D: [pulseaudio] alsa-util.c: hw_ptr : 8138786 ( 0.189| 0.000) D: [alsa-sink-ALC887 Analog] alsa-sink.c: Thread starting up ( 0.197| 0.007) I: [alsa-sink-ALC887 Analog] core-util.c: Failed to acquire real-time scheduling: No such file or directory ( 0.198| 0.000) I: [alsa-sink-ALC887 Analog] alsa-sink.c: Starting playback. hwptr already ahead of appl_ptr before pulseaudio call snd_pcm_start his program pcm_rewindable.c want to check when did hw ptr update by writing square wave and rewind in periods (In reply to comment #7) > does your sound card suspend and resume normally when not using pulseaudio ? > > aplay -D hw:0,0 stereo.wav > > aplay -D plughw:0,0 stereo.wav > > aplay -D plug:dmix stereo.wav These commands work fine. > his program pcm_rewindable.c want to check when did hw ptr update by > writing square wave and rewind in periods I ran it with the above devices and I'm attaching the output. Created attachment 102059 [details]
pcm_rewindable.c output
you can change dmix format to use S16_LE instead of 32 bits http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/conf/alsa.conf;hb=HEAD defaults.pcm.dmix.format http://git.alsa-project.org/?p=alsa-lib.git;a=commit;h=614a66bb2a94ee64e37935fed7a0adc1e822dc2e http://git.alsa-project.org/?p=alsa-lib.git;a=commit;h=5256e150eb34cf599e79839feaff7398ed67a499 there are patches which remove support of rewind from rate plugin ( 0.187| 0.000) I: [pulseaudio] alsa-util.c: Trying to disable ALSA period wakeups, using timers only ( 0.187| 0.000) D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Signed 16 bit Little Endian) failed: Invalid argument ( 0.187| 0.000) D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Signed 16 bit Big Endian) failed: Invalid argument ( 0.188| 0.000) D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Float 32 bit Little Endian) failed: Invalid argument ( 0.188| 0.000) D: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_format(Float 32 bit Big Endian) failed: Invalid argument ( 0.188| 0.000) D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 341 ms ( 0.188| 0.000) D: [pulseaudio] alsa-util.c: Set buffer size first (to 96000 samples), period size second (to 96000 samples). ( 0.188| 0.000) I: [pulseaudio] alsa-util.c: Device default doesn't support 44100 Hz, changed to 48000 Hz. ( 0.188| 0.000) I: [pulseaudio] alsa-util.c: Device default doesn't support sample format s16le, changed to s32le. ( 0.188| 0.000) I: [pulseaudio] alsa-util.c: ALSA period wakeups disabled you can change dmix default rate and format to reduce the coversion http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=70b11d614d6f7c13ea8c3fe81e7b34430fba389d;hp=8f16428f9cb66026bb62fe67ae10a32240a16db4 if the logic of dmix_rewind is so complex, it it unliksly dmix_rewindable is so simple http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=c88672d86fe713e8f049df895fc3b64c472fbf5d;hp=058dde8b7da6f7b725e4ef8b9b237f2a5c6ff01e#patch3 340| 0.021) D: [alsa-sink-ALC887 Analog] alsa-sink.c: Cutting sleep time for the initial iterations by half. ( 0.361| 0.021) D: [alsa-sink-ALC887 Analog] alsa-sink.c: Cutting sleep time for the initial iterations by half. ( 49.612| 49.250) D: [alsa-source-USB Audio] alsa-util.c: Got POLLERR from ALSA ( 49.612| 0.000) W: [alsa-source-USB Audio] alsa-util.c: Got POLLNVAL from ALSA ( 49.612| 0.000) D: [alsa-source-USB Audio] alsa-util.c: PCM state is DISCONNECTED ( 49.612| 0.000) W: [alsa-source-USB Audio] alsa-util.c: Could not recover from POLLERR|POLLNVAL|POLLHUP with snd_pcm_prepare(): No such device ( 49.612| 0.000) I: [alsa-sink-ALC887 Analog] alsa-sink.c: Scheduling delay of 39174.92 ms > 9.21 ms, you might want to investigate this to improve latency... ( 49.612| 0.000) D: [alsa-sink-ALC887 Analog] alsa-util.c: Got POLLERR from ALSA ( 49.612| 0.000) D: [alsa-sink-ALC887 Analog] alsa-util.c: Got POLLOUT from ALSA ( 49.612| 0.000) D: [alsa-sink-ALC887 Analog] alsa-util.c: PCM state is SUSPENDED seem USB audio disconnect -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/160. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.