Pass USB audio card through to unprivileged LXC Container

Jedis

New Member
Apr 25, 2023
26
1
3
Hello,

Some backstory. I am running Proxmox on a 12th gen NUC. I have a Rocky Linux 9.1 LXC unprivileged container running successfully, complete with xrdp remote desktop. The only thing not working is sound. I am replicating a physical NUC deployment of this environment into a container so that the NUC can be repurposed for other things.

Admittedly, this was a bear to get audio working on the physical NUC when I did it 6 months ago. Much fighting with pulseaudio and alsa. Somehow, I got it working, but I had tried so many things, I lost track. Even looking at my .bash_history, I was able to reconstruct some things, but not all.

Getting the USB audio card working on the Proxmox Debian host was fairly straightforward. I installed alsa and then had to tell it to set the USB card in slot 0 so that it would be used over the default onboard audio. Once that was done, I can play sound via the CLI on the Proxmox host.

Now, this leads me to try to get it working in the LXC container. I have installed xrdp and have Gnome running, giving me a working Windows Remote Desktop connection session (mirroring the other physical NUC that I am using). The LXC container running Rocky Linux 9,1 reports that there are no audio cards, yet I can see it using the same commands as from the host. Here is what I've ran on the host to get it working, as well as the results of running the same commands on the LXC Container.

I would appreciate any help to get over this last hurdle and get sound working. Thanks so much!

Host
Bash:
root@proxmox:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: G1 [Sound BlasterX G1], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: Generic Analog [Generic Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

root@proxmox:~# ls -la /dev/snd/by-id/
total 0
drwxr-xr-x 2 root root  60 Apr 25 17:11 .
drwxr-xr-x 4 root root 520 Apr 25 17:11 ..
lrwxrwxrwx 1 root root  12 Apr 25 17:11 usb-Creative_Technology_Ltd_Sound_BlasterX_G1_00139408-00 -> ../controlC0

root@proxmox:~# ls -la /dev/snd
total 0
drwxr-xr-x  4 root root      520 Apr 25 17:11 .
drwxr-xr-x 21 root root     4820 Apr 25 17:11 ..
drwxr-xr-x  2 root root       60 Apr 25 17:11 by-id
drwxr-xr-x  2 root root       80 Apr 25 17:11 by-path
crw-rw----  1 root audio 116,  4 Apr 25 17:11 controlC0
crw-rw----  1 root audio 116, 21 Apr 25 17:11 controlC1

root@proxmox:~# cat /proc/asound/cards
 0 [G1             ]: USB-Audio - Sound BlasterX G1
                      Creative Technology Ltd Sound BlasterX G1 at usb-0000:00:14.0-8, full speed
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0x603d1a0000 irq 175

root@proxmox:~# cat /etc/modprobe.d/alsa.conf
options snd-usb-audio index=0
options snd-hda-intel index=1

root@proxmox:~# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 041e:3249 Creative Technology, Ltd Sound BlasterX G1
Bus 003 Device 002: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 003 Device 004: ID 8087:0026 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@proxmox:~# ls -al /dev/bus/usb/003/003
crw-rw-r-- 1 root root 189, 258 Apr 25 17:11 /dev/bus/usb/003/003

root@proxmox:~# cat /etc/pve/lxc/101.conf
#lxc.mount.entry: /dev/bus/usb/003 dev/bus/usb/003 none bind,optional,create=dir
#lxc.cgroup2.devices.allow: c 189:* rwm
#lxc.mount.entry: /dev/bus/usb/003/003 dev/bus/usb/003/003 none bind,optional,create=file
arch: amd64
cores: 4
features: nesting=1
hostname: container
memory: 4096
nameserver: 10.0.0.8
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=D6:0C:E7:36:4F:2F,ip=dhcp,type=veth
ostype: centos
rootfs: local-lvm:vm-101-disk-0,size=15G
swap: 4096
unprivileged: 1
lxc.cgroup2.devices.allow: c 116:* rwm
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/snd dev/snd none bind,create=dir 0 0
lxc.mount.entry: /dev/bus/usb/003/003 dev/bus/usb/003/003 none bind,create=file 0 0

root@proxmox:~# aplay /usr/share/sounds/alsa/Front_Left.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

> Audio plays through USB sound card/speakers

LXC Container

Bash:
userland@container:~# arecord -l
arecord: device_list:275: no soundcards found...

userland@container:~# ls -la /dev/snd/by-id/
total 0
drwxr-xr-x 2 nobody nobody  60 Apr 25 17:11 .
drwxr-xr-x 4 nobody nobody 520 Apr 25 17:11 ..
lrwxrwxrwx 1 nobody nobody  12 Apr 25 17:11 usb-Creative_Technology_Ltd_Sound_BlasterX_G1_00139408-00 -> ../controlC0

userland@container:~# ls -la /dev/snd
total 0
drwxr-xr-x 4 nobody nobody     520 Apr 25 17:11 .
drwxr-xr-x 8 root   root       520 Apr 25 21:27 ..
drwxr-xr-x 2 nobody nobody      60 Apr 25 17:11 by-id
drwxr-xr-x 2 nobody nobody      80 Apr 25 17:11 by-path
crw-rw---- 1 nobody nobody 116,  4 Apr 25 17:11 controlC0
crw-rw---- 1 nobody nobody 116, 21 Apr 25 17:11 controlC1

userland@container:~# cat /proc/asound/cards
 0 G1             ]: USB-Audio - Sound BlasterX G1
                      Creative Technology Ltd Sound BlasterX G1 at usb-0000:00:14.0-8, full speed
 1 PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0x603d1a0000 irq 175

