1 |
sean <tech.junk@×××××××××××.net> posted 4A4B6572.8000308@×××××××××××.net, |
2 |
excerpted below, on Wed, 01 Jul 2009 09:32:34 -0400: |
3 |
|
4 |
>> This sounds to me like one of the sound modules isn't loaded. ALSA has |
5 |
>> always started muted, until it's unmuted, but that can't be it, as xine |
6 |
>> should then play, it'd just be muted. But if one of the necessary |
7 |
>> modules wasn't loaded, xine would presumably detect that by the failure |
8 |
>> to open the device at all, thus the xine-out.wav. |
9 |
> |
10 |
> All modules are loaded. In fact I just rebuilt my kernel yesterday and |
11 |
> repopulated the modules that are to load on startup, and still the same |
12 |
> problem. |
13 |
> |
14 |
> As a regular user, if I start alsamixer and see basically a display with |
15 |
> no channels, I need to rerun alsaconf as root. Once done, alsamixer |
16 |
> looks proper with all the channels. The only channel that is muted after |
17 |
> this, is the mic channel. |
18 |
|
19 |
|
20 |
So you're saying that it only happens as a regular user? You can run |
21 |
alsamixer as root and see all channels when you can't as a regular user, |
22 |
and that running alsaconf (as root) fixes it then? |
23 |
|
24 |
If you see them as root but not as a normal user, it's a permissions |
25 |
problem. |
26 |
|
27 |
Just to check, your user is in the audio group, right? (I expect so |
28 |
since otherwise you'd likely have problems even after running alsaconf as |
29 |
root, since it's going to assume that.) |
30 |
|
31 |
What's the permissions on all the components in the /dev/snd dir? Check |
32 |
both before and after running alsaconf, to see if there's a change, |
33 |
either in devices listed or in permissions. |
34 |
|
35 |
Here's what I have here: |
36 |
|
37 |
ls -l /dev/snd |
38 |
total 0 |
39 |
crw-rw---- 1 root audio 116, 0 2009-06-30 14:05 controlC0 |
40 |
crw-rw---- 1 root audio 116, 24 2009-06-30 14:05 pcmC0D0c |
41 |
crw-rw---- 1 root audio 116, 16 2009-07-01 07:26 pcmC0D0p |
42 |
crw-rw---- 1 root audio 116, 25 2009-06-30 14:05 pcmC0D1c |
43 |
crw-rw---- 1 root audio 116, 1 2009-06-30 14:05 seq |
44 |
crw-rw---- 1 root audio 116, 33 2009-06-30 14:05 timer |
45 |
|
46 |
If you're not seeing similar, and/or the group isn't audio, and/or you're |
47 |
not seeing 660 perms (read/write on group is what we're after), then |
48 |
that's likely the problem... |
49 |
|
50 |
Years ago, there was a pam-console module that could screw up |
51 |
permissions. The idea back then was to set the owner to the actual |
52 |
logged-in user and only allow them access. The reasoning went something |
53 |
like this: Consider the scenario of an office, with a multi-user system, |
54 |
with one user logged in locally and perhaps others logged in remotely, |
55 |
from other areas of the office. Now, imagine all those users are in the |
56 |
audio group. Now, imagine some wiseguy at the other end of the office |
57 |
logging in, turning the sound volume up, and having it play... say a |
58 |
nasty fart... or a porno soundtrack, or something. The poor user |
59 |
actually logged in at the console would have no idea... but be extremely |
60 |
embarrassed! |
61 |
|
62 |
Unfortunately that didn't work so well, because for various reasons, X |
63 |
sessions weren't always counted as logins, so it was quite possible to |
64 |
have someone logged into X but not at the text console, and not have |
65 |
sound permissions as a result. Combine this with the fact that multiple- |
66 |
user logins, at least at the same time (and remote) are far less common |
67 |
these days, and it was a huge hassle for very little gain. Many people |
68 |
ended up either setting pam-console permissions for that sort of stuff to |
69 |
660 audio group or 666 world writable, if they could figure out pam- |
70 |
console's settings to do so, or having to jump thru hoops like keeping a |
71 |
text console logged in, in ordered to have sound in X. |
72 |
|
73 |
pam-console has been obsolete on Gentoo for years now, I think, but |
74 |
perhaps you are still running it? Unlikely, since I don't even see it |
75 |
listed as available any more, but one never knows. |
76 |
|
77 |
Alternatively, consolekit is supposed to be the modern version of pam- |
78 |
console, I think. X requires it, and I have it installed, but I haven't |
79 |
the foggiest how it works and its config is 100% default here. However, |
80 |
it's possible there's a similar issue with it. Unfortunately, as I said, |
81 |
I haven't the foggiest on it. |
82 |
|
83 |
Then there's udev. At least with the ~arch version I have |
84 |
installed (udev-141-r1), its permission rules for alsa seem to be in |
85 |
/lib64/udev/rules.d/40-alsa.rules . That doesn't appear to be |
86 |
CONFIG_PROTECTed by default, so any changes made to the rules there will |
87 |
be overwritten when you update udev. FWIW, here's the file as I have it: |
88 |
|
89 |
# do not edit this file, it will be overwritten on update |
90 |
|
91 |
SUBSYSTEM=="sound", GROUP="audio" |
92 |
KERNEL=="controlC[0-9]*", NAME="snd/%k" |
93 |
KERNEL=="hwC[D0-9]*", NAME="snd/%k" |
94 |
KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k" |
95 |
KERNEL=="midiC[D0-9]*", NAME="snd/%k" |
96 |
KERNEL=="timer", NAME="snd/%k" |
97 |
KERNEL=="seq", NAME="snd/%k" |
98 |
KERNEL=="mixer0", SYMLINK+="mixer" |
99 |
|
100 |
As you can see, it's set to create all devices in the audio group, so |
101 |
that's what you should see, unless something strange is going on. FWIW, |
102 |
you'd put any changes in a file in /etc/udev/rules.d, which should be |
103 |
CONFIG_PROTECTed. |
104 |
|
105 |
Of course you may not be running udev, preferring a static /dev. In that |
106 |
case, changes you make to the device permissions should remain. |
107 |
|
108 |
Depending on your config, you may also have some devices copied into dev |
109 |
from a state dir, as part of the udev setup. I disabled that right away |
110 |
as udev was working fine on its own and I didn't want anything screwing |
111 |
up its work, but Gentoo was using a state tarball by default for some |
112 |
time, and for all I know, still is. But I think that's part of |
113 |
baselayout/openrc, and I've been on baselayout-2/openrc for long enough |
114 |
now I've quite forgotten how baselayout-1 worked, so you'll have to find |
115 |
that stuff on your own if you're still using it (which you likely are if |
116 |
you're on stable). |
117 |
|
118 |
-- |
119 |
Duncan - List replies preferred. No HTML msgs. |
120 |
"Every nonfree program has a lord, a master -- |
121 |
and if you use the program, he is your master." Richard Stallman |