Issus with OSS and jack1 on Ubuntu 20.40
Posted: Wed Oct 14, 2020 8:17 pm
I am having an issue using OSS in Ubuntu 20.04 along with Kernel 5.4.0-48-lowlatency that I hope someone can share insight to as I can not figure this one out. I am not sure if the issue is with OSS, Kernel 5.4, or jack1.
I am using the OSS deb file along with the patch as indicated in viewtopic.php?f=3&t=5882 as I need the Lynxtwo driver. Once the patch is applied, the driver compiles without error. The driver can also be started and stopped using sounon/soundoff without error. So it seems like the actual OSS driver is OK.
I am also using jack1 for recording/playback and it here where I see the issue.
It seems to be based on the sample rate selected.
If I start jack using the following:
jackd -v -doss -r48000 -p4096 -n4 -b -P /dev/dsp_out -C /dev/dsp_in
everything is OK and I can start and stop jack multiple times without error.
But if I change the sample rate to something faster such as 88200, 96000, 192000 then while jack seems to start without issue the input is not working. Output is working without issue. I also can not stop jack at this point without killing it.
Here are 3 outputs from jack in verbose mode showing what is happening.
This is what I see from the verbose output of jack with the sample rate at 48KHz. Everything is OK with no issues. Jack can be started and stopped multiple time without issue.
jackd -v -doss -r48000 -p4096 -n4 -b -P /dev/dsp_out -C /dev/dsp_in
jackd 0.125.0rc1
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_alsa.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_firewire.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_oss.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_dummy.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_alsa_midi.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_net.so
JACK compiled with System V SHM support.
server `default' registered
registered builtin port type 32 bit float mono audio
registered builtin port type 8 bit raw midi
clock source = system clock via clock_gettime
loading driver ..
start poll on 3 fd's
new client: oss, uuid = 8589934593 type 1 @ 0x5597d4a5e330 fd = -1
new buffer size 4096
resizing port buffer segment for type 0, one buffer = 16384 bytes
resizing port buffer segment for type 1, one buffer = 2048 bytes
registered port system:capture_1, offset = 16384
registered port system:capture_2, offset = 32768
registered port system:playback_1, offset = 0
registered port system:playback_2, offset = 0
++ jack_sort_graph
++ jack_rechain_graph():
-- jack_rechain_graph()
-- jack_sort_graph
oss_driver: /dev/dsp_in : 0x10/2/48000 (16384)
oss_driver: /dev/dsp_out : 0x10/2/48000 (16384)
oss_driver: indevbuf 16384 B, outdevbuf 16384 B
oss_driver: using barrier mode, (dual thread)
2365 waiting for signals
load = 0.0082 max usecs: 14.000, spare = 85319.000
load = 0.0123 max usecs: 14.000, spare = 85319.000
load = 0.0085 max usecs: 4.000, spare = 85329.000
load = 0.0066 max usecs: 4.000, spare = 85329.000
load = 0.0056 max usecs: 4.000, spare = 85329.000
load = 0.0052 max usecs: 4.000, spare = 85329.000
load = 0.0090 max usecs: 11.000, spare = 85322.000
load = 0.0110 max usecs: 11.000, spare = 85322.000
^Cjack main caught signal 2
starting server engine shutdown
stopping driver
server thread back from poll
unloading driver
freeing shared port segments
stopping server thread
last xrun delay: 0.000 usecs
max delay reported by backend: 81.000 usecs
freeing engine shared memory
max usecs: 14.000, engine deleted
cleaning up shared memory
cleaning up files
unregistering server `default'
no message buffer overruns
This is what I see when the sample rate is set to 88.2KHz:
jackd -v -doss -r88200 -p4096 -n4 -b -P /dev/dsp_out -C /dev/dsp_in
jackd 0.125.0rc1
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_alsa.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_firewire.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_oss.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_dummy.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_alsa_midi.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_net.so
JACK compiled with System V SHM support.
server `default' registered
registered builtin port type 32 bit float mono audio
registered builtin port type 8 bit raw midi
clock source = system clock via clock_gettime
loading driver ..
new client: oss, uuid = 8589934593 type 1 @ 0x555d2f645330 fd = -1
start poll on 3 fd's
new buffer size 4096
resizing port buffer segment for type 0, one buffer = 16384 bytes
resizing port buffer segment for type 1, one buffer = 2048 bytes
registered port system:capture_1, offset = 16384
registered port system:capture_2, offset = 32768
registered port system:playback_1, offset = 0
registered port system:playback_2, offset = 0
++ jack_sort_graph
++ jack_rechain_graph():
-- jack_rechain_graph()
-- jack_sort_graph
oss_driver: /dev/dsp_in : 0x10/2/88200 (16384)
oss_driver: /dev/dsp_out : 0x10/2/88200 (16384)
oss_driver: indevbuf 16384 B, outdevbuf 16384 B
oss_driver: using barrier mode, (dual thread)
2374 waiting for signals
As can be seen it seems to be waiting for signals from the driver. At this point I am not able to stop jack without killing it.
If I try to start jack again using 48KHz, I can see where /dev/dsp_in is generating an error:
jackd -v -doss -r48000 -p4096 -n4 -b -P /dev/dsp_out -C /dev/dsp_in
jackd 0.125.0rc1
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_alsa.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_firewire.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_oss.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_dummy.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_alsa_midi.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_net.so
JACK compiled with System V SHM support.
server `default' registered
registered builtin port type 32 bit float mono audio
registered builtin port type 8 bit raw midi
clock source = system clock via clock_gettime
loading driver ..
start poll on 3 fd's
new client: oss, uuid = 8589934593 type 1 @ 0x55757b4be330 fd = -1
new buffer size 4096
resizing port buffer segment for type 0, one buffer = 16384 bytes
resizing port buffer segment for type 1, one buffer = 2048 bytes
registered port system:capture_1, offset = 16384
registered port system:capture_2, offset = 32768
registered port system:playback_1, offset = 0
registered port system:playback_2, offset = 0
++ jack_sort_graph
++ jack_rechain_graph():
-- jack_rechain_graph()
-- jack_sort_graph
[OSS: failed to open input device /dev/dsp_in: oss_driver.c@464, errno=16 <-------- Error
OSS: failed to set fragment size: oss_driver.c@314, errno=9 <-------- Error
oss_driver: /dev/dsp_out : 0x10/2/48000 (16384)
oss_driver: indevbuf 16384 B, outdevbuf 16384 B
oss_driver: using barrier mode, (dual thread)
2414 waiting for signals
load = 0.0035 max usecs: 6.000, spare = 85327.000
load = 0.0053 max usecs: 6.000, spare = 85327.000
load = 0.0062 max usecs: 6.000, spare = 85327.000
The output is working fine so it seems the input device file is hung up.
Once this happens I also can't stop the OSS driver using soundoff.
The only way to get back to working on capture is a reboot.
It is not possible to use modprobe to unload the drivers:
modprobe: FATAL: Module oss_usb is in use.
modprobe: FATAL: Module lynxtwo is in use.
modprobe: FATAL: Module osscore is in use.
If anyone has any ideas on what the issue might be that would be great as I am not sure what to try at this point.
Thanks, Dan
I am using the OSS deb file along with the patch as indicated in viewtopic.php?f=3&t=5882 as I need the Lynxtwo driver. Once the patch is applied, the driver compiles without error. The driver can also be started and stopped using sounon/soundoff without error. So it seems like the actual OSS driver is OK.
I am also using jack1 for recording/playback and it here where I see the issue.
It seems to be based on the sample rate selected.
If I start jack using the following:
jackd -v -doss -r48000 -p4096 -n4 -b -P /dev/dsp_out -C /dev/dsp_in
everything is OK and I can start and stop jack multiple times without error.
But if I change the sample rate to something faster such as 88200, 96000, 192000 then while jack seems to start without issue the input is not working. Output is working without issue. I also can not stop jack at this point without killing it.
Here are 3 outputs from jack in verbose mode showing what is happening.
This is what I see from the verbose output of jack with the sample rate at 48KHz. Everything is OK with no issues. Jack can be started and stopped multiple time without issue.
jackd -v -doss -r48000 -p4096 -n4 -b -P /dev/dsp_out -C /dev/dsp_in
jackd 0.125.0rc1
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_alsa.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_firewire.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_oss.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_dummy.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_alsa_midi.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_net.so
JACK compiled with System V SHM support.
server `default' registered
registered builtin port type 32 bit float mono audio
registered builtin port type 8 bit raw midi
clock source = system clock via clock_gettime
loading driver ..
start poll on 3 fd's
new client: oss, uuid = 8589934593 type 1 @ 0x5597d4a5e330 fd = -1
new buffer size 4096
resizing port buffer segment for type 0, one buffer = 16384 bytes
resizing port buffer segment for type 1, one buffer = 2048 bytes
registered port system:capture_1, offset = 16384
registered port system:capture_2, offset = 32768
registered port system:playback_1, offset = 0
registered port system:playback_2, offset = 0
++ jack_sort_graph
++ jack_rechain_graph():
-- jack_rechain_graph()
-- jack_sort_graph
oss_driver: /dev/dsp_in : 0x10/2/48000 (16384)
oss_driver: /dev/dsp_out : 0x10/2/48000 (16384)
oss_driver: indevbuf 16384 B, outdevbuf 16384 B
oss_driver: using barrier mode, (dual thread)
2365 waiting for signals
load = 0.0082 max usecs: 14.000, spare = 85319.000
load = 0.0123 max usecs: 14.000, spare = 85319.000
load = 0.0085 max usecs: 4.000, spare = 85329.000
load = 0.0066 max usecs: 4.000, spare = 85329.000
load = 0.0056 max usecs: 4.000, spare = 85329.000
load = 0.0052 max usecs: 4.000, spare = 85329.000
load = 0.0090 max usecs: 11.000, spare = 85322.000
load = 0.0110 max usecs: 11.000, spare = 85322.000
^Cjack main caught signal 2
starting server engine shutdown
stopping driver
server thread back from poll
unloading driver
freeing shared port segments
stopping server thread
last xrun delay: 0.000 usecs
max delay reported by backend: 81.000 usecs
freeing engine shared memory
max usecs: 14.000, engine deleted
cleaning up shared memory
cleaning up files
unregistering server `default'
no message buffer overruns
This is what I see when the sample rate is set to 88.2KHz:
jackd -v -doss -r88200 -p4096 -n4 -b -P /dev/dsp_out -C /dev/dsp_in
jackd 0.125.0rc1
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_alsa.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_firewire.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_oss.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_dummy.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_alsa_midi.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_net.so
JACK compiled with System V SHM support.
server `default' registered
registered builtin port type 32 bit float mono audio
registered builtin port type 8 bit raw midi
clock source = system clock via clock_gettime
loading driver ..
new client: oss, uuid = 8589934593 type 1 @ 0x555d2f645330 fd = -1
start poll on 3 fd's
new buffer size 4096
resizing port buffer segment for type 0, one buffer = 16384 bytes
resizing port buffer segment for type 1, one buffer = 2048 bytes
registered port system:capture_1, offset = 16384
registered port system:capture_2, offset = 32768
registered port system:playback_1, offset = 0
registered port system:playback_2, offset = 0
++ jack_sort_graph
++ jack_rechain_graph():
-- jack_rechain_graph()
-- jack_sort_graph
oss_driver: /dev/dsp_in : 0x10/2/88200 (16384)
oss_driver: /dev/dsp_out : 0x10/2/88200 (16384)
oss_driver: indevbuf 16384 B, outdevbuf 16384 B
oss_driver: using barrier mode, (dual thread)
2374 waiting for signals
As can be seen it seems to be waiting for signals from the driver. At this point I am not able to stop jack without killing it.
If I try to start jack again using 48KHz, I can see where /dev/dsp_in is generating an error:
jackd -v -doss -r48000 -p4096 -n4 -b -P /dev/dsp_out -C /dev/dsp_in
jackd 0.125.0rc1
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_alsa.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_firewire.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_oss.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_dummy.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_alsa_midi.so
getting driver descriptor from /usr/lib/x86_64-linux-gnu/jack/jack_net.so
JACK compiled with System V SHM support.
server `default' registered
registered builtin port type 32 bit float mono audio
registered builtin port type 8 bit raw midi
clock source = system clock via clock_gettime
loading driver ..
start poll on 3 fd's
new client: oss, uuid = 8589934593 type 1 @ 0x55757b4be330 fd = -1
new buffer size 4096
resizing port buffer segment for type 0, one buffer = 16384 bytes
resizing port buffer segment for type 1, one buffer = 2048 bytes
registered port system:capture_1, offset = 16384
registered port system:capture_2, offset = 32768
registered port system:playback_1, offset = 0
registered port system:playback_2, offset = 0
++ jack_sort_graph
++ jack_rechain_graph():
-- jack_rechain_graph()
-- jack_sort_graph
[OSS: failed to open input device /dev/dsp_in: oss_driver.c@464, errno=16 <-------- Error
OSS: failed to set fragment size: oss_driver.c@314, errno=9 <-------- Error
oss_driver: /dev/dsp_out : 0x10/2/48000 (16384)
oss_driver: indevbuf 16384 B, outdevbuf 16384 B
oss_driver: using barrier mode, (dual thread)
2414 waiting for signals
load = 0.0035 max usecs: 6.000, spare = 85327.000
load = 0.0053 max usecs: 6.000, spare = 85327.000
load = 0.0062 max usecs: 6.000, spare = 85327.000
The output is working fine so it seems the input device file is hung up.
Once this happens I also can't stop the OSS driver using soundoff.
The only way to get back to working on capture is a reboot.
It is not possible to use modprobe to unload the drivers:
modprobe: FATAL: Module oss_usb is in use.
modprobe: FATAL: Module lynxtwo is in use.
modprobe: FATAL: Module osscore is in use.
If anyone has any ideas on what the issue might be that would be great as I am not sure what to try at this point.
Thanks, Dan