xpra icon
Bug tracker and wiki

Opened 4 years ago

Closed 4 years ago

#915 closed defect (needinfo)

Sound Forwarding to client doesn't work (for me)

Reported by: fervi Owned by: fervi
Priority: major Milestone: 0.16
Component: sound Version: trunk
Keywords: sound, forwarding Cc:

Description

I tried to do with Xpra from version 0.14 to 0.16 (Beta of Winswitch)

The point is that I want to do audio transfer from the server to the client. Voice server originated from Xpra, but the client does not sound at all. It follows that Xpra not see PulseAudio? (?), Even though it is running and the other applications have no problem with that.

My system is Debian Stretch (64-bit version)

Attachments (7)

result (2.0 KB) - added by fervi 4 years ago.
Client log
xpra-run (574 bytes) - added by fervi 4 years ago.
2015-07-13-210033_2048x1152_scrot.png (174.5 KB) - added by fervi 4 years ago.
Server Pavucontrol
2015-07-13-210044_2048x1152_scrot.png (204.4 KB) - added by fervi 4 years ago.
Client Pavucontrol
client (801 bytes) - added by fervi 4 years ago.
Client PulseAudio? Xpra Test
server (798 bytes) - added by fervi 4 years ago.
Server PulseAudio? Xpra test
pactllist (29.8 KB) - added by fervi 4 years ago.
Pactl (1 line - Client) (469 line - Server)

Download all attachments as: .zip

Change History (14)

Changed 4 years ago by fervi

Attachment: result added

Client log

Changed 4 years ago by fervi

Attachment: xpra-run added

Changed 4 years ago by fervi

Server Pavucontrol

Changed 4 years ago by fervi

Client Pavucontrol

comment:1 Changed 4 years ago by Antoine Martin

Owner: changed from Antoine Martin to fervi

Wow - what a lot of unnecessary noise:

xpra start ssh:[email protected]:150 --speed=100 --auto-refresh-delay=5000 \
 --packet-encoders=rencode --encoding=x264 --exit-with-children --pulseaudio \
 --speaker=on --microphone=on --dbus-proxy --cursors=no --mmap=yes \
 --video-encoders=x264 --speaker --microphone --min-quality=1 --quality=45 \
 --compressors=lz4 --input-method=Ibus --compress=1 --video-decoders=avcodec2 \
 --title='@[email protected] on Intinte Rasengan' --ssh='ssh -x -C' \
 --csc-modules=opencl,swscale \
  --start-child="/home/fervi/Intinte/Rasengan/vglconnect && /home/fervi/Intinte/Rasengan/vglrun $1 $2 $3 $4 $5 $6 $7 $8 $9"
  • x264 is not a valid encoding (though it is still supported for legacy reasons - it will be dropped)
  • speaker defaults to on already
  • do you really want microphone forwarding? (or just speaker)
  • speaker and microphone options are specified twice, once in the form "--speaker" once as "--speaker=on"
  • mmap defaults to on already
  • video encoders are only used to restrict options, do you really mean to? why?
  • compress=1 is the default already
  • lz4 is the default compressor, why do you specify it?
  • why specify video decoders?
  • why specify csc modules? and specify one you don't have!? (opencl)

Summary: don't use options unless you understand them and you know you need them.

Warning: cannot parse value 'yes -configdir /etc/xpra/xpra.conf.d' for 'displayfd' as a boolean

Sounds like your xpra.conf has a problem in it. Please post it. xpra.conf.d what is this?

Now, on to sound proper: it looks like you are forwarding sound from an existing pulseaudio server running in your desktop session, right?
The real problem comes from this:

could not detect any Pulseaudio monitor devices - sound forwarding is disabled

To debug this, run the pulseaudio util class (installed with xpra). This is what I get:

