You are not logged in.

#1 2015-05-02 08:29:42

noarch
Member
Registered: 2015-01-06
Posts: 17

No sound in non-root user

Hi All,

Yesterday, I had to hard-reboot my laptop and some files got corrupted I guess. Now, the sound doesn't play anymore from the non-root user. But sound does work if I log into root user.

[cheema@screwed ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: MID [HDA Intel MID], device 0: 92HD87B1/3 Analog [92HD87B1/3 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: MID [HDA Intel MID], device 3: ID 2804 Digital [ID 2804 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I tried tweaking my ~/.asoundrc . The original file looked like this

# ALSA library configuration file

# Include settings that are under the control of asoundconf(1).
# (To disable these settings, comment out this line.)
</home/cheema/.asoundrc.asoundconf>

If I replace the contents of the ~/.asoundrc, then the sound does work(somewhat).

pcm.!default {
        type hw
        card MID
}
 
ctl.!default {
        type hw
        card MID
}

In this case, only one application is able to play the sound. For ex, if I run speaker-test and afterwards launch Clementine, clementine gives the error

Could not open audio device for playback. Device is being used by another application.

No such blocking occurs if I run from root user.

I'm attaching other debug info that may be helpful. Alsa config file /home/cheema/.asoundrc.asoundconf  (This is same as /root/.asoundrc.asoundconf)

# ALSA library configuration file managed by asoundconf(1).
#
# MANUAL CHANGES TO THIS FILE WILL BE OVERWRITTEN!
#
# Manual changes to the ALSA library configuration should be implemented
# by editing the ~/.asoundrc file, not by editing this file.
!defaults.pcm.card MID
defaults.ctl.card MID
defaults.pcm.device 0
defaults.pcm.subdevice -1
defaults.pcm.nonblock 1
defaults.pcm.compat 0
defaults.pcm.minperiodtime 5000
defaults.pcm.ipc_key 5678293
defaults.pcm.ipc_gid audio
defaults.pcm.ipc_perm 0660
defaults.pcm.dmix.max_periods 0
defaults.pcm.dmix.rate 48000
defaults.pcm.dmix.format "unchanged"
defaults.pcm.dmix.card defaults.pcm.card
defaults.pcm.dmix.device defaults.pcm.device
defaults.pcm.dsnoop.card defaults.pcm.card
defaults.pcm.dsnoop.device defaults.pcm.device
defaults.pcm.front.card defaults.pcm.card
defaults.pcm.front.device defaults.pcm.device
defaults.pcm.rear.card defaults.pcm.card
defaults.pcm.rear.device defaults.pcm.device
defaults.pcm.center_lfe.card defaults.pcm.card
defaults.pcm.center_lfe.device defaults.pcm.device
defaults.pcm.side.card defaults.pcm.card
defaults.pcm.side.device defaults.pcm.device
defaults.pcm.surround21.card defaults.pcm.card
defaults.pcm.surround21.device defaults.pcm.device
defaults.pcm.surround40.card defaults.pcm.card
defaults.pcm.surround40.device defaults.pcm.device
defaults.pcm.surround41.card defaults.pcm.card
defaults.pcm.surround41.device defaults.pcm.device
defaults.pcm.surround50.card defaults.pcm.card
defaults.pcm.surround50.device defaults.pcm.device
defaults.pcm.surround51.card defaults.pcm.card
defaults.pcm.surround51.device defaults.pcm.device
defaults.pcm.surround71.card defaults.pcm.card
defaults.pcm.surround71.device defaults.pcm.device
defaults.pcm.iec958.card defaults.pcm.card
defaults.pcm.iec958.device defaults.pcm.device
defaults.pcm.modem.card defaults.pcm.card
defaults.pcm.modem.device defaults.pcm.device
defaults.pcm.file_format "raw"
defaults.pcm.file_truncate true
defaults.rawmidi.card 0
defaults.rawmidi.device 0
defaults.rawmidi.subdevice -1
defaults.hwdep.card 0
defaults.hwdep.device 0
defaults.timer.class 2
defaults.timer.sclass 0
defaults.timer.card 0
defaults.timer.device 0
defaults.timer.subdevice 0
defaults.namehint.showall off
defaults.namehint.basic on
defaults.namehint.extended off

The /dev/snd devices

[root@screwed cheema]# ls -la /dev/snd/
total 0
drwxr-xr-x   3 root root      220 May  2 10:59 .
drwxr-xr-x  19 root root     3240 May  2 10:59 ..
drwxr-xr-x   2 root root       60 May  2 10:59 by-path
crw-rw----+  1 root audio 116,  2 May  2 10:59 controlC0
crw-rw----+  1 root audio 116,  6 May  2 10:59 hwC0D0
crw-rw----+  1 root audio 116,  7 May  2 10:59 hwC0D3
crw-rw----+  1 root audio 116,  4 May  2 13:18 pcmC0D0c
crw-rw----+  1 root audio 116,  3 May  2 13:43 pcmC0D0p
crw-rw----+  1 root audio 116,  5 May  2 13:18 pcmC0D3p
crw-rw----+  1 root audio 116,  1 May  2 10:59 seq
crw-rw----+  1 root audio 116, 33 May  2 10:59 timer

Any ideas?

Offline

#2 2015-05-02 10:18:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: No sound in non-root user

noarch wrote:

I tried tweaking my ~/.asoundrc . The original file looked like this...

What do you mean "the original"?  Where did that original come from?  There is no "original" or default for this file in archlinux. This all reminds me a lot of this previous thread.  Are you using an AUR package to "autoconfigure" alsa?  Can you post the output of the following command:

uname -a

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2015-05-02 11:06:04

noarch
Member
Registered: 2015-01-06
Posts: 17

Re: No sound in non-root user

Trillby,

[cheema@screwed ~]$ uname -a
Linux screwed 3.19.3-3-ARCH #1 SMP PREEMPT Wed Apr 8 14:10:00 CEST 2015 x86_64 GNU/Linux

I do remember using asoundconf-gtk, asoundconf to create the ~/.asoundrc.asoundconf file, but I did not edit it thereafter. I'll try the suggestions in the other thread.

Thanks for the suggestion

Offline

#4 2015-05-02 11:48:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: No sound in non-root user

Generally no ~/.asoundrc (nor other such file) is needed.  So I'd suggest just removing all of that and starting from scratch following the wiki if it doesn't work without any configs.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB