xpra icon
Bug tracker and wiki

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#363 closed defect (fixed)

xpra only monitors first pulseaudio output

Reported by: Norman Rasmussen Owned by: Norman Rasmussen
Priority: minor Milestone: 0.10
Component: server Version:
Keywords: Cc:

Description (last modified by Antoine Martin)

if there's more than one output device, only the first one is monitored. If it's not the default, then no sound is heard.


Would it be possible to add a way to choose which output device to monitor. Maybe choose the default one, if pulse allows?

using sound codec mp3
found more than one monitor device: { \
   'alsa_output.pci-0000_05_00.1.hdmi-stereo-extra3.monitor': 'Monitor of GF108 High Definition Audio Controller Digital Stereo (HDMI)', \
    'alsa_output.pci-0000_00_1b.0.analog-stereo.monitor': 'Monitor of Built-in Audio Analog Stereo'}
using: Monitor of GF108 High Definition Audio Controller Digital Stereo (HDMI)
starting sound using pulseaudio device alsa_output.pci-0000_05_00.1.hdmi-stereo-extra3.monitor
codec: MPEG-1 Layer 3 (MP3)

Change History (7)

comment:1 Changed 7 years ago by Antoine Martin

Component: coreserver
Description: modified (diff)
Milestone: 0.10
Priority: majorminor
Status: newassigned

I don't really know how we can get this information, does this do what you want:

$ pactl info | grep "Default Sink"
Default Sink: alsa_output.pci-0000_00_1b.0.analog-stereo

If so, I guess we could use that easily enough.


Please note however that what you are doing is a little bit odd here: you seem to be using an existing pulseaudio daemon (the one from an existing X11 session presumably) as the pa daemon for an xpra session (which may well be displayed remotely)... normally, you would start a dedicated pa daemon for your xpra session (which is not easy to do if you already have an X11 session for that user.. but that's another matter)

comment:2 Changed 7 years ago by Norman Rasmussen

Yes:

$ pactl info | grep "Default Sink"
Default Sink: alsa_output.pci-0000_00_1b.0.analog-stereo

I did look briefly at trying to start my own pulseaudio daemon, but I didn't look into how it 'detects' that it's already running. I'm already running a dedicated dbus-daemon, by unsetting DBUS_SESSION_BUS_ADDRESS and eval $(dbus-launch), but maybe I should be unsetting XDG_SESSION_COOKIE too?

comment:3 Changed 7 years ago by Norman Rasmussen

(oops, just to make it 100% clear, I pasted the output from my console, and it's the same as your example output)

comment:4 Changed 7 years ago by Antoine Martin

Owner: changed from Antoine Martin to Norman Rasmussen
Status: assignednew

r3756 should do what you want - let me know so I can close the ticket.

I did look briefly at trying to start my own pulseaudio daemon

It takes a lot more effort get pa to spawn a new daemon.
From wiki/Sound: Simply clearing the environment and trying to start a new pulseaudio instance will not work without some serious hacks to the environment variables that pulseaudio uses to find existing instances

You will have to lie about $HOME etc to get it to run a second daemon as the same user.

Last edited 7 years ago by Antoine Martin (previous) (diff)

comment:5 Changed 7 years ago by Norman Rasmussen

That now works! It turns out that the monitor was muted too, and only pavucontrol shows you and allows you to change that. ("gnome-control-center sound-nua" doesn't have an option to show monitors)

Now the only issue is sound latency getting worse and worse, but I think #293 is perhaps addressing that, and I'll need to wait for the next stable release :-)

comment:6 Changed 7 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

ah, well I guess we could also change the volume using pactl:

set-source-volume SOURCE VOLUME
    Set the volume of the specified source (identified by its symbolic
    name or numerical index). VOLUME can be specified as an integer
    (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage
    (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the
    volume specification start with a + or - the volume adjustment will be
    relative to the current source volume.

If you want this, feel free to file a new ticket pointing back to this one.

You can help us get the next release out of the door by testing #293 if you can. There are beta packages here and they should be recent enough to include most of the fixes.

Last edited 7 years ago by Antoine Martin (previous) (diff)

comment:7 Changed 7 years ago by Norman Rasmussen

Done, #368.

Note: See TracTickets for help on using tickets.