Problem with USB passthrough to LXC after ugrade to 8

AndrewSpec

Member
Dec 24, 2021
11
1
8
34
I have an mopidy LXC container with USB soundcard. All worked fine on v7. After upgrade do v8 it stopped working.

On my lxc.conf I have:
Code:
lxc.cgroup2.devices.allow: c 116:* rwm
lxc.mount.entry: /dev/snd dev/snd none bind,optional,create=dir

LXC container sees my soundcard:

Code:
root@Mopidy ~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
softvol
default
sysdefault:CARD=S51
    SB X-Fi Surround 5.1, USB Audio
    Default Audio Device
front:CARD=S51,DEV=0
    SB X-Fi Surround 5.1, USB Audio
    Front speakers
surround21:CARD=S51,DEV=0
    SB X-Fi Surround 5.1, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=S51,DEV=0
    SB X-Fi Surround 5.1, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=S51,DEV=0
    SB X-Fi Surround 5.1, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=S51,DEV=0
    SB X-Fi Surround 5.1, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=S51,DEV=0
    SB X-Fi Surround 5.1, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=S51,DEV=0
    SB X-Fi Surround 5.1, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=S51,DEV=0
    SB X-Fi Surround 5.1, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=S51,DEV=0
    SB X-Fi Surround 5.1, USB Audio
    Direct sample mixing device
dmix:CARD=S51,DEV=1
    SB X-Fi Surround 5.1, USB Audio #1
    Direct sample mixing device
dsnoop:CARD=S51,DEV=0
    SB X-Fi Surround 5.1, USB Audio
    Direct sample snooping device
dsnoop:CARD=S51,DEV=1
    SB X-Fi Surround 5.1, USB Audio #1
    Direct sample snooping device
hw:CARD=S51,DEV=0
    SB X-Fi Surround 5.1, USB Audio
    Direct hardware device without any conversions
hw:CARD=S51,DEV=1
    SB X-Fi Surround 5.1, USB Audio #1
    Direct hardware device without any conversions
plughw:CARD=S51,DEV=0
    SB X-Fi Surround 5.1, USB Audio
    Hardware device with all software conversions
plughw:CARD=S51,DEV=1
    SB X-Fi Surround 5.1, USB Audio #1
    Hardware device with all software conversions

But I have no sound and when I try to run the speakertest I have:
Code:
root@Mopidy ~# speaker-test

speaker-test 1.1.8

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib confmisc.c:767:(parse_card) cannot find card '1'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM dmix
Playback open error: -2,No such file or directory


And finally when I try to run alsamixer I have:

Code:
root@Mopidy ~# alsamixer
cannot open mixer: No such file or directory

I have no idea what is broken after latest update.
 
ok, I solved it. It was not the PVE update to v8 but my custom asound.conf file where I changed the default sound card number from 0 to 1 but after the upgrade the number changed and was not updated in asound.conf.
 
  • Like
Reactions: leesteken

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!