userland@container:~# cat /etc/modprobe.d/alsa.conf
cat: /etc/modprobe.d/alsa.conf: No such file or directory

userland@container:~# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 041e:3249 Creative Technology, Ltd Sound BlasterX G1
Bus 003 Device 002: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 003 Device 004: ID 8087:0026 Intel Corp. AX201 Bluetooth
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

userland@container:~# ls -al /dev/bus/usb/003/003
crw-rw-r-- 1 nobody nobody 189, 258 Apr 25 17:11 /dev/bus/usb/003/003

userland@container:~# aplay /usr/share/sounds/gnome/default/alerts/drip.ogg
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

aplay: main:867: audio open error: Connection refused

> No sound plays
 
Last edited:
Try mapping the host audio group to the container audio group, and make sure the container user is in that group. I needed to do that for a USB TV tuner with the video group.
EDIT: Here is the first example of a container user/group mapping that I could find on the forum.
 
Last edited:
  • Like
Reactions: Tmanok
Try mapping the host audio group to the container audio group, and make sure the container user is in that group. I needed to do that for a USB TV tuner with the video group.
EDIT: Here is the first example of a container user/group mapping that I could find on the forum.
Thanks! Did some reading on that thread, and a few blog articles. It seems like folks attempting to explain how the mapping works go out of their way to make this more complicated than it needs to be, which has left me confused. I've yet to see anything for the subuid, subgid, and container conf files that plainly spell it out like "<host group name>:<starting container group id>:<number of groups to map>" and "lxc.idmap: <u or g> <host group id> <container group id> <number of groups to map>"

What am I overlooking or have I missed? Note that the only addition I made to the host's files is in /etc/subgid and in the LXC container's config file.

Host:
Bash:
root@proxmox:~# getent group audio | awk -F: '{printf "Group %s with GID=%d\n", $1, $3}'
Group audio with GID=29

Container:
Bash:
[root@container~]# getent group audio | awk -F: '{printf "Group %s with GID=%d\n", $1, $3}'
Group audio with GID=63

Host:
Bash:
root@proxmox:~# cat /etc/subuid
root:100000:65536
jedis:165536:65536

root@proxmox:~# cat /etc/subgid
root:100000:65536
jedis:165536:65536
audio:63:1

root@proxmox:~# cat /etc/pve/lxc/101.conf
arch: amd64
cores: 4
features: nesting=1
hostname: rocky
memory: 4096
nameserver: 10.0.0.8
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=D6:0C:E7:36:4F:2F,ip=dhcp,type=veth
ostype: centos
rootfs: local-lvm:vm-101-disk-0,size=15G
swap: 4096
unprivileged: 1
lxc.cgroup2.devices.allow: c 116:* rwm
lxc.mount.entry: /dev/snd dev/snd none bind,create=dir 0 0
lxc.mount.entry: /dev/bus/usb/003/003 dev/bus/usb/003/003 none bind,optional,create=file 0 0
lxc.idmap: g 29 63 1

