Remote login via xrdp breaks sound settings

I have an optical SPDIF cable connected to a stereo DAC. The device was configured right from installation and fully working. It was visible as `Digital Stereo´ in sound settings.

When connecting via Remote Desktop, the digital stereo device is not visible, only a `Dummy Output´ device. Worse, even after closing the RDP connection and logging in via the attached keyboard, the sound device is still set to the Dummy output device and the digital stereo device is gone.

After reboot, the digital stereo device re-appeared. Out of curiosity, I tried the RDP connection again, unfortunately with the same result: Only the `Dummy Output´ device being available.

  1. How do I restore the Digital stereo device (without reboot)?
  2. How do I get YaST sound configuration panel? When I search for “sound” in YaST, it returns nothing.
  3. How do I configure the RDP connection and/or xrdp such that the digital stereo device is available and being used when logging in remotely? I already made the corresponding setting in mstc.exe on the Windows side.

Thanks.

  1. Try restarting PipeWire when needed…
systemctl --user restart pipewire
  1. There should be no need to touch YaST Sound at all. (It’s largely deprecated anyway).

  2. Not sure. Are you logging in as the same user? Maybe try adding another account for remote access. Hopefully, others can advise further here. Uncharted territory for me.

I’m using the default audio configuration, i.e. didn’t change anything. And it seems that Pipewire is not even enabled:

$ inxi -Aa
Audio:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio
    vendor: ASRock driver: snd_hda_intel v: kernel bus-ID: 00:03.0
    chip-ID: 8086:0c0c class-ID: 0403
  Device-2: Intel 9 Series Family HD Audio vendor: ASRock
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8ca0
    class-ID: 0403
  API: ALSA v: k6.5.6-1-default status: kernel-api with: 1: aoss
    type: oss-emulator 2: apulse type: pulse-emulator
    tools: alsactl,alsamixer,amixer
  Server-1: PipeWire v: 0.3.82 status: off with: 1: wireplumber status: off
    2: pw-jack type: plugin tools: pw-cat,pw-cli,wpctl
  Server-2: PulseAudio v: 16.1 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl,pavucontrol

Active Systemd units:

$ systemctl list-units | egrep -i 'wire|pulse|sound'
  sys-devices-pci0000:00-0000:00:03.0-sound-card0-controlC0.device                         loaded active plugged   /sys/devices/pci0000:00/0000:00:03.0/sound/card0/controlC0
  sys-devices-pci0000:00-0000:00:1b.0-sound-card1-controlC1.device                         loaded active plugged   /sys/devices/pci0000:00/0000:00:1b.0/sound/card1/controlC1
  sys-devices-pci0000:00-0000:00:1c.7-0000:03:00.0-net-wlp3s0.device                       loaded active plugged   RTL8821AE 802.11ac PCIe Wireless Network Adapter
  sys-subsystem-net-devices-wlp3s0.device                                                  loaded active plugged   RTL8821AE 802.11ac PCIe Wireless Network Adapter
  alsa-restore.service                                                                     loaded active exited    Save/Restore Sound Card State
  sound.target                                                                             loaded active active    Sound Card

Not even possible as it doesn’t exist–there’s no YaST Sound panel.

Yes, I’m logging in as the same user. This requires to be logged out on the phyical console as RDP will immediately drop the connection if you are already logged in. Unless you install vino which enables joining an active desktop.

OK, I was able to resolve this by installing an additional package:

$ opi xrdp
Searching repos for: xrdp
 1. xrdp
 2. xorgxrdp
 3. xrdp-devel
 4. xrdp-debuginfo
 5. xorgxrdp-glamor
 6. xrdp-debugsource
 7. xorgxrdp-debuginfo
 8. xorgxrdp-debugsource
 9. pipewire-module-xrdp
10. pulseaudio-module-xrdp
11. pipewire-module-xrdp-debuginfo
12. pipewire-module-xrdp-debugsource
13. pulseaudio-module-xrdp-debuginfo
14. pulseaudio-module-xrdp-debugsource
Pick a number (0 to quit): 10
You have selected package name: pulseaudio-module-xrdp
1. home:Psheng !                             | 0.7                       | x86_64
2. home:sbradnick !                          | 0.6+git20220527.308b6f2   | x86_64
Pick a number (0 to quit): 1
...

Number 10 looked like the right thing and indeed solved the issue. It installs the needed sink and source modules:

$ rpm -ql pulseaudio-module-xrdp
/etc/xdg/autostart/pulseaudio-xrdp.desktop
/usr/lib64/pulseaudio
/usr/lib64/pulseaudio/modules
/usr/lib64/pulseaudio/modules/module-xrdp-sink.so
/usr/lib64/pulseaudio/modules/module-xrdp-source.so
/usr/libexec/pulseaudio-module-xrdp
/usr/libexec/pulseaudio-module-xrdp/load_pa_modules.sh
/usr/share/doc/packages/pulseaudio-module-xrdp
/usr/share/doc/packages/pulseaudio-module-xrdp/README.md
/usr/share/licenses/pulseaudio-module-xrdp
/usr/share/licenses/pulseaudio-module-xrdp/LICENSE

The default situation Is to be using PipeWire. The command you used should have included the --user flag (and run as user)

~> systemctl --user list-units | egrep -i 'wire|pulse|sound'

FWIW, there is a compatibility package (pipewire-pulseaudio) that can be used with PipeWire to facilitate other PulseAudio clients.

"Gnome and KDE DEs are using it by default now. "

Source: https://en.opensuse.org/openSUSE:Pipewire#Usage

I’m using Cinnamon DE which uses PulseAudio by default.

Ok, thanks for clarifying the desktop environment you are using. Good to read that you found the missing package to provide audio output redirection for xrdp.

FWIW, I note that PipeWire is gaining the same support:

Official release:
https://software.opensuse.org/package/pipewire-module-xrdp

pipewire-module-xrdp

Enable xrdp to generate sound with pipewire

This module allows xrdp to generate sound on a pipewire-based system.