Bug 462188

Summary: Users can't access Alsa
Product: [Fedora] Fedora Reporter: David Andersson <david>
Component: ConsoleKitAssignee: David Zeuthen <davidz>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mclasen, nathaniel
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: 2008-09-16 17:40:33 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:
Attachments:
Description Flags
Pulseaudio output
none
Mplayer output none

Description David Andersson 2008-09-13 17:56:32 UTC
Description of problem:
Seems to be a problem with permissions(No sure where I should file this)
Pulseaudio doesn't start(see attached log) and I can only access the direct alsa interface when root.

Version-Release number of selected component (if applicable):
This is with the rawhide from 080912 push, aka beta freeze, worked before.

How reproducible:
Every time

Steps to Reproduce:
1.Start computer
2.Log in
3.No sound in all it's glory
  
Actual results: 
No sound

Expected results:
Sound

Additional info:
I also just noted that restart from the gnome menu isn't working any more.

Comment 1 David Andersson 2008-09-13 17:57:42 UTC
Created attachment 316671 [details]
Pulseaudio output

Comment 2 David Andersson 2008-09-13 17:58:10 UTC
Created attachment 316672 [details]
Mplayer output

Comment 3 Jaroslav Kysela 2008-09-15 06:22:07 UTC
What is the output from 'cat /proc/asound/cards'?

Comment 4 David Andersson 2008-09-15 15:52:36 UTC
cat /proc/asound/cards
 0 [I82801DBICH4   ]: ICH4 - Intel 82801DB-ICH4
                      Intel 82801DB-ICH4 with AD1980 at irq 17
 1 [Bt878          ]: Bt87x - Brooktree Bt878
                      Brooktree Bt878 at 0xc6800000, irq 18
 2 [Audigy2        ]: Audigy2 - Audigy 2 Platinum [SB0240P]
                      Audigy 2 Platinum [SB0240P] (rev.4, serial:0x10021102) at 0x9400, irq 22

Comment 5 Nathaniel McCallum 2008-09-16 02:26:29 UTC
FYI:

$ ls -lh /dev/snd/*
crw-rw---- 1 root root 116, 9 2008-09-15 20:28 /dev/snd/controlC0
crw-rw---- 1 root root 116, 8 2008-09-15 20:28 /dev/snd/hwC0D0
crw-rw---- 1 root root 116, 7 2008-09-15 20:28 /dev/snd/hwC0D1
crw-rw---- 1 root root 116, 6 2008-09-15 20:28 /dev/snd/pcmC0D0c
crw-rw---- 1 root root 116, 5 2008-09-15 20:28 /dev/snd/pcmC0D0p
crw-rw---- 1 root root 116, 4 2008-09-15 20:28 /dev/snd/pcmC0D1p
crw-rw---- 1 root root 116, 3 2008-09-15 20:28 /dev/snd/seq
crw-rw---- 1 root root 116, 2 2008-09-15 20:28 /dev/snd/timer

WORKAROUND:
chmod 666 /dev/snd/*

Obviously this can't be the correct fix.

Comment 6 Jaroslav Kysela 2008-09-16 10:44:15 UTC
Appearently, selinux handles user priviledges to sound devices (at least in F-8 I see extended attribute with selinux). Do you have selinux enabled?

[root@t61 selinux]# ls -la /dev/snd/controlC0 
crw-rw----+ 1 root root 116, 8 2008-09-15 15:36 /dev/snd/controlC0

[root@t61 selinux]# attr -l /dev/snd/controlC0 
Attribute "selinux" has a 36 byte value for /dev/snd/controlC0

Comment 7 Nathaniel McCallum 2008-09-16 13:11:11 UTC
SELinux handles user privileges to sound devices? Are you serious?  I can't use sound unless I have selinux installed? WTF

Comment 8 David Andersson 2008-09-16 17:22:53 UTC
Ok, what happened was: something changed in the VT-handling (xorg now is in VT1, always used to be in VT8?) which confused ConsoleKit so it didn't see the user as logged in on a console or a local console; ConsoleKit-0.3.0-2 from koji fixes this.
Could probably go ahead and close this bug now.

Comment 9 Jaroslav Kysela 2008-09-16 17:40:33 UTC
Thanks for the hint. Pointing to SELinux was mistake.

Comment 10 Nathaniel McCallum 2008-09-18 13:00:48 UTC
$ rpm -qa ConsoleKit
ConsoleKit-0.3.0-2.fc10.x86_64
$ ls -lh /dev/snd/*
crw-rw----+ 1 root root 116, 9 2008-09-18 08:53 /dev/snd/controlC0
crw-rw----+ 1 root root 116, 8 2008-09-18 08:53 /dev/snd/hwC0D0
crw-rw----+ 1 root root 116, 7 2008-09-18 08:53 /dev/snd/hwC0D1
crw-rw----+ 1 root root 116, 6 2008-09-18 08:54 /dev/snd/pcmC0D0c
crw-rw----+ 1 root root 116, 5 2008-09-18 08:55 /dev/snd/pcmC0D0p
crw-rw----+ 1 root root 116, 4 2008-09-18 08:53 /dev/snd/pcmC0D1p
crw-rw----+ 1 root root 116, 3 2008-09-18 08:53 /dev/snd/seq
crw-rw----+ 1 root root 116, 2 2008-09-18 08:53 /dev/snd/timer

Same symptoms as before.  Please re-open.

Comment 11 David Andersson 2008-09-18 16:59:42 UTC
Note that ConsoleKit doesn't handle access through unix permissions but through ACL.
Execute: getfacl /dev/snd/* and your user should be there with permission rw
My box:
getfacl /dev/snd/timer
# file: dev/snd/timer
# owner: root
# group: root
user::rw-
user:david:rw-
group::rw-
mask::rw-
other::---