subcup
September 17, 2024, 8:50am
1
Morning all,
I hope this is the right place for my question. My problem in brief:
I have a Debian12 rental server (but same problems with a VM at home)
with Xfce4 installed (but its basically the same with Plasma, and with Gnome).
Compiled pulseaudio modules with the help of the scripts from Griffon’s IT Library resp. neutrinolabs. (Sorry, I’m new - wasn’t allowed to leave the links.)
Connection via xrdp is ok, but no audio forwarding (neither with Guacamole, nor with Remmina), although pavucontrol shows that there is a signal coming from the expected sink.
I suppose something is not tied together correctly, but I’m not a pro. I really don’t know which of the fucking manuals to read first… My only leads:
systemctl --user status pulseaudio
gives me
● pulseaudio.service - Sound Service
Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; enabled; preset: enabled)
Active: active (running) since Fri 2024-09-13 19:57:35 CEST; 16h ago
TriggeredBy: ● pulseaudio.socket
Main PID: 1260 (pulseaudio)
Tasks: 3 (limit: 4527)
Memory: 3.3M
CPU: 6.150s
CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pulseaudio.service
└─1260 /usr/bin/pulseaudio --daemonize=no --log-target=journal
Sep 13 19:58:04 srvname pulseaudio[1260]: sink_process_msg: not running
Sep 13 19:58:04 srvname pulseaudio[1260]: close_send:
Sep 13 19:58:24 srvname pulseaudio[1260]: sink_process_msg: not running
Sep 13 19:58:24 srvname pulseaudio[1260]: close_send:
Sep 13 19:58:29 srvname pulseaudio[1260]: sink_process_msg: not running
Sep 13 19:58:29 srvname pulseaudio[1260]: close_send:
and in .xsession-errors
it says
> 20
> - pulseaudio xrdp-sink loaded
> - pulseaudio xrdp-sink set as default
> 22
> - pulseaudio xrdp-source loaded
> - pulseaudio xrdp-source set as default
> ** (wrapper-2.0:39475): WARNING **: 15:29:28.130: Binding 'XF86AudioMicMute' failed!
> (wrapper-2.0:39475): pulseaudio-plugin-WARNING **: 15:29:28.130: Could not have grabbed volume control keys. Is another volume control application (xfce4-volumed) running?
> ** (wrapper-2.0:39475): WARNING **: 15:29:35.763: Binding 'XF86AudioNext' failed!
> ** (wrapper-2.0:39475): WARNING **: 15:29:35.763: Binding 'XF86AudioPrev' failed!
> ** (wrapper-2.0:39475): WARNING **: 15:29:35.764: Binding 'XF86AudioStop' failed!
> ** (wrapper-2.0:39475): WARNING **: 15:29:35.770: Binding 'XF86AudioPlay' failed!
> ** (wrapper-2.0:39475): WARNING **: 15:29:35.770: Binding 'XF86AudioMute' failed!
> ** (wrapper-2.0:39475): WARNING **: 15:29:35.771: Binding 'XF86AudioRaiseVolume' failed!
> ** (wrapper-2.0:39475): WARNING **: 15:29:35.771: Binding 'XF86AudioLowerVolume' failed!
(There’s no xfce4-volumed process running.)
Can anyone make sense of this? I would be very grateful for a nudge in the right direction.
Thanks in advance…
P.S.: All my computers run Linux, so its not a Windows problem.
Lubos
September 25, 2024, 9:16am
2
Hello,
have you tried to get more logs by starting pulseaudio manually:
First stop it with as a regular user:
systemctl --user stop pulseaudio.socket
After that start it with:
pulseaudio --daemonize=no --log-target=stderr -vvv > pulseaudio_log.txt 2>&1
This will create file called pulseaudio_log.txt
in your current directory. You should see something like:
Look for anything suspicious in that file. Hope this helps.
Lubos
subcup
September 27, 2024, 3:23pm
3
Thanks, Lubos,
I did what you suggested. To me it looks as if
the null-sink is created
the xrdp-sink is created
and then it doesn’t work
Can anyone read more from this?
...
I: [pulseaudio] module.c: Loaded "module-augment-properties" (index: #0; argument: "").
D: [pulseaudio] module-always-sink.c: Autoloading null-sink as no other sinks detected.
I: [pulseaudio] sink.c: Created sink 0 "auto_null" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c: device.description = "Dummy-Ausgabe"
I: [pulseaudio] sink.c: device.class = "abstract"
I: [pulseaudio] sink.c: device.icon_name = "audio-card"
I: [pulseaudio] source.c: Created source 0 "auto_null.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c: device.description = "Monitor of Dummy-Ausgabe"
I: [pulseaudio] source.c: device.class = "monitor"
I: [pulseaudio] source.c: device.icon_name = "audio-input-microphone"
D: [null-sink] module-null-sink.c: Thread starting up
I: [null-sink] util.c: Failed to acquire real-time scheduling: Datei oder Verzeichnis nicht gefunden
D: [pulseaudio] sink.c: auto_null: state: INIT -> IDLE
D: [pulseaudio] source.c: auto_null.monitor: state: INIT -> IDLE
I: [pulseaudio] core.c: default_source: (unset) -> auto_null.monitor
I: [pulseaudio] core.c: default_sink: (unset) -> auto_null
I: [pulseaudio] module.c: Loaded "module-null-sink" (index: #2; argument: "sink_name=auto_null sink_properties='device.description="Dummy-Ausgabe"'").
I: [pulseaudio] module.c: Loaded "module-always-sink" (index: #1; argument: "").
D: [pulseaudio] module.c: Checking for existence of '/usr/lib/pulse-16.1+dfsg1/modules/module-xrdp-sink.so': success
N: [pulseaudio] module-xrdp-sink.c: Build library version 16.1.0
I: [pulseaudio] sink.c: Created sink 1 "xrdp-sink" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c: device.description = "xrdp sink"
I: [pulseaudio] sink.c: device.class = "abstract"
I: [pulseaudio] sink.c: device.icon_name = "audio-card"
I: [pulseaudio] source.c: Created source 1 "xrdp-sink.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c: device.description = "Monitor of xrdp sink"
I: [pulseaudio] source.c: device.class = "monitor"
I: [pulseaudio] source.c: device.icon_name = "audio-input-microphone"
D: [pulseaudio] module-xrdp-sink.c: 3 block_usec 30000
D: [xrdp-sink] module-xrdp-sink.c: Thread starting up
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_SET_STATE
E: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: not running
E: [xrdp-sink] module-xrdp-sink.c: close_send:
D: [xrdp-sink] module-xrdp-sink.c: sink_set_state_in_io_thread_cb: set timestamp
D: [xrdp-sink] module-xrdp-sink.c: process_render: u->block_usec 30000
D: [pulseaudio] sink.c: xrdp-sink: state: INIT -> IDLE
D: [pulseaudio] source.c: xrdp-sink.monitor: state: INIT -> IDLE
I: [pulseaudio] module-always-sink.c: A new sink has been discovered. Unloading null-sink.
I: [pulseaudio] module.c: Loaded "module-xrdp-sink" (index: #3; argument: "").
...
cheers…
Lubos
September 30, 2024, 10:07am
4
What do you get when you run:
$ aplay -l
Please post output here. It should show list of audio devices available.
Do you have this issue with all users. Can please try create a new user and test audio to see if you have the same issue.
Also check user permissions:
$ sudo usermod -aG audio $USER
Also it is worth to check permissions. Check the group here:
$ ls -l /dev/snd/
you will see something like:
Next, make sure that your user belongs to audio group like it is in this case. Something like:
$ id
uid=1000(lubos) gid=1000(lubos) groups=1000(lubos),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),100(users),104(kvm),106(netdev),112(bluetooth),114(lpadmin),118(scanner),126(libvirt),131(docker)
Also can you use aplay to play any audio and see if the state of the sink changes from IDLE?
subcup
October 1, 2024, 1:45pm
5
Thank you very much for all the effort!
aplay -l
cannot find any soundcards. But this isn’t much of a surprise since its a virtual server somewhere in “the cloud”.
There are three user accounts - same story with all of them. I cannot think of a reason why this should make a difference, but I will create a brand new account later this week and try again.
/dev/snd
belongs to root and the audio group which my users are members of.
Finally here is what happens when the user plays a soundfile with aplay. Sorry if the material seems a bit too extensive - I am unsure what is noise and what might be of interest.
I: [pulseaudio] sink-input.c: Created input 0 "/usr/share/sounds/alsa/Front_Left.wav" on xrdp-s
ink with sample spec s16le 1ch 48000Hz and channel map mono
I: [pulseaudio] sink-input.c: media.format = "WAV (Microsoft)"
I: [pulseaudio] sink-input.c: application.name = "paplay"
I: [pulseaudio] sink-input.c: media.name = "/usr/share/sounds/alsa/Front_Left.wav"
I: [pulseaudio] sink-input.c: native-protocol.peer = "UNIX socket client"
I: [pulseaudio] sink-input.c: native-protocol.version = "35"
I: [pulseaudio] sink-input.c: application.process.id = "11236"
I: [pulseaudio] sink-input.c: application.process.user = "tutor"
I: [pulseaudio] sink-input.c: application.process.host = "taco-rabanne"
I: [pulseaudio] sink-input.c: application.process.binary = "pacat"
I: [pulseaudio] sink-input.c: application.language = "en_US.UTF-8"
I: [pulseaudio] sink-input.c: window.x11.display = ":10.0"
I: [pulseaudio] sink-input.c: application.process.machine_id = "e999e01c469543c898546abfbc8
af3a6"
I: [pulseaudio] sink-input.c: application.process.session_id = "c1"
I: [pulseaudio] protocol-native.c: Requested tlength=2000.00 ms, minreq=20.00 ms
D: [pulseaudio] protocol-native.c: Traditional mode enabled, modifying sink usec only for compa
t with minreq.
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: code 15
D: [pulseaudio] protocol-native.c: Requested latency=1960.00 ms, Received latency=30.00 ms
D: [pulseaudio] memblockq.c: memblockq requested: maxlength=4194304, tlength=192000, base=2, prebuf=190082, minreq=1920 maxrewind=0
D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=4194304, tlength=192000, base=2, prebuf=190082, minreq=1920 maxrewind=0
I: [pulseaudio] protocol-native.c: Final latency 2030.00 ms = 1960.00 ms + 2*20.00 ms + 30.00 ms
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: code 0
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: code 3
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: code 4
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_SET_STATE
E: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: not running
E: [xrdp-sink] module-xrdp-sink.c: close_send:
D: [pulseaudio] sink.c: xrdp-sink: state: IDLE -> RUNNING
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 54573
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_REQUESTED_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 54355
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 53766
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_REQUESTED_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 53603
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 53303
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_REQUESTED_LATENCY
D: [xrdp-sink] protocol-native.c: Requesting rewind due to end of underrun.
D: [xrdp-sink] module-xrdp-sink.c: Requested to rewind 5292 bytes.
D: [xrdp-sink] sink.c: Processing rewind...
D: [xrdp-sink] sink-input.c: Have to rewind 5292 bytes on render memblockq.
D: [xrdp-sink] source.c: Processing rewind...
D: [xrdp-sink] module-xrdp-sink.c: Rewound 5292 bytes.
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 22670
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_REQUESTED_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: process_render: u->block_usec 30000
D: [xrdp-sink] module-xrdp-sink.c: trying to connect to /run/xrdp/sockdir/xrdp_chansrv_audio_out_socket_10
D: [xrdp-sink] module-xrdp-sink.c: Connected failed
D: [xrdp-sink] module-xrdp-sink.c: process_render: u->block_usec 30000
[...]
D: [xrdp-sink] module-xrdp-sink.c: process_render: u->block_usec 30000
D: [xrdp-sink] module-xrdp-sink.c: trying to connect to /run/xrdp/sockdir/xrdp_chansrv_audio_out_socket_10
D: [xrdp-sink] module-xrdp-sink.c: Connected failed
D: [xrdp-sink] module-xrdp-sink.c: process_render: u->block_usec 30000
[...]
D: [xrdp-sink] module-xrdp-sink.c: process_render: u->block_usec 30000
D: [xrdp-sink] protocol-native.c: Implicit drain of '/usr/share/sounds/alsa/Front_Left.wav'
D: [xrdp-sink] protocol-native.c: Drain acknowledged of '/usr/share/sounds/alsa/Front_Left.wav'
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: code 1
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: code 3
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: code 4
D: [xrdp-sink] module-xrdp-sink.c: Requested to rewind 5292 bytes.
D: [xrdp-sink] sink.c: Processing rewind...
D: [xrdp-sink] source.c: Processing rewind...
D: [xrdp-sink] module-xrdp-sink.c: Rewound 5292 bytes.
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_SET_STATE
E: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: not running
E: [xrdp-sink] module-xrdp-sink.c: close_send:
D: [pulseaudio] sink.c: xrdp-sink: state: RUNNING -> IDLE
D: [pulseaudio] core.c: Hmm, no streams around, trying to vacuum.
I: [pulseaudio] sink-input.c: Freeing input 0 "/usr/share/sounds/alsa/Front_Left.wav"
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 28489
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_REQUESTED_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 28291
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 27909
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_REQUESTED_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 27753
I: [pulseaudio] client.c: Freed 1 "paplay"
I: [pulseaudio] protocol-native.c: Connection died.
‘Connected failed’??
There are two sockets in /run/xrdp/sockdir
: xrdp:disconnect_display_10
, and xrdp_display_10
.
Trying to find
the missing socket gave me find: ‘/proc/1161/task/1161/net’: Invalid argument
, and finally looking for this process resulted in
tutor 1161 0.0 0.0 0 0 ? Z 15:29 0:00 [xrdp-chansrv] <defunct>
Do we know more know? (Sorry to be a pain…)
Lubos
October 2, 2024, 9:38am
6
Can you restart xrdp
:
sudo systemctl restart xrdp
and see if the xrdp-chansrv is up and running?
Try something like:
ps aux | grep xrdp-chansrv
does it defunct only when you try to forward audio to your remote session?
Do you have permissions to xrdp_chansrv_audio_out_socket_10
?
D: [xrdp-sink] module-xrdp-sink.c: Connected failed
D: [xrdp-sink] module-xrdp-sink.c: process_render: u->block_usec 30000
[...]
D: [xrdp-sink] module-xrdp-sink.c: process_render: u->block_usec 30000
D: [xrdp-sink] module-xrdp-sink.c: trying to connect to /run/xrdp/sockdir/xrdp_chansrv_audio_out_socket_10
D: [xrdp-sink] module-xrdp-sink.c: Connected failed
based on the log it should be: /run/xrdp/sockdir/xrdp_chansrv_audio_out_socket_10
do ls -l
on it to see permissions. However it is more likely that the defunct xrdp-chansrv process is the cause for failed socket connection.