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

Replies