LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-28-2013, 01:23 PM   #1
toolz
LQ Newbie
 
Registered: Jan 2013
Posts: 2

Rep: Reputation: Disabled
weird alsa problems losing permissions when I plug/unplug usb headset


I have a /etc/udev/rules.d/00-local.rules

Code:
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'"
When headset is plugged in I can correctly type $: alsamixer and it brings up the volume adjustments etc.

but when I unplug the headset and type it, I get
Code:
 cannot open mixer: No such file or directory
here are my permissions
Code:
 -rw-r--r--  1 toolz users         40 Jan 25 08:29 .asoundrc
here are my groups

Code:
 audio:x:92:toolz
also, when I unplug my headset and run alsamixer with root permission it works

/dev/snd permissions

Code:
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

Last edited by toolz; 01-28-2013 at 04:25 PM. Reason: solved
 
Old 01-28-2013, 04:25 PM   #2
toolz
LQ Newbie
 
Registered: Jan 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
I copy/pasted that udev rule last night and didn't notice it was changing /etc/asound.com and I have my /home/toolz/.asoundrc over writing (I guess? I'm not 100% on linux yet)

On top of that when I manually set default card to 0 my speakers were slightly unplugged because of my cat...ugh talk about a headache to fix this.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How simulate unplug an re-plug of USB devices? scmbg Linux - Hardware 5 07-02-2010 10:20 AM
Detect USB and Printer Plug / Unplug C/C++ source haseit Linux - Newbie 1 01-19-2009 06:59 PM
USB plug & unplug JrLz Slackware 6 12-09-2004 08:07 AM
USB mouse works only if i unplug then re-plug it allelopath Linux - Hardware 3 11-20-2004 12:48 PM
usb wlan works but only after i unplug and plug triagladad Linux - Wireless Networking 0 09-21-2004 06:45 AM


All times are GMT -5. The time now is 09:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration