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 05:51:36
Message-Id: CADPrc829DPmaKwLMKCdSkwHnRmjy8V4yPpooxhpU-jZrdrG0Tg@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 Mon, Apr 29, 2013 at 12:35 AM, <covici@××××××××××.com> wrote:
2 > Canek Peláez Valdés <caneko@×××××.com> wrote:
3 >
4 >> On Sun, Apr 28, 2013 at 11:57 PM, <covici@××××××××××.com> wrote:
5 >> > Canek Peláez Valdés <caneko@×××××.com> wrote:
6 >> >
7 >> >> On Sun, Apr 28, 2013 at 11:08 PM, <covici@××××××××××.com> wrote:
8 >> >> > Canek Peláez Valdés <caneko@×××××.com> wrote:
9 >> >> >
10 >> >> >> On Sun, Apr 28, 2013 at 10:07 PM, <covici@××××××××××.com> wrote:
11 >> >> >> > Canek Peláez Valdés <caneko@×××××.com> wrote:
12 >> >> >> >
13 >> >> >> >> On Sun, Apr 28, 2013 at 7:56 PM, <covici@××××××××××.com> wrote:
14 >> >> >> >> > Hi. I have not used pulseaudio at all, but with gnome 3.8 I guess it
15 >> >> >> >> > must be there, but when I try to play a sound using either mplayer from
16 >> >> >> >> > the console which works fine withalsa, or even aplay, I get no sound
17 >> >> >> >> > unless I change the /etc/pulse/client.conf to spawn=no .
18 >> >> >> >>
19 >> >> >> >> Unless you have a very specific setup, you should not need to touch
20 >> >> >> >> the files under /etc/pulse. Also, are you trying to run the
21 >> >> >> >> system-wide PulseAudio service? Because that's basically wrong:
22 >> >> >> >>
23 >> >> >> >> http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide
24 >> >> >> >>
25 >> >> >> >> > Anyway to fix this?
26 >> >> >> >>
27 >> >> >> >> If you are running PA as a normal user (as you should), then perhaps
28 >> >> >> >> the per-application volume for MPlayer is muted. While playing
29 >> >> >> >> something with MPlayer, go to Settings -> Sound, then select the
30 >> >> >> >> Applications tab, and there should be a volume slider for all the
31 >> >> >> >> applications using audio. Just adjust as necessary.
32 >> >> >> >
33 >> >> >> > I got no sound when pa was run as a user. I am running these apps from
34 >> >> >> > the console -- apps such as aplay or anything which uses alsa. So I
35 >> >> >> > can't adjust any volumes under gnome, etc.
36 >> >> >>
37 >> >> >> Also, from the console you can use pactl. To play a sample sound there, do:
38 >> >> >>
39 >> >> >> pactl play-sample 0
40 >> >> >> pactl play-sample 1
41 >> >> >>
42 >> >> >> It should work. You can also set the volume from here:
43 >> >> >>
44 >> >> >> pactl set-sink-volume 0 "100%"
45 >> >> >>
46 >> >> >> 0 is usually the "master" volume.
47 >> >> >>
48 >> >> >> Check out man pactl.
49 >> >> >
50 >> >> > Well, in either system or user mode, root can play sound whereas a
51 >> >> > regular user gets silent, but without pulseaudio -- spawn=no, then a
52 >> >> > regular user can play sound. Does this give a clue?
53 >> >>
54 >> >> Not really; as I said, the PA documentation clearly says that if you
55 >> >> use system mode "You are on your own. You need to know you way around,
56 >> >> be able to write init scripts, dbus policies, to fix up device
57 >> >> permissions, and unix users, you need to pass around security cookies
58 >> >> and more."
59 >> >>
60 >> >> I haven't ever used system-wide PA.
61 >> >>
62 >> >> I think of the following; try to delete both /root/.pulse and
63 >> >> $HOME/.pulse, and rebooting (probably a logout/login should suffice,
64 >> >> but you never know).
65 >> >>
66 >> >> Another thing: if you installed PA since GNOME 3.8 needs it, why are
67 >> >> you using it without GNOME? If you use GNOME, the session manager will
68 >> >> automatically start PA as a user for you, and everything should work.
69 >> >> If you are not running GNOME, why do you run PA? If you are at the
70 >> >> console without X running, just don't use PA. Use mplayer -ao alsa or
71 >> >> whatever.
72 >> >>
73 >> >> Or do you want to run several audio apps in the console?
74 >> >
75 >> > I want to run apps from the console, but to start gnome when I need it.
76 >>
77 >> Then do that. When you start GNOME, it will start PA automatically:
78 >> you don't need to do anything. Don't try to start PA yourself; it's
79 >> DBus activated.
80 >>
81 >>
82 >> > I am running pa as a user and things are still not working, except for
83 >> > the root user who can play sounds.
84 >>
85 >> I repeat: you don't need to run PA. GNOME will start it for you.
86 >
87 > But will that workif I have spawn=no in my /etc/pulse/client.conf which
88 > I have to have for regular apps to work from theconsole? Or is there
89 > some other way to make this happen?
90
91 I don't understand the question. If you don't run PA by yourself, then
92 it will be started only when using GNOME. And if you are using GNOME,
93 you can use the nice sound settings dialog to get your sound.
94
95 If you don't start GNOME, then PA will not be started. If you don't
96 have sound in your console even without PA running, then is for some
97 issue completely unrelated to PA.
98
99 PA should not be started if you only log in through the console.
100 Unless you are still running it system-wide, which is basically
101 unsupported.
102
103 Regards.
104 --
105 Canek Peláez Valdés
106 Posgrado en Ciencia e Ingeniería de la Computación
107 Universidad Nacional Autónoma de México

Replies