You are not logged in.

#1 2011-12-13 13:52:49

turion
Member
Registered: 2011-12-13
Posts: 10

jack (and jack2) can aquire soundcard only if started as root

I installed my Tascam USB122L according to this guide, which worked. I access the card via the usb_stream plugin.
To get rid of some strange error message "cannot set freq 44100 to ep 0x81", I did "rmmod ehci_hcd", as mentioned here.

I added myself to the audio group, so I should be allowed to do real time, as my /etc/security/limits.d/99-audio.conf reads:

@audio  - rtprio        99
@audio  - memlock       unlimited

So let's start jack2:

[turion@enigmage ~]$ jackd -RP50 -dalsa -dusb_stream:1
[... blablabla ...]
JACK server starting in realtime mode with priority 50
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL usb_stream:1
control open "usb_stream:1" (No such file or directory)
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL usb_stream:1
control open "usb_stream:1" (No such file or directory)
audio_reservation_init
Acquire audio card Audio-1
creating alsa driver ... usb_stream:1|usb_stream:1|1024|2|48000|0|0|nomon|swmeter|-|32bit
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL usb_stream:1
control open "usb_stream:1" (No such file or directory)
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM usb_stream:1
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM usb_stream:1
ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
Cannot initialize driver
JackServer::Open() failed with -1
Failed to open server

However, let's start it as root (and end it with Ctrl+c later):

[turion@enigmage ~]$ sudo jackd -RP50 -dalsa -dusb_stream:1
[... blablabla ...]
JACK server starting in realtime mode with priority 50
Failed to connect to session bus for device reservation /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.


Failed to acquire device name : Audio1 error : Invalid argument
Audio device usb_stream:1 cannot be acquired, trying to open it anyway...
creating alsa driver ... usb_stream:1|usb_stream:1|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 24bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 24bit little-endian
ALSA: use 2 periods for playback[/b]
^Cjack main caught signal 2
Audio card Audio1 not found!!

Despite of first returning a strange error

Failed to acquire device name : Audio1 error : Invalid argument
Audio device usb_stream:1 cannot be acquired, trying to open it anyway...

, it actually works! I tested it with audacity (started as root) and could indeed hear some sound.


With jack instead of jack2, nearly the same thing happens:

[turion@enigmage ~]$ jackd -RP50 -dalsa -dusb_stream:1
[... blablabla ...]
loading driver ..
creating alsa driver ... usb_stream:1|usb_stream:1|1024|2|48000|0|0|nomon|swmeter|-|32bit
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL usb_stream:1
control open "usb_stream:1" (No such file or directory)
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM usb_stream:1
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM usb_stream:1
ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
cannot load driver module alsa

And as root it works again:

[turion@enigmage ~]$ sudo jackd -RP50 -dalsa -dusb_stream:1
[... blablabla ...]
loading driver ..
creating alsa driver ... usb_stream:1|usb_stream:1|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 24bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 24bit little-endian
ALSA: use 2 periods for playback
^Cjack main caught signal 2

Again, I can hear sound this way, but I have to start the audio application as root.

I also tried with the -r option (no realtime), same results.

Any hints how I can get it to work as a regular user?

Last edited by turion (2011-12-13 13:55:33)

Offline

#2 2011-12-14 15:10:25

rezza
Member
From: Edinburgh, uk
Registered: 2004-07-08
Posts: 237

Re: jack (and jack2) can aquire soundcard only if started as root

Quick (maybe obvious) question:

Did you log out and back in after adding your user to the audio group? What does the groups command give you?

Offline

#3 2011-12-14 15:34:35

turion
Member
Registered: 2011-12-13
Posts: 10

Re: jack (and jack2) can aquire soundcard only if started as root

Yes, I did log out and back in, I even rebooted.

[turion@enigmage ~]$ groups
lp wheel games video audio optical storage scanner power users turion ecryptfs

Looks fine to me...

Offline

#4 2011-12-14 17:28:26

turion
Member
Registered: 2011-12-13
Posts: 10

Re: jack (and jack2) can aquire soundcard only if started as root

I could add that root is in the following groups:

root bin daemon sys adm disk wheel log

Offline

#5 2011-12-14 19:38:15

Pajaro
Member
Registered: 2004-04-21
Posts: 884

Re: jack (and jack2) can aquire soundcard only if started as root

since you are using a usb_stream, it can be related to usb permissions. I cannot help you with this, but you can check the wiki.

Offline

#6 2011-12-14 21:37:53

turion
Member
Registered: 2011-12-13
Posts: 10

Re: jack (and jack2) can aquire soundcard only if started as root

That sounds reasonable. However I don't know, what keyword to look for. "USB permissions" didn't give any results I could make use of.

I added myself to the "sys" group for fun, no effect. Are there other groups or permission files I could check?

Offline

#7 2011-12-21 13:38:08

turion
Member
Registered: 2011-12-13
Posts: 10

Re: jack (and jack2) can aquire soundcard only if started as root

Just for the record: I had /etc/asound.conf unreadable by all users that weren't root, which was a dumb thing.
So a small chmod o+r /etc/asound.conf did the trick. Jack now runs without problems.
(I defined the usb_stream interface there)

Last edited by turion (2011-12-21 13:38:36)

Offline

Board footer

Powered by FluxBB