Container start error:
Bash:
()
lxc_map_ids: 3701 newgidmap failed to write mapping "newgidmap: gid range [29-30) -> [63-64) not allowed": newgidmap 4935 29 63 1
lxc_spawn: 1788 Failed to set up id mapping.
__lxc_start: 2107 Failed to spawn container "101"
TASK ERROR: startup for container '101' failed
 
Last edited:
Thanks! Did some reading on that thread, and a few blog articles. It seems like folks attempting to explain how the mapping works go out of their way to make this more complicated than it needs to be, which has left me confused. I've yet to see anything for the subuid, subgid, and container conf files that plainly spell it out like "<host group name>:<starting container group id>:<number of groups to map>" and "lxc.idmap: <u or g> <host group id> <container group id> <number of groups to map>"

What am I overlooking or have I missed? Note that the only addition I made to the host's files is in /etc/subgid and in the LXC container's config file.

Host:
audio gid is 29.

Container:
audio gid is 63.

Host:
Bash:
root@zerovector:~# cat /etc/subuid
root:100000:65536
jedis:165536:65536

root@zerovector:~# cat /etc/subgid
root:100000:65536
jedis:165536:65536
audio:63:1
I think you need to change audio:63:1 to root:29:1 (or maybe root:63:1, I'm not sure, let me know).
Bash:
root@zerovector:~# cat /etc/pve/lxc/101.conf
arch: amd64
cores: 4
features: nesting=1
hostname: rocky
memory: 4096
nameserver: 10.0.0.8
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=D6:0C:E7:36:4F:2F,ip=dhcp,type=veth
ostype: centos
rootfs: local-lvm:vm-101-disk-0,size=15G
swap: 4096
unprivileged: 1
lxc.cgroup2.devices.allow: c 116:* rwm
lxc.mount.entry: /dev/snd dev/snd none bind,create=dir 0 0
lxc.mount.entry: /dev/bus/usb/003/003 dev/bus/usb/003/003 none bind,optional,create=file 0 0
lxc.idmap: g 29 63 1
You have to provide the mappings for all 65536 groups. Maybe something like:
lxc.idmap g 0 100000 63 lxc.idmap g 63 29 1 lxc.idmap g 64 100064 65472
 
Code:
lxc.idmap: g 0 100000 63
lxc.idmap: g 63 29 1
lxc.idmap: g 64 100064 65472

Code:
root:29:1

Code:
()
lxc_drop_groups: 1365 Operation not permitted - Failed to drop supplimentary groups
chown_cgroup_wrapper: 1652 Invalid argument - Failed to setresgid(0, 0, 0)
cgfsng_chown: 1721 No such file or directory - Error requesting cgroup chown in new user namespace
__lxc_start: 2107 Failed to spawn container "101"
TASK ERROR: startup for container '101' failed

And when I try 63 in subgid:

Code:
root:63:1

Code:
()
lxc_map_ids: 3701 newgidmap failed to write mapping "newgidmap: gid range [63-64) -> [29-30) not allowed": newgidmap 10967 0 100000 63 63 29 1 64 100064 65472
lxc_spawn: 1788 Failed to set up id mapping.
__lxc_start: 2107 Failed to spawn container "101"
TASK ERROR: startup for container '101' failed
 
At least we know it needs to be root:29:1.
Code:
lxc.idmap: g 0 100000 63
lxc.idmap: g 63 29 1
lxc.idmap: g 64 100064 65472

Code:
root:29:1

Code:
()
lxc_drop_groups: 1365 Operation not permitted - Failed to drop supplimentary groups
chown_cgroup_wrapper: 1652 Invalid argument - Failed to setresgid(0, 0, 0)
cgfsng_chown: 1721 No such file or directory - Error requesting cgroup chown in new user namespace
__lxc_start: 2107 Failed to spawn container "101"
TASK ERROR: startup for container '101' failed
Maybe also add the user mapping? lxc.idmap u 0 100000 65536?
Maybe remove lxc.mount.entry: /dev/bus/usb/003/003 dev/bus/usb/003/003 none bind,optional,create=file 0 0 because those numbers will change all the time (and I think you don't need it)?
 
The container starts now, and I see the sound card, but the user owner doesn't quite look right. It still shows as nobody:audio in the container. Some of the paths are still nobody:nobody too, which seems odd?

Bash:
[userland@container ~]$ aplay /usr/share/sounds/gnome/default/alerts/drip.ogg
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

aplay: main:867: audio open error: Connection refused

Bash:
[userland@container ~]$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: G1 [Sound BlasterX G1], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: Generic Analog [Generic Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Bash:
[userland@container ~]$ ls -lsa /dev/snd
total 0
0 drwxr-xr-x 4 nobody nobody     520 Apr 26 09:13 .
0 drwxr-xr-x 7 root   root       500 Apr 26 10:58 ..
0 drwxr-xr-x 2 nobody nobody      60 Apr 26 09:13 by-id
0 drwxr-xr-x 2 nobody nobody      80 Apr 26 09:13 by-path
0 crw-rw---- 1 nobody audio  116,  4 Apr 26 09:13 controlC0
0 crw-rw---- 1 nobody audio  116, 21 Apr 26 09:13 controlC1

I am not sure if the pulseaudio error is related to the permissions or not. I tried removing pulseaudio to just use alsa, but it wants to basically destroy the GNOME environment to do so.
 
Last edited:
Is the user in your container a member of the audio group? Otherwise, it won't be able to access them.
Yep!

Bash:
[userland@container ~]$ id userland
uid=1000(userland) gid=1000(userland) groups=1000(userland),10(wheel),63(audio),999(input)
 
Yep!

Bash:
[userland@container ~]$ id userland
uid=1000(userland) gid=1000(userland) groups=1000(userland),10(wheel),63(audio),999(input)
Then I'm at a loss. I have no experience with audio devices (or Linux sound system), only TV tuners. You could try (temporarily) changing the owner of the devices on the host to see if it is a permission problem. Maybe there are more device nodes that have the audio group on the host that need to be passed to the container?
 
There seems like there's more permission issues. It's not mapping root to root in the container and showing nobody:

Host:
Bash:
root@proxmox:~# ls -lsa /dev/snd
total 0
0 drwxr-xr-x  4 root root      520 Apr 26 09:13 .
0 drwxr-xr-x 21 root root     4820 Apr 26 09:13 ..
0 drwxr-xr-x  2 root root       60 Apr 26 09:13 by-id
0 drwxr-xr-x  2 root root       80 Apr 26 09:13 by-path
0 crw-rw----  1 root audio 116,  4 Apr 26 09:13 controlC0 <-----
0 crw-rw----  1 root audio 116, 21 Apr 26 09:13 controlC1 <-----

Container:
Bash:
userland@container ~$ ls -lsa /dev/snd
total 0
0 drwxr-xr-x 4 nobody nobody     520 Apr 26 09:13 .
0 drwxr-xr-x 7 root   root       500 Apr 26 10:58 ..
0 drwxr-xr-x 2 nobody nobody      60 Apr 26 09:13 by-id
0 drwxr-xr-x 2 nobody nobody      80 Apr 26 09:13 by-path
0 crw-rw---- 1 nobody audio  116,  4 Apr 26 09:13 controlC0 <-----
0 crw-rw---- 1 nobody audio  116, 21 Apr 26 09:13 controlC1 <-----
 
There seems like there's more permission issues. It's not mapping root to root in the container and showing nobody:
That's normal for unprivileged containers. User 0 (root) inside the container is user 100000 on the host. User 0 (root) on the host is not mapped in the container (which is essential for security) and unmapped users are mapped to nobody. This is usually not a problem because the group has the necessary permissions (if mapped correctly).
 
Are the kernel modules supposed to be accessible in the container? When I try to run modprobe snd_usb_audio, it says it can't find the kernel modules. The path it's looking in doesn't exist in the container, but exists on the host.
 
Are the kernel modules supposed to be accessible in the container? When I try to run modprobe snd_usb_audio, it says it can't find the kernel modules. The path it's looking in doesn't exist in the container, but exists on the host.
No, containers share the kernel with the host. Load all necessary modules on the host with modprobe. I would expect the host kernel to do all this when you plugin the USB device before starting the container. Hot plug (and unplug) will work with VMs but not so much with containers.
 
Someone got it working by changing file owners on the host instead of mapping them. Someone else got it working with a privileged container, which shares the root user (sounds unsafe).
Tried both of those with no luck, unfortunately. It doesn't appear to be a permission issue. I am starting to wonder if just mapping /dev/snd is enough. It doesn't show up as a valid sink or as an audio device, other than in aplay. If I look at alsamixer, the default card isn't there, but it shows pulseaudio. If I choose the sound card and select Sound Blaster, I can change the volume, but that's all you can really do with it.
 
Hi, I don't know too much about the inner workings of sound on Linux, but what I find strange is that /dev/snd on your host only contains controlC{0,1}:

Bash:
root@proxmox:~# ls -la /dev/snd
total 0
drwxr-xr-x  4 root root      520 Apr 25 17:11 .
drwxr-xr-x 21 root root     4820 Apr 25 17:11 ..
drwxr-xr-x  2 root root       60 Apr 25 17:11 by-id
drwxr-xr-x  2 root root       80 Apr 25 17:11 by-path
crw-rw----  1 root audio 116,  4 Apr 25 17:11 controlC0
crw-rw----  1 root audio 116, 21 Apr 25 17:11 controlC1
Compare this, for example, with the two links posted by @leesteken: In both threads, the posted listings show additional devices like pcmC1D0p. I'm not sure what that means exactly, but I'd also guess that mapping /dev/snd into the container is not enough.

I suppose audio is handled by PulseAudio on the host (you can check by running aplay with -v). Apparently, it is also possible to let containers connect to the PulseAudio daemon on the host via TCP [1], maybe this could be an option?

[1] https://xahteiwi.eu/resources/hints-and-kinks/lxc-sound/
 
Last edited:
  • Like
Reactions: leesteken
Hi, I don't know too much about the inner workings of sound on Linux, but what I find strange is that /dev/snd on your host only contains controlC{0,1}:


Compare this, for example, with the two links posted by @leesteken: In both threads, the posted listings show additional devices like pcmC1D0p. I'm not sure what that means exactly, but I'd also guess that mapping /dev/snd into the container is not enough.

I suppose audio is handled by PulseAudio on the host (you can check by running aplay with -v). Apparently, it is also possible to let containers connect to the PulseAudio daemon on the host via TCP [1], maybe this could be an option?

[1] https://xahteiwi.eu/resources/hints-and-kinks/lxc-sound/
Hi @fweber,

There is more there, I chopped the output of it to save space in the forum post.

Host
Bash:
root@proxmox:~# ls -la /dev/snd
total 0
drwxr-xr-x  4 root root      520 Apr 28 09:42 .
drwxr-xr-x 20 root root     4800 Apr 28 09:42 ..
drwxr-xr-x  2 root root       60 Apr 28 09:42 by-id
drwxr-xr-x  2 root root       80 Apr 28 09:42 by-path
crw-rw----  1 root audio 116,  4 Apr 28 09:42 controlC0
crw-rw----  1 root audio 116, 21 Apr 28 09:42 controlC1
crw-rw----  1 root audio 116, 19 Apr 28 09:42 hwC1D0
crw-rw----  1 root audio 116, 20 Apr 28 09:42 hwC1D2
crw-rw----  1 root audio 116,  3 Apr 28 09:42 pcmC0D0c
crw-rw----  1 root audio 116,  2 Apr 28 09:42 pcmC0D0p
crw-rw----  1 root audio 116,  6 Apr 28 09:42 pcmC1D0c
crw-rw----  1 root audio 116,  5 Apr 28 09:42 pcmC1D0p
crw-rw----  1 root audio 116, 11 Apr 28 09:42 pcmC1D10p
crw-rw----  1 root audio 116, 12 Apr 28 09:42 pcmC1D11p
crw-rw----  1 root audio 116, 13 Apr 28 09:42 pcmC1D12p
crw-rw----  1 root audio 116, 14 Apr 28 09:42 pcmC1D13p
crw-rw----  1 root audio 116, 15 Apr 28 09:42 pcmC1D14p
crw-rw----  1 root audio 116, 16 Apr 28 09:42 pcmC1D15p
crw-rw----  1 root audio 116, 17 Apr 28 09:42 pcmC1D16p
crw-rw----  1 root audio 116, 18 Apr 28 09:42 pcmC1D17p
crw-rw----  1 root audio 116,  7 Apr 28 09:42 pcmC1D3p
crw-rw----  1 root audio 116,  8 Apr 28 09:42 pcmC1D7p
crw-rw----  1 root audio 116,  9 Apr 28 09:42 pcmC1D8p
crw-rw----  1 root audio 116, 10 Apr 28 09:42 pcmC1D9p
crw-rw----  1 root audio 116,  1 Apr 28 09:42 seq
crw-rw----  1 root audio 116, 33 Apr 28 09:42 timer

Container
Bash:
container@userland~ # ls -lsa /dev/snd
total 0
0 drwxr-xr-x 4 nobody nobody     520 Apr 28 09:42 .
0 drwxr-xr-x 7 root   root       500 Apr 28 09:42 ..
0 drwxr-xr-x 2 nobody nobody      60 Apr 28 09:42 by-id
0 drwxr-xr-x 2 nobody nobody      80 Apr 28 09:42 by-path
0 crw-rw---- 1 nobody audio  116,  4 Apr 28 09:42 controlC0
0 crw-rw---- 1 nobody audio  116, 21 Apr 28 09:42 controlC1
0 crw-rw---- 1 nobody audio  116, 19 Apr 28 09:42 hwC1D0
0 crw-rw---- 1 nobody audio  116, 20 Apr 28 09:42 hwC1D2
0 crw-rw---- 1 nobody audio  116,  3 Apr 28 09:42 pcmC0D0c
0 crw-rw---- 1 nobody audio  116,  2 Apr 28 09:42 pcmC0D0p
0 crw-rw---- 1 nobody audio  116,  6 Apr 28 09:42 pcmC1D0c
0 crw-rw---- 1 nobody audio  116,  5 Apr 28 09:42 pcmC1D0p
0 crw-rw---- 1 nobody audio  116, 11 Apr 28 09:42 pcmC1D10p
0 crw-rw---- 1 nobody audio  116, 12 Apr 28 09:42 pcmC1D11p
0 crw-rw---- 1 nobody audio  116, 13 Apr 28 09:42 pcmC1D12p
0 crw-rw---- 1 nobody audio  116, 14 Apr 28 09:42 pcmC1D13p
0 crw-rw---- 1 nobody audio  116, 15 Apr 28 09:42 pcmC1D14p
0 crw-rw---- 1 nobody audio  116, 16 Apr 28 09:42 pcmC1D15p
0 crw-rw---- 1 nobody audio  116, 17 Apr 28 09:42 pcmC1D16p
0 crw-rw---- 1 nobody audio  116, 18 Apr 28 09:42 pcmC1D17p
0 crw-rw---- 1 nobody audio  116,  7 Apr 28 09:42 pcmC1D3p
0 crw-rw---- 1 nobody audio  116,  8 Apr 28 09:42 pcmC1D7p
0 crw-rw---- 1 nobody audio  116,  9 Apr 28 09:42 pcmC1D8p
0 crw-rw---- 1 nobody audio  116, 10 Apr 28 09:42 pcmC1D9p
0 crw-rw---- 1 nobody audio  116,  1 Apr 28 09:42 seq
0 crw-rw---- 1 nobody audio  116, 33 Apr 28 09:42 timer

Sound on Host that works
Bash:
root@proxmox:~# aplay /usr/share/sounds/alsa/Front_Left.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
root@proxmox:~# aplay -v
<Does not return with anything>

Sound on Container that does not work
Bash:
userland@container~ # aplay /usr/share/sounds/gnome/default/alerts/drip.ogg
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
aplay: main:867: audio open error: Connection refused
[userland@container~]# aplay -v
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
aplay: main:867: audio open error: Connection refused
 
Hi,
There is more there, I chopped the output of it to save space in the forum post.
Ah, alright, that explains it. Thanks for clarifying.
Sound on Host that works
Bash:
root@proxmox:~# aplay /usr/share/sounds/alsa/Front_Left.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
root@proxmox:~# aplay -v
<Does not return with anything>
Sorry, I should have made this more clear: You could run
Code:
aplay -v /usr/share/sounds/alsa/Front_Left.wav
on the host to find out which plugin it is using to play sounds.