Bug 717397

Summary: Pulseaudio is running but mixers only show dummy
Product: [openSUSE] openSUSE 12.1 Reporter: Sid Boyce <sboyce>
Component: BasesystemAssignee: E-mail List <bnc-team-screening>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P1 - Urgent CC: fcrozat, Larry.Finger, rwooninck, sboyce, seife, zaitor
Version: Factory   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Sid Boyce 2011-09-12 23:54:15 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20100101 Firefox/6.0

Milestone 5 kmix, alsamixer etc. show only dummy for Playback devices, Playback Streams show Event sounds and nothing else is displayed.
I tried using padevchooser (0.9.4-147-3) but shows an error loading libpulse-browse.so.0 - no such file or directory. It doesn't exist.
There used to be pulseaudio-0.9.23 and friends in factory but they have been removed. As a matter of fact zypper couldn't find them.

basically it's a mess right now.# l /usr/lib64/libpulse*
-rwxr-xr-x 1 root root 416936 Sep 10 22:24 /usr/lib64/libpulsecommon-0.99.so*
-rwxr-xr-x 1 root root 589888 Sep 10 22:24 /usr/lib64/libpulsecore-0.99.so*
-rwxr-xr-x 1 root root  43872 Sep 10 22:24 /usr/lib64/libpulsedsp.so*
lrwxrwxrwx 1 root root     31 Sep 12 18:21 /usr/lib64/libpulse-mainloop-glib.so -> libpulse-mainloop-glib.so.0.0.4*
lrwxrwxrwx 1 root root     31 Sep 12 18:19 /usr/lib64/libpulse-mainloop-glib.so.0 -> libpulse-mainloop-glib.so.0.0.4*
-rwxr-xr-x 1 root root  18824 Sep 10 22:24 /usr/lib64/libpulse-mainloop-glib.so.0.0.4*
lrwxrwxrwx 1 root root     24 Sep 12 18:21 /usr/lib64/libpulse-simple.so -> libpulse-simple.so.0.0.3*
lrwxrwxrwx 1 root root     24 Sep 12 18:15 /usr/lib64/libpulse-simple.so.0 -> libpulse-simple.so.0.0.3*
-rwxr-xr-x 1 root root  14808 Sep 10 22:24 /usr/lib64/libpulse-simple.so.0.0.3*
lrwxrwxrwx 1 root root     18 Sep 12 18:21 /usr/lib64/libpulse.so -> libpulse.so.0.13.1*
lrwxrwxrwx 1 root root     18 Sep 12 18:15 /usr/lib64/libpulse.so.0 -> libpulse.so.0.13.1*
-rwxr-xr-x 1 root root 288232 Sep 10 22:24 /usr/lib64/libpulse.so.0.13.1*

# cat /proc/asound/cards
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfe020000 irq 20
# lsmod|grep snd
snd_hda_codec_analog    85334  1 
snd_hda_intel          29235  0 
snd_hda_codec          93095  2 snd_hda_codec_analog,snd_hda_intel
snd_hwdep              13654  1 snd_hda_codec
snd_pcm                89033  2 snd_hda_intel,snd_hda_codec
snd_timer              30015  1 snd_pcm
snd                    70373  6 snd_hda_codec_analog,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
soundcore              15091  1 snd
snd_page_alloc         14505  2 snd_hda_intel,snd_pcm

paprefs comes up with most items greyed out, both as user and root.
# ps fax|grep pulse
 7948 pts/0    S+     0:00          \_ grep pulse
 4521 ?        Sl     0:02 /usr/bin/pulseaudio --start
 4543 ?        S      0:00  \_ /usr/lib/pulse/gconf-helper

# fuser -v /dev/snd/*
#


Reproducible: Always

Steps to Reproduce:
1.See above details, it's a permanent feature.
2.
3.
Actual Results:  
See above details.

