RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1241265 - pulseaudio: Unable to set sw params: Permission denied
Summary: pulseaudio: Unable to set sw params: Permission denied
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pulseaudio
Version: 7.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Wim Taymans
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On: 994732
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-08 21:12 UTC by Stephen Wadeley
Modified: 2015-08-03 11:27 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 994732
Environment:
Last Closed: 2015-07-29 14:16:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Stephen Wadeley 2015-07-08 21:12:43 UTC
+++ This bug was initially created as a clone of Bug #994732 +++

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.

--- Additional comment from Jerry James on 2013-08-07 18:01:52 EDT ---

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

--- Additional comment from Raymond on 2013-08-07 21:53:07 EDT ---

post the output of alsa-info.sh and pulseaudio log

--- Additional comment from Jerry James on 2013-08-08 17:48:26 EDT ---

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

--- Additional comment from Raymond on 2013-08-08 19:30:25 EDT ---


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

--- Additional comment from Raymond on 2013-08-08 19:34:02 EDT ---


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

--- Additional comment from Jerry James on 2013-08-09 17:07:06 EDT ---



--- Additional comment from Jerry James on 2013-08-09 17:07:30 EDT ---



--- Additional comment from Jerry James on 2013-08-09 17:08:27 EDT ---

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.

--- Additional comment from Fedora End Of Life on 2013-09-16 12:26:53 EDT ---

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

--- Additional comment from Raymond on 2013-09-16 21:22:33 EDT ---

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

--- Additional comment from Raymond on 2013-09-16 21:37:13 EDT ---

http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=ab69a4904b5dd4d7cd6996587ba066bca8d13838


http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=7bb8fb70c491bd6f5ec99728db8d1b5f43b95471

http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_intel.c?id=2ae66c26550cd94b0e2606a9275eb0ab7070ad0e


http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_intel.c?id=52409aa6a0e96337da137c069856298f4dd825a0

--- Additional comment from udo on 2014-11-05 10:03:42 EST ---

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.

--- Additional comment from udo on 2014-11-06 02:55:45 EST ---

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.

--- Additional comment from Hendrik on 2014-11-06 04:18:47 EST ---

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

--- Additional comment from Fedora End Of Life on 2015-05-29 05:17:58 EDT ---

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.

--- Additional comment from Stephen Wadeley on 2015-07-08 17:00:47 EDT ---

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

--- Additional comment from Stephen Wadeley on 2015-07-08 17:08:37 EDT ---

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 ~]#

== ==

CPU was running at max according to the Virt-manager GUI

Comment 2 Wim Taymans 2015-07-15 08:16:12 UTC
Does these lines fix things in all cases? or is there more than a permission problem here?

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

Comment 3 Stephen Wadeley 2015-07-20 14:56:45 UTC
Hello

Unfortunately I have not yet been able to reproduce the issue.


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