Ticket #425 (new enhancement)

Opened 15 years ago

Last modified 12 years ago

switch to pacmd for muting sound on cluster machines

Reported by: geofft Owned by:
Priority: low Milestone: Current Semester
Component: -- Keywords:
Cc: Fixed in version:
Upstream bug:

Description

I wrote in #292:

There's a related issue that this doesn't do anything on the Dell 760s because they have an entirely different "Mono" slider all the way to the right of alsamixer that's off by default, but making unmuting sane across the different hardware types is a different ticket.

If we use PulseAudio's pacmd set-sink-mute 0 1 instead of /etc/init.d/alsa-utils stop, we mute sound the way that checking the "mute" checkbox on the panel volume control widget would do that, as opposed to muting every ALSA slider so that you have to go unmute them all.

I'd make this change right now, but I'm in the middle of an invasive rewrite of debathena-reactivate, and I also worry that you'd need to be clever about restoring ALSA levels, since alsa-utils stop has the property of saving the previous levels — so if you run it twice in a row, you save the muted levels. We'll want to have ALSA's saved levels be full / default volume before switching to pacmd.

Change History

comment:1 Changed 15 years ago by jdreed

  • Milestone set to Summer 2010 (Lucid Deploy)

comment:2 Changed 15 years ago by jdreed

See also #357

comment:3 Changed 15 years ago by broder

I think this is a little more complicated, because we want to set the ALSA sliders to their default settings, but we still don't want gdm making noise, which I think means that we need to do something early in gdm's session.

But at the same time, the PulseAudio daemon gets spawned by /etc/X11/Xsession.d/70pulseaudio:

                STARTUP="/usr/bin/pulse-session $STARTUP"

So we can't actually do anything in /etc/X11/Xsession.d, since the PulseAudio session hasn't started yet.

On the plus side, I think we can use alsactl init to reset all of the ALSA sliders, possibly along with rm -f /var/lib/alsa/asound.state

comment:4 Changed 15 years ago by broder

Anders points out that PulseAudio? can probably just do this for us:

-> debathena / trac-#425 / andersk  23:37  (Anders Kaseorg)
       Or you could put pacmd commands into default.pa(5).

comment:5 Changed 15 years ago by jdreed

It may easier to simply decide to only mute the speaker channel, and move on.

comment:6 Changed 14 years ago by jdreed

  • Milestone changed from Summer 2010 (Lucid Deploy) to Fall 2010

comment:7 Changed 13 years ago by jdreed

  • Milestone changed from Natty Alpha to Fall 2011

comment:8 Changed 12 years ago by jdreed

The man page suggests that /etc/pulse/default.pa is only run if a user's file doesn't exist, so default.pa(5) may also not be what we want here.

Note: See TracTickets for help on using tickets.