$ ./xpra/sound/pulseaudio_util.py 
device.alsa_input.pci-0000_00_1b.0.analog-stereo                 : Built-in Audio Analog Stereo
device.alsa_output.pci-0000_00_1b.0.analog-stereo                : Built-in Audio Analog Stereo
device.alsa_output.pci-0000_00_1b.0.analog-stereo.monitor        : Monitor of Built-in Audio Analog Stereo
device.alsa_output.pci-0000_01_00.1.hdmi-stereo                  : HDA NVidia Digital Stereo (HDMI)
device.alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor          : Monitor of HDA NVidia Digital Stereo (HDMI)
device.audio-volume-change                                       : Built-in Audio Analog Stereo
devices                                                          : 4
pulseaudio.found                                                 : {a46a8bb32f244826a8fe08aba5c54d0c}unix:/run/user/1000/pulse/native
pulseaudio.id                                                    : [email protected]/4839
pulseaudio.server                                                : {a46a8bb32f244826a8fe08aba5c54d0c}unix:/run/user/1000/pulse/native
pulseaudio.wrapper                                               : pactl
Last edited 4 years ago by Antoine Martin (previous) (diff)

comment:2 Changed 4 years ago by fervi

Ok, I have reduced a little code.

The server has support for OpenCL, but Xpra does not support it (probably something wrong work). Just in case I did OpenCL, swscale, because if it does not OpenCL (as in this case) it would launched with swscale, which is faster in benchmarks from Cython

can not load csc_opencl (OpenCL colorspace conversion): ColorspaceConverter missing from xpra.codecs.csc_opencl.colorspace_converter: clEnqueueNDRangeKernel failed: out of resources

RuntimeError: clEnqueueNDRangeKernel failed: out of resources
2015-07-14 12: 49: 14.113 csc csc_opencl module could not be loaded: clEnqueueNDRangeKernel failed: out of resources

/etc/xpra/xpra.conf.d - I do not have this directory, I wanted to run Xfvb, but it did not work, so I abandoned it

I'm trying to find a configuration Xpra, which will allow for very quick in terms of productivity and burdens the communication network.

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

Changed 4 years ago by fervi

Attachment: client added

Client PulseAudio? Xpra Test

Changed 4 years ago by fervi

Attachment: server added

Server PulseAudio? Xpra test

comment:3 Changed 4 years ago by Antoine Martin

About opencl: out of resources probably means that your card, which you have not specified, cannot run the kernel we provide. No big loss.
If you really feel like debugging this issue, you can get more log output by running with -d opencl.


Just in case I did OpenCL, swscale, because if it does not OpenCL (as in this case) it would launched with swscale, which is faster in benchmarks from Cython


That's already the default, Cython will only be used if the other two fail somehow.
So once again, you're just complicating things for absolutely zero benefit.


I'm trying to find a configuration Xpra, which will allow for very quick in terms of productivity and burdens the communication network.


Then you should start by understanding the options before you use them.
Xpra should be near optimal out of the box, the majority of the changes you made are actually detrimental to your goals.

Here's one I forgot to mention: ssh -C is the worse thing you can add, it will make things considerably slower. Which is in the man page, BTW.


Now, as for this ticket, which is about pulseaudio.
It looks to me like the pulseaudio utility class did not detect any devices at all.
Please post pactl list from both the client and server.

Changed 4 years ago by fervi

Attachment: pactllist added

Pactl (1 line - Client) (469 line - Server)

comment:4 Changed 4 years ago by Antoine Martin

r9957 makes it easier to see what the pulseaudio util class parses from the "pactl list" command line output.

After splitting your file into two:

$ ./xpra/sound/pulseaudio_pactl_util.py /home/antoine/Downloads/pactllist-client.txt 
1 devices found in '/home/antoine/Downloads/pactllist-client.txt'
* alsa_output.pci-0000_00_04.0.analog-stereo.monitor
$ ./xpra/sound/pulseaudio_pactl_util.py /home/antoine/Downloads/pactllist-server.txt 
1 devices found in '/home/antoine/Downloads/pactllist-server.txt'
* alsa_output.pci-0000_00_1b.0.analog-stereo.monitor

So this correctly detects the devices.
My guess is that the environment you used is not the same. Not much I can do about that.

comment:5 Changed 4 years ago by fervi

Client and Server gave something like this

2015-07-14 11:50:33,015 palib not available, using legacy pactl fallback

Maybe if I install something, then maybe I get palib support and it will working? Do you have any idea how to install palib?

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

comment:6 Changed 4 years ago by Antoine Martin

palib is not the problem, it's optional.

comment:7 Changed 4 years ago by Antoine Martin

Resolution: needinfo
Status: newclosed
Note: See TracTickets for help on using tickets.