Gentoo Archives: gentoo-user

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

Replies

Subject Author
Re: [gentoo-user] problem trying to play sound when pulse audio is enabled "Canek Peláez Valdés" <caneko@×××××.com>