Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] problem trying to play sound when pulse audio is enabled
Date: Mon, 29 Apr 2013 04:20:57
Message-Id: CADPrc825UW2Y3OQkVA=3KX8drpP_bMQhCBbiog4wn6cnQhN8MA@mail.gmail.com
In Reply to: Re: [gentoo-user] problem trying to play sound when pulse audio is enabled by covici@ccs.covici.com
1 On Sun, Apr 28, 2013 at 11:08 PM, <covici@××××××××××.com> wrote:
2 > Canek Peláez Valdés <caneko@×××××.com> wrote:
3 >
4 >> On Sun, Apr 28, 2013 at 10:07 PM, <covici@××××××××××.com> wrote:
5 >> > Canek Peláez Valdés <caneko@×××××.com> wrote:
6 >> >
7 >> >> On Sun, Apr 28, 2013 at 7:56 PM, <covici@××××××××××.com> wrote:
8 >> >> > Hi. I have not used pulseaudio at all, but with gnome 3.8 I guess it
9 >> >> > must be there, but when I try to play a sound using either mplayer from
10 >> >> > the console which works fine withalsa, or even aplay, I get no sound
11 >> >> > unless I change the /etc/pulse/client.conf to spawn=no .
12 >> >>
13 >> >> Unless you have a very specific setup, you should not need to touch
14 >> >> the files under /etc/pulse. Also, are you trying to run the
15 >> >> system-wide PulseAudio service? Because that's basically wrong:
16 >> >>
17 >> >> http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide
18 >> >>
19 >> >> > Anyway to fix this?
20 >> >>
21 >> >> If you are running PA as a normal user (as you should), then perhaps
22 >> >> the per-application volume for MPlayer is muted. While playing
23 >> >> something with MPlayer, go to Settings -> Sound, then select the
24 >> >> Applications tab, and there should be a volume slider for all the
25 >> >> applications using audio. Just adjust as necessary.
26 >> >
27 >> > I got no sound when pa was run as a user. I am running these apps from
28 >> > the console -- apps such as aplay or anything which uses alsa. So I
29 >> > can't adjust any volumes under gnome, etc.
30 >>
31 >> Also, from the console you can use pactl. To play a sample sound there, do:
32 >>
33 >> pactl play-sample 0
34 >> pactl play-sample 1
35 >>
36 >> It should work. You can also set the volume from here:
37 >>
38 >> pactl set-sink-volume 0 "100%"
39 >>
40 >> 0 is usually the "master" volume.
41 >>
42 >> Check out man pactl.
43 >
44 > Well, in either system or user mode, root can play sound whereas a
45 > regular user gets silent, but without pulseaudio -- spawn=no, then a
46 > regular user can play sound. Does this give a clue?
47
48 Not really; as I said, the PA documentation clearly says that if you
49 use system mode "You are on your own. You need to know you way around,
50 be able to write init scripts, dbus policies, to fix up device
51 permissions, and unix users, you need to pass around security cookies
52 and more."
53
54 I haven't ever used system-wide PA.
55
56 I think of the following; try to delete both /root/.pulse and
57 $HOME/.pulse, and rebooting (probably a logout/login should suffice,
58 but you never know).
59
60 Another thing: if you installed PA since GNOME 3.8 needs it, why are
61 you using it without GNOME? If you use GNOME, the session manager will
62 automatically start PA as a user for you, and everything should work.
63 If you are not running GNOME, why do you run PA? If you are at the
64 console without X running, just don't use PA. Use mplayer -ao alsa or
65 whatever.
66
67 Or do you want to run several audio apps in the console?
68
69 Regards.
70 --
71 Canek Peláez Valdés
72 Posgrado en Ciencia e Ingeniería de la Computación
73 Universidad Nacional Autónoma de México

Replies