Bug 994732 - pulseaudio: Unable to set sw params: Permission denied
Summary: pulseaudio: Unable to set sw params: Permission denied
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: pulseaudio
Version: 21
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1241265
TreeView+ depends on / blocked
 
Reported: 2013-08-07 21:55 UTC by Jerry James
Modified: 2015-12-02 16:05 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1241265 (view as bug list)
Environment:
Last Closed: 2015-12-02 02:54:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Output of alsa-info.sh (11.50 KB, text/plain)
2013-08-08 21:48 UTC, Jerry James
no flags Details
Output of pactl list (11.74 KB, text/plain)
2013-08-09 21:07 UTC, Jerry James
no flags Details
Output of pactl stat (624 bytes, text/plain)
2013-08-09 21:07 UTC, Jerry James
no flags Details

Description Jerry James 2013-08-07 21:55:40 UTC
Description of problem:
I have 2 virtual Rawhide machines, both with identical virtual hardware.  One has x86_64 Rawhide installed on it, the other i386 Rawhide.  Today, after I had the VMs on for about 2 hours, CPU usage on the x86_64 machine suddenly went to 100% and stayed there, even though I wasn't running anything significant at the time.  The system log has gajillions of messages that say:

[Timestamp] localhost pulseaudio[1243]: [alsa-sink-ID 22 Analog] alsa-util.c: Unable to set sw params: Permission denied

At the very least, that error message should be rate limited, as it is printing dozens of times per second.  I also don't understand what it means.  What is the thing on which permissions are denied, and how does one set permissions on that thing?

Interestingly, the same has not happened on the i386 machine.  I will have it on for awhile yet, and will report if it encounters the same problem.

Version-Release number of selected component (if applicable):
pulseaudio-4.0-2.fc20.x86_64

How reproducible:
Don't know.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
These are KVM virtual machines, made with virt-manager.

Comment 1 Jerry James 2013-08-07 22:01:52 UTC
I forgot to mention that the virtual sound device is "ich6"; lspci -vv says:

00:04.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 01)
	Subsystem: Red Hat, Inc Device 1100
	Physical Slot: 4
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 47
	Region 0: Memory at fc020000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
		Address: 00000000fee0100c  Data: 41b1
	Kernel driver in use: snd_hda_intel

Comment 2 Raymond 2013-08-08 01:53:07 UTC
post the output of alsa-info.sh and pulseaudio log

Comment 3 Jerry James 2013-08-08 21:48:26 UTC
Created attachment 784623 [details]
Output of alsa-info.sh

I don't see pulseaudio.log in /var/log, nor anywhere in /var or /tmp.  Where is it supposed to be?

Comment 4 Raymond 2013-08-08 23:30:25 UTC
https://wiki.ubuntu.com/PulseAudio/Log

pulseaudio -vvvv

can you post the output of 

pactl list

pactl stat



 the emulated hda codec only has line out  and line in Jacks without Jack detection



Codec: Generic 1af4 ID 22
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x1af40022
Subsystem Id: 0x1af40022
Revision Id: 0x100101
No Modem Function Group found
Default PCM:
    rates [0x1fc]: 16000 22050 32000 44100 48000 88200 96000
    bits [0x2]: 16
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states: 
  Power: setting=D0, actual=D0
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x02 [Audio Output] wcaps 0x1d: Stereo Amp-Out
  Control: name="Master Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Master Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="ID 22 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=1
  Amp-Out vals:  [0x4a 0x4a]
  Converter: stream=8, channel=0
  PCM:
    rates [0x1fc]: 16000 22050 32000 44100 48000 88200 96000
    bits [0x2]: 16
    formats [0x1]: PCM
Node 0x03 [Pin Complex] wcaps 0x400101: Stereo
  Control: name="Line Out Phantom Jack", index=0, device=0
  Pincap 0x00000010: OUT
  Pin Default 0x00004010: [Jack] Line Out at Ext N/A
    Conn = Unknown, Color = Green
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Connection: 1
     0x02
Node 0x04 [Audio Input] wcaps 0x10011b: Stereo Amp-In
  Control: name="Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Device: name="ID 22 Analog", type="Audio", device=0
  Amp-In caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=1
  Amp-In vals:  [0x4a 0x4a]
  Converter: stream=4, channel=0
  SDI-Select: 0
  PCM:
    rates [0x1fc]: 16000 22050 32000 44100 48000 88200 96000
    bits [0x2]: 16
    formats [0x1]: PCM
  Connection: 1
     0x05
