Bug 626223

Summary: Regression: SELinux blocks alsactl from creating /etc/asound.state
Product: [Fedora] Fedora Reporter: Stuart D Gathman <stuart>
Component: alsa-utilsAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 14CC: anton, dougsland, gansalmon, itamar, jkysela, jonathan, kernel-maint, madhu.chinakonda, msimmons1618
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-31 18:36:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stuart D Gathman 2010-08-22 20:16:28 UTC
Description of problem:
Sound no longer works in F13.  Works fine in F12 (and F10).

Version-Release number of selected component (if applicable):
kernel-2.6.33.6-147.2.4.fc13.i686

How reproducible:
always

Steps to Reproduce:
1. boot
2. play sound (e.g. speaker test)
3.
  
Actual results:
no sound

Expected results:
sound

Additional info:

/var/log/messages:
Aug 22 15:59:24 melissa kernel: S3 SonicVibes 0000:01:07.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
Aug 22 15:59:24 melissa kernel: ALSA sound/pci/sonicvibes.c:1312: BIOS did not allocate DDMA channel A i/o, allocated at 0x7a00
Aug 22 15:59:24 melissa kernel: ALSA sound/pci/sonicvibes.c:1317: BIOS did not allocate DDMA channel C i/o, allocated at 0x7a10
Aug 22 15:59:24 melissa kernel: gameport: SonicVibes Gameport is pci0000:01:07.0/gameport0, io 0xdf18, speed 1084kHz

lspci -nn:
00:00.0 Host bridge [0600]: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface [8086:2570] (rev 02)
00:02.0 VGA compatible controller [0300]: Intel Corporation 82865G Integrated Graphics Controller [8086:2572] (rev 02)
00:06.0 System peripheral [0880]: Intel Corporation 82865G/PE/P Processor to I/O Memory Interface [8086:2576] (rev 02)
00:1d.0 USB Controller [0c03]: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 [8086:24d2] (rev 02)
00:1d.1 USB Controller [0c03]: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 [8086:24d4] (rev 02)
00:1d.2 USB Controller [0c03]: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 [8086:24d7] (rev 02)
00:1d.3 USB Controller [0c03]: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 [8086:24de] (rev 02)
00:1d.7 USB Controller [0c03]: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller [8086:24dd] (rev 02)
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev c2)
00:1f.0 ISA bridge [0601]: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge [8086:24d0] (rev 02)
00:1f.1 IDE interface [0101]: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller [8086:24db] (rev 02)
00:1f.2 IDE interface [0101]: Intel Corporation 82801EB (ICH5) SATA Controller [8086:24d1] (rev 02)
00:1f.3 SMBus [0c05]: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller [8086:24d3] (rev 02)
01:07.0 Multimedia audio controller [0401]: S3 Inc. SonicVibes [5333:ca00]
01:0c.0 Ethernet controller [0200]: Intel Corporation 82540EM Gigabit Ethernet Controller [8086:100e] (rev 02)

Comment 1 Stuart D Gathman 2010-08-24 01:08:04 UTC
Still broken in kernel-2.6.33.8-149.fc13.i686

Comment 2 Stuart D Gathman 2010-11-11 01:20:00 UTC
Tried it again in F14 - still doesn't work.  On a hunch, I ran alsamixer from the command line, and saw that PCM was muted!  Turning that up made it work.  So the problem is not the driver, but pulseaudio having silly defaults for hardware.  I was unable to find in the gui utils included on liveCD any place to set the other sliders.

Comment 3 Stuart D Gathman 2010-11-15 00:04:47 UTC
Traced the init script, and the problem is that the install did not create /etc/asound.state, and selinux blocks alsactl from creating it.  The workaround was to:

# touch /etc/asound.state
# restorecon /etc/asound.state

Then the alsamixer settings are saved on shutdown and restored on boot.

Comment 4 Stuart D Gathman 2010-12-21 02:07:56 UTC
This problem does not seem to be related to sonicvibes.  Sonicvibes hardware just defaults to zero volume.  It also fails to save mixer settings for Intel HDA.

Comment 5 Stuart D Gathman 2010-12-21 02:13:42 UTC
This should maybe be two bugs:
1) silly defaults for sonicvibes
2) failure to save mixer settings (for any driver)

Comment 6 Michael Simmons 2010-12-21 02:33:44 UTC
Did a new install of Fedora 14, KDE spin.  System fails to reset volumn level on reboot.  Poked around the halt rc script and noticed that one of the 3 files tested in the script was missing (/etc/asound.state).

I had installed most of the Pulse Audio control programs (pavumon, pavman, etc) using YUM.  On reboot, Master front volumn is 0, others are 100 as per what appears to be Pulse Audio defaults.

Comment 7 Stuart D Gathman 2010-12-21 02:49:47 UTC
Since /etc/asound.state is owned by alsa-utils, and the RPM shows an empty file should be created, the real question is, how did it get removed?

Comment 8 Stuart D Gathman 2010-12-21 02:52:56 UTC
Just a guess: perhaps under some circumstances, alsactl attempts to update the file by removing and creating a new one.  Selinux allows the remove, but not the create.

Comment 9 Michael Simmons 2010-12-21 16:37:38 UTC
Update: Following Comment 3 (touch and restorecon on asound.state) fixes the issue on my install.

Comment 10 Stuart D Gathman 2011-12-22 21:37:11 UTC
This seems to be fixed in Fedora 16.  Should I close it?

Comment 11 Stuart D Gathman 2012-01-31 18:36:15 UTC
No advice offered, so I am guessing that NEXTRELEASE is the proper code for closing the bug.  It is fixed in Fedora 16 (and possibly 15, I haven't tested).