Expected Results:  
See Details above
Comment 1 Stefan Seyfried 2011-09-14 05:56:02 UTC
It seems to be a permissions / ACL issue, maybe ConsoleKit. The devices belong to group audio:

susi:~ # l /dev/snd/
total 0
drwxr-xr-x  3 root root      220 Sep 12 11:56 ./
drwxr-xr-x 19 root root     3580 Sep 13 02:04 ../
drwxr-xr-x  2 root root       80 Sep 12 11:56 by-path/
crw-rw----  1 root audio 116,  7 Sep 12 11:56 controlC0
crw-rw----  1 root audio 116,  2 Sep 12 11:56 controlC29
crw-rw----  1 root audio 116,  6 Sep 12 11:56 hwC0D0
crw-rw----  1 root audio 116,  5 Sep 12 11:56 pcmC0D0c
crw-rw----  1 root audio 116,  4 Sep 12 11:56 pcmC0D0p
crw-rw----  1 root audio 116,  3 Sep 12 11:56 pcmC0D1p
crw-rw----  1 root audio 116,  1 Sep 12 11:56 seq
crw-rw----  1 root audio 116, 33 Sep 12 11:56 timer

But they don't have ACLs on them even though they should, quoting Marcus Meissner:
"It is managed by udev-acl, as soon as you have a ConsleKit session the
 devices should get acls permissions on them."

susi:~ # getfacl /dev/snd/controlC0 
getfacl: Removing leading '/' from absolute path names
# file: dev/snd/controlC0
# owner: root
# group: users
user::rw-
group::rw-
other::---

