Saya memiliki /etc/udev/rules.d/00-local.rules
KERNEL=="pcmC[D0-9cp]*", ACTION=="add", PROGRAM="/bin/sh -c 'K=%k; K=$${K#pcmC}; K=$${K%%D*}; echo defaults.ctl.card $$K > /etc/asound.conf; echo defaults.pcm.card $$K >>/etc/asound.conf'"
KERNEL=="pcmC[D0-9cp]*", ACTION=="remove", PROGRAM="/bin/sh -c 'echo defaults.ctl.card 0 > /etc/asound.conf; echo defaults.pcm.card 0 >>/etc/asound.conf'"
Ketika headset terpasang, saya dapat mengetik dengan benar $: alsamixer dan menampilkan penyesuaian volume, dll.
tetapi ketika saya mencabut headset dan mengetiknya, saya mengerti
cannot open mixer: No such file or directory
ini izin saya
-rw-r--r-- 1 toolz users 40 Jan 25 08:29 .asoundrc
ini grup saya
audio:x:92:toolz
juga, ketika saya mencabut headset saya dan menjalankan alsamixer dengan izin root berfungsi
drwxr-xr-x 4 root root 620 Jan 27 20:32 .
drwxr-xr-x 18 root root 3080 Jan 27 20:32 ..
drwxr-xr-x 2 root root 60 Jan 27 20:32 by-id
drwxr-xr-x 2 root root 120 Jan 27 20:32 by-path
crw-rw----+ 1 root audio 116, 13 Jan 27 14:57 controlC0
crw-rw----+ 1 root audio 116, 20 Jan 27 14:57 controlC1
crw-rw----+ 1 root audio 116, 23 Jan 27 14:57 controlC2
crw-rw----+ 1 root audio 116, 26 Jan 27 20:32 controlC3
crw-rw----+ 1 root audio 116, 2 Jan 27 14:57 hwC0D0
crw-rw----+ 1 root audio 116, 19 Jan 27 14:57 hwC1D0
crw-rw----+ 1 root audio 116, 22 Jan 27 14:57 hwC2D0
crw-rw----+ 1 root audio 116, 4 Jan 27 14:57 midiC0D0
crw-rw----+ 1 root audio 116, 3 Jan 27 14:57 midiC0D1
crw-rw----+ 1 root audio 116, 12 Jan 27 14:57 pcmC0D0c
crw-rw----+ 1 root audio 116, 11 Jan 27 20:04 pcmC0D0p
crw-rw----+ 1 root audio 116, 10 Jan 27 14:57 pcmC0D1c
crw-rw----+ 1 root audio 116, 9 Jan 27 14:57 pcmC0D2c
crw-rw----+ 1 root audio 116, 8 Jan 27 14:57 pcmC0D2p
crw-rw----+ 1 root audio 116, 7 Jan 27 14:57 pcmC0D3p
crw-rw----+ 1 root audio 116, 6 Jan 27 14:57 pcmC0D4c
crw-rw----+ 1 root audio 116, 5 Jan 27 14:57 pcmC0D4p
crw-rw----+ 1 root audio 116, 18 Jan 27 14:57 pcmC1D0c
crw-rw----+ 1 root audio 116, 17 Jan 27 14:57 pcmC1D0p
crw-rw----+ 1 root audio 116, 16 Jan 27 14:57 pcmC1D1c
crw-rw----+ 1 root audio 116, 15 Jan 27 14:57 pcmC1D1p
crw-rw----+ 1 root audio 116, 14 Jan 27 14:57 pcmC1D2c
crw-rw----+ 1 root audio 116, 21 Jan 27 14:57 pcmC2D3p
crw-rw----+ 1 root audio 116, 25 Jan 27 20:32 pcmC3D0c
crw-rw----+ 1 root audio 116, 24 Jan 27 20:34 pcmC3D0p
crw-rw---- 1 root audio 116, 1 Jan 27 14:57 seq
crw-rw----+ 1 root audio 116, 33 Jan 27 14:57 timer
edit: tambah / dev / snd izin
menambahkan / dev / snd izin untuk Anda
—
toolz
/dev/snd/
?