Node 0x05 [Pin Complex] wcaps 0x400001: Stereo
  Control: name="Line Phantom Jack", index=0, device=0
  Pincap 0x00000020: IN
  Pin Default 0x00805020: [Jack] Line In at Ext N/A
    Conn = Unknown, Color = Red
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0x20: IN

Comment 5 Raymond 2013-08-08 23:34:02 UTC
https://wiki.ubuntu.com/PulseAudio/Log

pulseaudio -vvvv

can you post the output of 

pactl list

pactl stat



 the emulated hda codec only has line out  and line in Jacks without Jack detection



Codec: Generic 1af4 ID 22
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x1af40022
Subsystem Id: 0x1af40022
Revision Id: 0x100101
No Modem Function Group found
Default PCM:
    rates [0x1fc]: 16000 22050 32000 44100 48000 88200 96000
    bits [0x2]: 16
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states: 
  Power: setting=D0, actual=D0
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x02 [Audio Output] wcaps 0x1d: Stereo Amp-Out
  Control: name="Master Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Master Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="ID 22 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=1
  Amp-Out vals:  [0x4a 0x4a]
  Converter: stream=8, channel=0
  PCM:
    rates [0x1fc]: 16000 22050 32000 44100 48000 88200 96000
    bits [0x2]: 16
    formats [0x1]: PCM
Node 0x03 [Pin Complex] wcaps 0x400101: Stereo
  Control: name="Line Out Phantom Jack", index=0, device=0
  Pincap 0x00000010: OUT
  Pin Default 0x00004010: [Jack] Line Out at Ext N/A
    Conn = Unknown, Color = Green
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Connection: 1
     0x02
Node 0x04 [Audio Input] wcaps 0x10011b: Stereo Amp-In
  Control: name="Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Device: name="ID 22 Analog", type="Audio", device=0
  Amp-In caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=1
  Amp-In vals:  [0x4a 0x4a]
  Converter: stream=4, channel=0
  SDI-Select: 0
  PCM:
    rates [0x1fc]: 16000 22050 32000 44100 48000 88200 96000
    bits [0x2]: 16
    formats [0x1]: PCM
  Connection: 1
     0x05
Node 0x05 [Pin Complex] wcaps 0x400001: Stereo
  Control: name="Line Phantom Jack", index=0, device=0
  Pincap 0x00000020: IN
  Pin Default 0x00805020: [Jack] Line In at Ext N/A
    Conn = Unknown, Color = Red
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0x20: IN

Comment 6 Jerry James 2013-08-09 21:07:06 UTC
Created attachment 784978 [details]
Output of pactl list

Comment 7 Jerry James 2013-08-09 21:07:30 UTC
Created attachment 784982 [details]
Output of pactl stat

Comment 8 Jerry James 2013-08-09 21:08:27 UTC
You want pulseaudio.log from when the problem is happening, right?  So far I have not managed to reproduce the problem.  I will keep trying.

Comment 9 Fedora End Of Life 2013-09-16 16:26:53 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20

Comment 10 Raymond 2013-09-17 01:22:33 UTC
you have to post the pulseaudio log


which audio backend you are using ?

http://git.kernel.org/cgit/virt/kvm/qemu-kvm.git/tree/audio/alsaaudio.c


 conf = {
    .buffer_size_out = 4096,
    .period_size_out = 1024,
    .pcm_name_out = "default",
    .pcm_name_in = "default",
};

