You are not logged in.

#1 2012-12-21 03:26:38

apefish
Member
From: Vancouver
Registered: 2010-07-13
Posts: 47

Sound Only Works as Root

I've got a new Thinkpad x120e that I'm trying to set up with arch. Sound is currently only working as root:

$ sudo speaker-test   #makes a funky buzzing sshshshhs as it should

$ speaker-test
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory

$ ls -l /dev/snd
total 0
drwxr-xr-x  2 root root      100 Dec 20 18:42 by-path
crw-rw----+ 1 root audio 116,  9 Dec 20 18:42 controlC0
crw-rw----+ 1 root audio 116,  5 Dec 20 18:42 controlC1
crw-rw----+ 1 root audio 116,  2 Dec 20 18:42 controlC29
crw-rw----+ 1 root audio 116,  8 Dec 20 18:42 hwC0D0
crw-rw----+ 1 root audio 116,  4 Dec 20 18:42 hwC1D0
crw-rw----+ 1 root audio 116,  7 Dec 20 18:42 pcmC0D0c
crw-rw----+ 1 root audio 116,  6 Dec 20 19:08 pcmC0D0p
crw-rw----+ 1 root audio 116,  3 Dec 20 18:42 pcmC1D3p
crw-rw----  1 root audio 116,  1 Dec 20 18:42 seq
crw-rw----+ 1 root audio 116, 33 Dec 20 18:42 timer

$ groups
video audio users

Setting permissions doesn't seem to do anything. Being in group audio doesn't seem to do anything.

Any ideas?

Offline

#2 2012-12-21 04:31:33

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Sound Only Works as Root

Is you session active?  You don't need to be in the audio or video group anymore, as these things are handled by udev's uaccess tag (and that active session with logind).  You can check to see if you session is active by doing

$ loginctl show-session $XDG_SESSION_ID | grep Active 

Offline

#3 2012-12-21 04:39:05

apefish
Member
From: Vancouver
Registered: 2010-07-13
Posts: 47

Re: Sound Only Works as Root

WonderWoofy wrote:

Is you session active?  You don't need to be in the audio or video group anymore, as these things are handled by udev's uaccess tag (and that active session with logind).  You can check to see if you session is active by doing

$ loginctl show-session $XDG_SESSION_ID | grep Active 
$ loginctl show-session $XDG_SESSION_ID | grep Active 
Active=no

Thank you. How do I fix this? (I may figure it out myself, but help is good.)

Offline

#4 2012-12-21 16:02:08

apefish
Member
From: Vancouver
Registered: 2010-07-13
Posts: 47

Re: Sound Only Works as Root

Loginctl keeps mysteriously changing its mind. Here's what it reports right now:

Id=6
Timestamp=Fri, 2012-12-21 07:52:53 PST
TimestampMonotonic=11030509287
DefaultControlGroup=name=systemd:/user/wolf/6
VTNr=1
TTY=tty1
Remote=no
Service=login
Leader=6184
Audit=6
Type=tty
Class=user
Active=no                      #a few minutes ago this was "yes". Yesterday it was "no" 
State=online                  #a few minutes ago this was "active". yesterday it was "closing"
KillProcesses=no
IdleHint=no
IdleSinceHint=1356105209286711
IdleSinceHintMonotonic=11065853776
Name=wolf

A few minutes ago I was in a tty, then I started X. That can't explain why yesterday it said "closing" and today it has me as "active"

Is there anywhere I could read up on how this logind stuff works? I can't figure it out at all.

No matter what state it's in sound still doesn't work.

EDIT:

I used startx instead of xinit, and now it reports Active=yes and State=active. Sound still only works as root (in both tty and X). Maybe this doesn't have to do with sessions?

EDIT2:

Check it out:

$ sudo alsamixer    #shows equalizer volumes for "HDA ATI SB"
$ alsamixer             #shows a single muted thing for "HD-Audio Generic"

$ cat /etc/modprobe.d/snd-hda-intel.conf                     #like the wiki says
options snd-hda-intel index=1

Pressing f6 and changing to the other card doesn't stick. I followed the wiki entry on the x120e and set the index for the sound driver. Maybe I should try 0?

Last edited by apefish (2012-12-21 16:16:46)

Offline

#5 2012-12-21 17:05:03

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Sound Only Works as Root

if you use xinit you break logind, use startx instead.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2012-12-22 05:12:04

apefish
Member
From: Vancouver
Registered: 2010-07-13
Posts: 47

Re: Sound Only Works as Root

Weeeeee! I fixed it.

cat /etc/modprobe.d/snd-hda-intel.conf 
options snd-hda-intel index=0

So. The wiki is wrong for me. It recommends index=1.

Offline

#7 2012-12-22 05:18:00

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: Sound Only Works as Root

So this is [solved]? I thought index=0 was the default.


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#8 2012-12-22 19:16:40

ZekeSulastin
Member
Registered: 2010-09-20
Posts: 266

Re: Sound Only Works as Root

Mr.Elendig wrote:

if you use xinit you break logind, use startx instead.

Uhm, I use xinit on a second tty to start second X sessions for fullscreen games all the time and logind tracks the session fine.  It starts on the same tty in arch by default now.

Offline

Board footer

Powered by FluxBB