[Bug 744140] New: multimedia:libs: Bug -- alsa apps (aplay, alsamixer, etc) only executable as 'sudo -u user app', not as normal user

https://bugzilla.novell.com/show_bug.cgi?id=744140 https://bugzilla.novell.com/show_bug.cgi?id=744140#c0 Summary: multimedia:libs: Bug -- alsa apps (aplay, alsamixer, etc) only executable as 'sudo -u user app', not as normal user Classification: openSUSE Product: openSUSE.org Version: unspecified Platform: x86-64 OS/Version: openSUSE 12.1 Status: NEW Severity: Major Priority: P5 - None Component: 3rd party software AssignedTo: sbrabec@suse.com ReportedBy: guest69878@fastem.com QAContact: opensuse-communityscreening@forge.provo.novell.com Found By: Community User Blocker: --- i'm running opensuse 12.1, lsb_release -a LSB Version: core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch Distributor ID: SUSE LINUX Description: openSUSE 12.1 (x86_64) Release: 12.1 Codename: Asparagus uname -a Linux desk 3.1.9-1.4-desktop #1 SMP PREEMPT Fri Jan 27 08:55:10 UTC 2012 (efb5ff4) x86_64 x86_64 x86_64 GNU/Linux i've upgraded to KDE 4.8 (kr48), kde4-config -v Qt: 4.8.0 KDE Development Platform: 4.8.00 (4.8.0 "release 462" kde4-config: 1.0 i've installed up-to-date alsa, rpm -qa | grep -i ^alsa alsamixergui-0.9.0rc1-1505.2.x86_64 alsa-devel-1.0.25-123.1.x86_64 alsa-oss-32bit-1.0.25-69.1.x86_64 alsa-firmware-1.0.25-26.1.noarch alsa-docs-1.0.25-123.1.noarch alsa-tools-gui-1.0.25-35.1.x86_64 alsa-plugins-1.0.25-50.1.x86_64 alsa-oss-1.0.25-69.1.x86_64 alsa-tools-1.0.25-35.1.x86_64 alsa-1.0.25-123.1.x86_64 alsa-plugins-jack-1.0.25-50.1.x86_64 alsa-driver-kmp-desktop-1.0.25.20120128_k3.1.9_1.4-1.1.x86_64 alsa-plugins-jack-32bit-1.0.25-50.1.x86_64 alsa-utils-1.0.25-65.1.x86_64 alsa-tools-devel-1.0.25-35.1.x86_64 alsa-plugins-32bit-1.0.25-50.1.x86_64 cat /proc/asound/version Advanced Linux Sound Architecture Driver Version 1.0.25-git20120128. Compiled on Jan 27 2012 for kernel 3.1.9-1.4-desktop (SMP). grep VERSION_STR /usr/include/alsa/version.h #define SND_LIB_VERSION_STR "1.0.25" removed pulse (as much as possible ...), rpm -qa | grep -i pulse libpulse-mainloop-glib0-1.1-86.2.x86_64 libpulse-devel-1.1-86.2.x86_64 libpulse0-1.1-86.2.x86_64 for my audio card, hwinfo --sound 23: PCI 14.2: 0403 Audio device [Created at pci.319] Unique ID: 5Dex.WnV4s1RcOt2 SysFS ID: /devices/pci0000:00/0000:00:14.2 SysFS BusID: 0000:00:14.2 Hardware Class: sound Model: "ATI SBx00 Azalia (Intel HDA)" Vendor: pci 0x1002 "ATI Technologies Inc" Device: pci 0x4383 "SBx00 Azalia (Intel HDA)" SubVendor: pci 0x1043 "ASUSTeK Computer Inc." SubDevice: pci 0x8357 Driver: "snd_hda_intel" --> Driver Modules: "snd_hda_intel" Memory Range: 0xf7ff4000-0xf7ff7fff (rw,non-prefetchable) IRQ: 16 (2187 events) Module Alias: "pci:v00001002d00004383sv00001043sd00008357bc04sc03i00" Driver Info #0: Driver Status: snd_hda_intel is active Driver Activation Cmd: "modprobe snd_hda_intel" Config Status: cfg=yes, avail=yes, need=no, active=unknown lspci | egrep -i audio 00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) loaded the kernel mod, lsmod | grep snd_hda_intel snd_hda_intel 33874 0 snd_hda_codec 140010 2 snd_hda_codec_via,snd_hda_intel snd_pcm 109967 3 snd_usb_audio,snd_hda_intel,snd_hda_codec snd 93488 10 snd_usb_audio,snd_usbmidi_lib,snd_rawmidi,snd_seq_device,snd_hda_codec_via,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer snd_page_alloc 18572 2 snd_hda_intel,snd_pcm restarted the sound server, service alsasound restart Starting sound driver: hda-intel usb-audio done made sure the card's seen by the system, cat /proc/asound/oss/sndstat Sound Driver:3.8.1a-980706 (ALSA v1.0.25-git20120128 emulation code) Kernel: Linux desk 3.1.9-1.4-desktop #1 SMP PREEMPT Fri Jan 27 08:55:10 UTC 2012 (efb5ff4) x86_64 Config options: 0 Installed drivers: Type 10: ALSA emulation Card config: HDA ATI SB at 0xf7ff4000 irq 16 Audio devices: NOT ENABLED IN CONFIG Synth devices: NOT ENABLED IN CONFIG Midi devices: NOT ENABLED IN CONFIG Timers: 31: system timer Mixers: NOT ENABLED IN CONFIG re-init'd the state file, rm -f /var/lib/alsa/asound.state sudo alsactl init Found hardware: "HDA-Intel" "VIA VT1708S" "HDA:11060397,1043836c,00100000" "0x1043" "0x8357" Hardware is initialized using a generic method sudo alsactl -d store 0 ls -al /var/lib/alsa/asound.state -rw-r--r-- 1 root root 9.0K Jan 30 09:35 /var/lib/alsa/asound.state and attempt to run a simple, gui-less alsa-app (this problem holds true for any alsa* app/tool/etc ...), 1st as my user whoami cau which causes the following failure aplay -l **** List of PLAYBACK Hardware Devices **** ALSA lib conf.c:3700:(snd_config_update_r) Cannot access file /etc/alsa-pulse.conf ALSA lib control.c:951:(snd_ctl_open_noupdate) Invalid CTL hw:0 aplay: device_list:261: control open (0): No such file or directory the 'sudo' as my *own* user, which works, sudo -u cau aplay -l **** List of PLAYBACK Hardware Devices **** card 0: SB [HDA ATI SB], device 0: VT1708S Analog [VT1708S Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: SB [HDA ATI SB], device 1: VT1708S Digital [VT1708S Digital] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: SB [HDA ATI SB], device 2: VT1708S HP [VT1708S HP] Subdevices: 1/1 Subdevice #0: subdevice #0 checking permissions on sound device, ls -al /dev/snd/ total 0 drwxr-xr-x 3 root root 220 Jan 30 09:12 ./ drwxr-xr-x 21 root root 5.6K Jan 30 09:07 ../ drwxr-xr-x 2 root root 60 Jan 30 09:12 by-path/ crw-rw----+ 1 root audio 116, 7 Jan 30 09:12 controlC0 crw-rw----+ 1 root audio 116, 6 Jan 30 09:12 hwC0D0 crw-rw----+ 1 root audio 116, 5 Jan 30 09:12 pcmC0D0c crw-rw----+ 1 root audio 116, 4 Jan 30 09:12 pcmC0D0p crw-rw----+ 1 root audio 116, 3 Jan 30 09:12 pcmC0D1p crw-rw----+ 1 root audio 116, 2 Jan 30 09:12 pcmC0D2p crw-rw---- 1 root audio 116, 1 Jan 30 09:07 seq crw-rw----+ 1 root audio 116, 33 Jan 30 09:12 timer and verifying my user is part of 'audio' group, id cau uid=1000(cau) gid=100(users) groups=100(users),6(disk),7(lp),8(www),10(wheel),17(audio),20(cdrom),33(video),49(ftp),1000(vboxusers) id -nG cau users audio cdrom disk ftp lp video wheel www vboxusers this failure to exec alsa apps as other-than-sudo mainfests in kmix unable to see/control my audio cards. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=744140 https://bugzilla.novell.com/show_bug.cgi?id=744140#c1 Stanislav Brabec <sbrabec@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |tiwai@suse.com --- Comment #1 from Stanislav Brabec <sbrabec@suse.com> 2012-01-30 20:08:18 CET --- It is correct that non-root user can write system-wide ALSA states. But recording and playback should work. If "sudo -u cau aplay -l" and aplay -l with user cau does not work, it is a bit strange. Did you re-login after adding you to a "audio" group? There should be two ways how to get permission on audio device: - Using ACL with ConsoleKit to get permission for user on the active console. Try: getfacl /dev/snd/* and find you as user which has read/write access in the ACL. - Adding user to "audio" group to get permanent access. It looks that you get both permissions. But "cannot access file /etc/alsa-pulse.conf" looks like incomplete uninstallation of pulse. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=744140 https://bugzilla.novell.com/show_bug.cgi?id=744140#c2 --- Comment #2 from guest 69878 <guest69878@fastem.com> 2012-01-30 19:30:38 UTC ---
But recording and playback should work.
it used to prior to the KR47 -> KR48 upgrade I did. of course, there were other updates -- AND pusle* removal all at abt the same time.
sudo -u cau aplay -l
works
aplay -l with user cau
fails
Did you re-login after adding you to a "audio" group?
i've been a member of 'audio' group for years ... but, in any case, rebooting/reloging makes no difference to this problem :-/ There should be two ways how to get permission on audio device:
getfacl /dev/snd/*
getfacl /dev/snd/* ---------------------- getfacl: Removing leading '/' from absolute path names # file: dev/snd/by-path # owner: root # group: root user::rwx group::r-x other::r-x # file: dev/snd/controlC0 # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- # file: dev/snd/hwC0D0 # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- # file: dev/snd/pcmC0D0c # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- # file: dev/snd/pcmC0D0p # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- # file: dev/snd/pcmC0D1p # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- # file: dev/snd/pcmC0D2p # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- # file: dev/snd/seq # owner: root # group: audio user::rw- group::rw- other::--- # file: dev/snd/timer # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- ----------------------
and find you as user which has read/write access in the ACL.
you can see that user 'cau' has rw access
Adding user to "audio" group to get permanent access.
as per OP, user 'cau' is already added to group 'audio'
"cannot access file /etc/alsa-pulse.conf" looks like incomplete uninstallation of pulse.
i'd removed using zypper, after disabling pulseaudio. at the time, i noticed no errors. how can i check for, and complete if necessary, and incomplete uninstallation? i've been unable to determine WHAT specifically is expecting /etc/alsa-pulse.conf. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=744140 https://bugzilla.novell.com/show_bug.cgi?id=744140#c3 --- Comment #3 from Stanislav Brabec <sbrabec@suse.com> 2012-01-30 21:13:49 CET --- There is /etc/profile.d/pulseaudio.sh and /etc/profile.d/pulseaudio.csh that redefine ALSA default configuration to /etc/alsa-pulse.conf. But they should be part of the pulseaudio package and should be already away. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=744140 https://bugzilla.novell.com/show_bug.cgi?id=744140#c4 --- Comment #4 from guest 69878 <guest69878@fastem.com> 2012-01-30 21:44:21 UTC ---
But recording and playback should work.
it used to prior to the KR47 -> KR48 upgrade I did. of course, there were other updates -- AND pusle* removal all at abt the same time.
sudo -u cau aplay -l
works
aplay -l with user cau
fails
Did you re-login after adding you to a "audio" group?
i've been a member of 'audio' group for years ... but, in any case, rebooting/reloging makes no difference to this problem :-/ There should be two ways how to get permission on audio device:
getfacl /dev/snd/*
getfacl /dev/snd/* ---------------------- getfacl: Removing leading '/' from absolute path names # file: dev/snd/by-path # owner: root # group: root user::rwx group::r-x other::r-x # file: dev/snd/controlC0 # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- # file: dev/snd/hwC0D0 # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- # file: dev/snd/pcmC0D0c # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- # file: dev/snd/pcmC0D0p # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- # file: dev/snd/pcmC0D1p # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- # file: dev/snd/pcmC0D2p # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- # file: dev/snd/seq # owner: root # group: audio user::rw- group::rw- other::--- # file: dev/snd/timer # owner: root # group: audio user::rw- user:cau:rw- group::rw- mask::rw- other::--- ----------------------
and find you as user which has read/write access in the ACL.
you can see that user 'cau' has rw access
Adding user to "audio" group to get permanent access.
as per OP, user 'cau' is already added to group 'audio'
"cannot access file /etc/alsa-pulse.conf" looks like incomplete uninstallation of pulse.
i'd removed using zypper, after disabling pulseaudio. at the time, i noticed no errors. how can i check for, and complete if necessary, and incomplete uninstallation? i've been unable to determine WHAT specifically is expecting /etc/alsa-pulse.conf. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=744140 https://bugzilla.novell.com/show_bug.cgi?id=744140#c5 --- Comment #5 from guest 69878 <guest69878@fastem.com> 2012-01-30 21:49:40 UTC --- sry for the dup, 'mid air collision' between myself, and myself ... not sure how/why that happens. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=744140 https://bugzilla.novell.com/show_bug.cgi?id=744140#c6 --- Comment #6 from guest 69878 <guest69878@fastem.com> 2012-01-30 21:52:08 UTC --- (In reply to comment #3)
There is /etc/profile.d/pulseaudio.sh and /etc/profile.d/pulseaudio.csh that redefine ALSA default configuration to /etc/alsa-pulse.conf. But they should be part of the pulseaudio package and should be already away.
Confirming that they're both already out of the way ... ls -al /etc/profile.d/pulseaudio* ls: cannot access /etc/profile.d/pulseaudio*: No such file or directory It's something else :-/ -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=744140 https://bugzilla.novell.com/show_bug.cgi?id=744140#c7 --- Comment #7 from guest 69878 <guest69878@fastem.com> 2012-01-31 04:32:17 UTC --- solved the problem. removing the sound card's module (snd_hda_intel) from the initrd, vi /etc/sysconfig/kernel ... - INITRD_MODULES="... snd_hda_intel" + INITRD_MODULES="..." ... then mkinitrd, reboot. no more permissions problems (so far) with any audio app. kmix launches as expected for normal user. since the INITRD_MODULES entry changes the module load order, i suspect that something else was grabbing the driver and not letting it go ... i did not find out what. since alsasound service deals with the kernel module load for this card, rm'ing it from /etc/sysconfig/kernel works ok. if i needed the load of the module, i suppose an unload/reload sequence in /etc/modprobe.d/*conf would also do the trick. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=744140 https://bugzilla.novell.com/show_bug.cgi?id=744140#c8 guest 69878 <guest69878@fastem.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |RESOLVED InfoProvider|tiwai@suse.com | Resolution| |WORKSFORME --- Comment #8 from guest 69878 <guest69878@fastem.com> 2012-01-31 04:44:05 UTC --- . -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com