did the enumerated hda controller support disable period wake-up and Don`t need alignment of period bytes to multiple of 128

Comment 12 udo 2014-11-05 15:03:42 UTC
Happens to me when systemd (you know that product!) is updated.
Audio is gone.
Restarting pulseaudio does not help.
So Fedora has a class one issue here. Total audio functionality goes out the window.

Comment 13 udo 2014-11-06 07:55:45 UTC
Main issue is two-fold here:
- The pulseaudio error needs two lines to say the same thing twice.
- The amount of lines per measure of time is wayyyy too high.

Comment 14 Hendrik 2014-11-06 09:18:47 UTC
I just ran into this bug on a Vitrualbox Fedora 20 VM. Also just after a systemd update.

I could restore audio by doing:

sudo chmod g+rw /dev/snd/timer
sudo chmod g+rw /dev/snd/seq
pulseaudio -k

Comment 15 Fedora End Of Life 2015-05-29 09:17:58 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 16 Stephen Wadeley 2015-07-08 21:00:47 UTC
I have a RHEL7.1 VM, 
~]# rpm -q pulseaudio
pulseaudio-3.0-30.el7.x86_64

CPU is running at 

Logs are flooded with this:

Permission denied
/var/log/messages:Jul  8 22:36:52 localhost pulseaudio[5584]: [alsa-sink] alsa-sink.c: Failed to set software parameters: Permission denied
/var/log/messages:Jul  8 22:36:52 localhost pulseaudio[5584]: [alsa-sink] alsa-util.c: Unable to set sw params: Permission denied
/var/log/messages:Jul  8 22:36:52 localhost pulseaudio[5584]: [alsa-sink] alsa-sink.c: Failed to set software parameters: Permission denied
/var/log/messages:Jul  8 22:36:52 localhost pulseaudio[5584]: [alsa-sink] alsa-util.c: Unable to set sw params: Permission denied

~]$ rpm -q systemd
systemd-208-20.el7_1.5.x86_64

Comment 17 Stephen Wadeley 2015-07-08 21:08:37 UTC
Re booted and checked last logs for pulseaudio:


/var/log/messages:Jul  8 23:00:22 localhost pulseaudio[5584]: [alsa-sink] alsa-sink.c: Failed to set software parameters: Permission denied
/var/log/messages:Jul  8 23:00:39 localhost pulseaudio[5584]: [alsa-sink] alsa-sink.c: Failed to set software parameters: Permission denied
/var/log/messages:Jul  8 23:00:53 localhost rtkit-daemon[658]: Successfully made thread 4308 of process 4308 (/usr/bin/pulseaudio) owned by '42' high priority at nice level -11.
/var/log/messages:Jul  8 23:00:54 localhost pulseaudio[4308]: [pulseaudio] alsa-util.c: Disabling timer-based scheduling because running inside a VM.
/var/log/messages:Jul  8 23:00:54 localhost pulseaudio[4308]: [pulseaudio] alsa-util.c: Disabling timer-based scheduling because running inside a VM.
/var/log/messages:Jul  8 23:00:54 localhost pulseaudio[4308]: [alsa-sink] alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
/var/log/messages:Jul  8 23:00:54 localhost pulseaudio[4308]: [alsa-sink] alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_hda_intel'. Please report this issue to the ALSA developers.
/var/log/messages:Jul  8 23:00:54 localhost pulseaudio[4308]: [alsa-sink] alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
/var/log/messages:Jul  8 23:00:54 localhost rtkit-daemon[658]: Successfully made thread 4418 of process 4418 (/usr/bin/pulseaudio) owned by '42' high priority at nice level -11.
/var/log/messages:Jul  8 23:00:54 localhost pulseaudio[4418]: [pulseaudio] pid.c: Daemon already running.
/var/log/messages:Jul  8 23:03:14 localhost rtkit-daemon[658]: Successfully made thread 13694 of process 13694 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
/var/log/messages:Jul  8 23:03:14 localhost pulseaudio[13694]: [pulseaudio] alsa-util.c: Disabling timer-based scheduling because running inside a VM.
/var/log/messages:Jul  8 23:03:15 localhost pulseaudio[13694]: [pulseaudio] alsa-util.c: Disabling timer-based scheduling because running inside a VM.
/var/log/messages:Jul  8 23:03:17 localhost pulseaudio[13694]: [alsa-sink] alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
/var/log/messages:Jul  8 23:03:17 localhost pulseaudio[13694]: [alsa-sink] alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_hda_intel'. Please report this issue to the ALSA developers.
/var/log/messages:Jul  8 23:03:17 localhost pulseaudio[13694]: [alsa-sink] alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
[root@localhost ~]#

Comment 18 Raymond 2015-07-15 08:45:59 UTC

"unable to bind the codec" when using hda-emu


since your codec are not in patch_*.c

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/hda




Codec: Generic 1af4 ID 22
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x1af40022
Subsystem Id: 0x1af40022
Revision Id: 0x100101

Comment 19 Raymond 2015-07-15 09:16:12 UTC
seem missing snd_hda_codec_generic module


snd_hda_intel
snd_hda_codec
snd_hwdep
snd_seq
joydev
snd_seq_device
snd_pcm

Comment 20 Raymond 2015-07-15 09:18:39 UTC
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/hda/Makefile

# codec drivers
obj-$(CONFIG_SND_HDA_GENERIC) += snd-hda-codec-generic.o

this module is suppose to handle unknown codec

Comment 21 Fedora End Of Life 2015-11-04 11:07:26 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 22 Fedora End Of Life 2015-12-02 02:55:03 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.