(I did chgrp -R users /dev/snd to enable sound for me, that's why it is no longer group audio)

I think I have a ConsoleKit session:

susi:~ # ck-list-sessions 
Session2:
        unix-user = '10329'
        realname = 'Stefan Seyfried'
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = ''
        remote-host-name = ''
        is-local = TRUE
        on-since = '2011-09-12T09:57:10.113839Z'
        login-session-id = '1'
Comment 2 Stefan Seyfried 2011-09-14 05:57:50 UTC
I diff'ed the udev rules from udev-172 and udev-173 and found the following interesting thing:


--- /lib/udev/rules.d/70-acl.rules      2011-08-09 00:02:24.000000000 +0200
+++ /dev/shm/173/rules.d/70-udev-acl.rules  2011-09-05 18:33:39.000000000 +0200
@@ -6,6 +6,9 @@
 ENV{MAJOR}=="", GOTO="acl_end"
 ACTION=="remove", GOTO="acl_apply"
 
+# systemd replaces udev-acl entirely, skip if active
+TEST=="/sys/fs/cgroup/systemd", TAG=="uaccess", GOTO="acl_end"
+
 # PTP/MTP protocol devices, cameras, portable media players
 SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG+="udev-acl"


So probably systemd does *not* replace udev-acl entirely?
Comment 3 Sid Boyce 2011-09-14 10:42:16 UTC
On another x86_64 box I rebooted after zypper dup so they are both at the same level on Milestone 5 and  kmix is normal.
On the one box (tindog) where I see only dummy and I have only the on-board sound, no problem in using audio in/out with the one program I've used -- quisk which is a python program for Software Defined Radio (SDR) - both Microphone and speakers still work. 
tindog:~ # cat /proc/asound/cards
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfe020000 irq 22
tindog:~ # getfacl /dev/snd/controlC0
getfacl: Removing leading '/' from absolute path names
# file: dev/snd/controlC0
# owner: root
# group: audio
user::rw-
group::rw-
other::---

tindog:~ # ck-list-sessions
Session1:
        unix-user = '1000'
        realname = 'Sid Boyce'
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = ''
        remote-host-name = ''
        is-local = TRUE
        on-since = '2011-09-13T11:23:56.672370Z'
        login-session-id = '4294967295'
tindog:~ # fuser -v /dev/snd/*
tindog:~ # ps fax|grep pulseaudio
 8745 pts/11   S+     0:00          \_ grep pulseaudio
 5900 ?        Sl     0:00 /usr/bin/pulseaudio --start --log-target=syslog


No kmix problems on the box slipstream
slipstream:/usr/src # getfacl /dev/snd/controlC0 
getfacl: Removing leading '/' from absolute path names
# file: dev/snd/controlC0
# owner: root
# group: audio
user::rw-
group::rw-
other::---

slipstream:/usr/src # ck-list-sessions
Session1:
        unix-user = '1000'
        realname = 'Sid Boyce'
        seat = 'Seat1'
        session-type = ''
        active = TRUE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = ''
        remote-host-name = ''
        is-local = TRUE
        on-since = '2011-09-13T23:06:59.081378Z'
        login-session-id = '4294967295'
slipstream:/usr/src # cat /proc/asound/cards
 0 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xf7cf8000 irq 16
 2 [DG8SAQI2C      ]: USB-Audio - DG8SAQ-I2C
                      www.obdev.at DG8SAQ-I2C at usb-0000:00:13.2-5, high speed
 3 [Q9000          ]: USB-Audio - QuickCam Pro 9000
                      Logitech, Inc. QuickCam Pro 9000 at usb-0000:00:12.0-1.2, full speed

slipstream:/usr/src # fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  lancelot   9755 F.... pulseaudio
/dev/snd/controlC2:  lancelot   9755 F.... pulseaudio
/dev/snd/controlC3:  lancelot   9755 F.... pulseaudio
Comment 4 Raymond Wooninck 2011-09-14 11:49:46 UTC
This issue has nothing to do with PulseAudio. My system is running without PA and shows the same behavior. After the update from last week Wednesday/Thursday, I lost sound. Checking with YaST works fine, but within the KDE session I do not have sound and only a dummy device is shown. 

I have added my user to the group audio and this resolved the problem currently. 

I also tried to boot with the standard sysvinit, but there the effect is the same. So it seems that it is also not related to systemd/sysvinit, but maybe a generic issue with ConsoleKit or the udev-acl.
Comment 5 Frederic Crozat 2011-09-16 12:45:11 UTC
on current factory, when systemd is used :
ACL are set on devices by systemd itself, based on logind seat detection (systemd-loginctl )
when systemd isn't used, udev-acl is used.
Comment 6 Stefan Seyfried 2011-09-16 13:02:05 UTC
So this is a systemd bug?
Comment 7 Frederic Crozat 2011-09-16 13:13:11 UTC
it is not clear what is your exact problem.

the changes in udev and systemd were not in milestone 5 but after. I'd suggest you run up to date factory and try again.
Comment 8 Stefan Seyfried 2011-09-16 14:46:48 UTC
I'm running up to date Factory. I just updated again, but just the kernel and a few QT libs came in.

So the problem is: there is no sound until I "chgrp users -R /dev/snd"

susi:~ # ls -l /dev/snd
total 0
drwxr-xr-x 2 root root       80 Sep 16 16:38 by-path
crw-rw---- 1 root audio 116,  7 Sep 16 16:38 controlC0
crw-rw---- 1 root audio 116,  2 Sep 16 16:38 controlC29
crw-rw---- 1 root audio 116,  6 Sep 16 16:38 hwC0D0
crw-rw---- 1 root audio 116,  5 Sep 16 16:38 pcmC0D0c
crw-rw---- 1 root audio 116,  4 Sep 16 16:38 pcmC0D0p
crw-rw---- 1 root audio 116,  3 Sep 16 16:38 pcmC0D1p
crw-rw---- 1 root audio 116,  1 Sep 16 16:38 seq
crw-rw---- 1 root audio 116, 33 Sep 16 16:38 timer
susi:~ # id seife
uid=10329(seife) gid=100(users) groups=100(users),16(dialout)
susi:~ # getfacl /dev/snd/pcmC0D0p 
getfacl: Removing leading '/' from absolute path names
# file: dev/snd/pcmC0D0p
# owner: root
# group: audio
user::rw-
group::rw-
other::---
susi:~ # cat /proc/cmdline 
init=/bin/systemd root=/dev/disk/by-label/root-FACTORY resume=/dev/sda5 splash=silent quiet init=/bin/systemd pcie_aspm=force vga=0x367
susi:~ # ps xau|grep system
root         1  0.2  0.1  37096  4476 ?        Ss   16:37   0:00 /bin/systemd
root       394  0.0  0.0  18824   872 ?        Ss   16:38   0:00 /lib/systemd/systemd-logger
root      4808  0.0  0.0  23932  1424 ?        Ss   16:38   0:00 /lib/systemd/systemd-logind
root      4868  0.0  0.0  14688   804 ?        Ss   16:38   0:00 /bin/systemd-tty-ask-password-agent --wall
100       4905  0.0  0.0  28836  2596 ?        Ss   16:38   0:00 /bin/dbus-daemon --system --address=systemd: --nofork --systemd-activation
root      6321  0.0  0.0   6788   848 pts/2    S+   16:45   0:00 grep system
susi:~ # setup-pulseaudio --status
enabled


After this is works:
susi:~ # chgrp users /dev/snd/ -R
Comment 9 Frederic Crozat 2011-09-16 14:56:37 UTC
what does systemd-loginctl returns when you are logged ?

for each number listed in the first column, run "systemd-loginctl session-status number" and give the output.
Comment 10 Bjørn Lie 2011-09-16 14:58:34 UTC
Don't know if a works for me is helpful here, but I see I have an extra snd
that you  don't have. Check out the by-id

embla:~ # ls -l /dev/snd
totalt 0
drwxr-xr-x  2 root root       60 sep.  16 16:49 by-id
drwxr-xr-x  2 root root       80 sep.  16 16:49 by-path
crw-rw----+ 1 root audio 116, 15 sep.  16 16:49 controlC0
crw-rw----+ 1 root audio 116,  3 sep.  16 16:49 controlC2
crw-rw----+ 1 root audio 116,  4 sep.  16 16:49 hwC0D0
crw-rw----+ 1 root audio 116,  6 sep.  16 16:49 midiC0D0
crw-rw----+ 1 root audio 116,  5 sep.  16 16:49 midiC0D1
crw-rw----+ 1 root audio 116, 14 sep.  16 16:53 pcmC0D0c
crw-rw----+ 1 root audio 116, 13 sep.  16 16:53 pcmC0D0p
crw-rw----+ 1 root audio 116, 12 sep.  16 16:49 pcmC0D1c
crw-rw----+ 1 root audio 116, 11 sep.  16 16:49 pcmC0D2c
crw-rw----+ 1 root audio 116, 10 sep.  16 16:49 pcmC0D2p
crw-rw----+ 1 root audio 116,  9 sep.  16 16:49 pcmC0D3p
crw-rw----+ 1 root audio 116,  8 sep.  16 16:49 pcmC0D4c
crw-rw----+ 1 root audio 116,  7 sep.  16 16:49 pcmC0D4p
crw-rw----+ 1 root audio 116,  2 sep.  16 16:53 pcmC2D0c
crw-rw----  1 root audio 116,  1 sep.  16 16:49 seq
crw-rw----+ 1 root audio 116, 33 sep.  16 16:49 timer
embla:~ # id iznogood
uid=1001(iznogood) gid=100(users) groups=100(users),33(video)
embla:~ #
Comment 11 Frederic Crozat 2011-09-16 15:19:56 UTC
ok, it is caused by non working pam-config adding pam_systemd on x86-64 systemd, marking as dup of original bug

*** This bug has been marked as a duplicate of bug 713319 ***
Comment 12 Larry Finger 2011-09-18 22:47:52 UTC
*** Bug 718760 has been marked as a duplicate of this bug. ***