pulseaudio-module-xrdp icon indicating copy to clipboard operation
pulseaudio-module-xrdp copied to clipboard

Local sound cards are not detected (II)

Open pjotrek-b opened this issue 1 year ago • 3 comments

xrdp version

0.9.12

Detailed xrdp version, build options

xrdp 0.9.12
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2018 Jay Sorg, Neutrino Labs, and all contributors.
  See https://github.com/neutrinolabs/xrdp for more information.

  Configure options:
      --enable-ipv6
      --enable-jpeg
      --enable-fuse
      --enable-rfxcodec
      --enable-opus
      --enable-painter
      --enable-vsock
      --build=x86_64-linux-gnu
      --prefix=/usr
      --includedir=${prefix}/include
      --mandir=${prefix}/share/man
      --infodir=${prefix}/share/info
      --sysconfdir=/etc
      --localstatedir=/var
      --disable-silent-rules
      --libdir=${prefix}/lib/x86_64-linux-gnu
      --libexecdir=${prefix}/lib/x86_64-linux-gnu
      --disable-maintainer-mode
      --disable-dependency-tracking
      --with-socketdir=/run/xrdp/sockdir
      build_alias=x86_64-linux-gnu
      CFLAGS=-g -O2 -fdebug-prefix-map=/build/xrdp-Ze414c/xrdp-0.9.12=. -fstack-protector-strong -Wformat -Werror=format-security 
      LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed
      CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 
      PKG_CONFIG_PATH=/build/xrdp-Ze414c/xrdp-0.9.12/pkgconfig

  Compiled with OpenSSL 1.1.1f  31 Mar 2020

Operating system & version

Xubuntu 20.04.6 (64bit)

Installation method

dnf / apt / zypper / pkg / etc

Which backend do you use?

I do not know.

What desktop environment do you use?

XFCE4

Environment xrdp running on

physical machine

What's your client?

Microsoft's official client (Win10)

Area(s) with issue?

No response

Steps to reproduce

  • Login over XRDP.
  • Open PulseAudio volume control: $ pavucontrol
  • Only xrdp source/sink show up as input/output devices.

✔️ Expected Behavior

I'd like to simply have the "other soundcards" of that system (not just xrdp-sink/source) as output option in PulseAudio.

❌ Actual Behavior

Only xrdp sink/source shows up as option in PulseAudio.

"aplay -l" shows no soundcards (when logged in over xrdp). Adding my current user to the "audio" group allows "aplay -l" to list the soundcards - but I still don't get them in PA.

Anything else?

I assume this is related to neutrinolabs/xrdp#1414? The last post (from 2021-11) in neutrinolabs/xrdp#1414 mentions that the soundcards should show up (since v0.6 of the xrdp PA module).

How can I make that happen? :grin:

I've also tried manually adding the physical soundcards: load-module module-alsa-sink device=hw:0,0 sink_name=alsa_sink

This works well when logged in directly - but when doing so over XRDP, I get no error message (and $? = 0) - but the sink simply won't show up. :sob:

I'm grateful for any suggestions/help.

pjotrek-b avatar Jul 02 '24 14:07 pjotrek-b

xrdp was installed recently (last week), using Griffon's install script (v1.5.1): https://c-nergy.be/blog/?p=13420

pjotrek-b avatar Jul 02 '24 14:07 pjotrek-b

This isn't anything we'll ever support out-of-the-box.

A typical scenario would be to have a local (console) user and one-or-more RDP users. In that scenario, who would own the local soundcard?

If you've only got one user on the system logged in over RDP, and no other users, it might be possible to get something working. Assuming that's acceptable, try this:-

  1. Make sure the local console is logged out
  2. Log in over xrdp
  3. Check that only one instance of the pulseaudio server is running on the system
  4. Set up some logging:-
    pacmd set-log-target file:$HOME/pa.log
    pacmd set-log-level 4
    
  5. Try loading your module again.

matt335672 avatar Jul 03 '24 09:07 matt335672

Not to be supported out of the box, due to unclear ownership of the local soundcard: totally get it.

Will try your suggestion with enhanced PA logging. Thank you very much for your help!

pjotrek-b avatar Jul 03 '24 17:07 pjotrek-b