Hi Shane,

Sorry for the late reply, but you gave me a lot of homework :)

I upgraded to Hardy because the kernel 2.6.24-19-rt is available only for that Ubuntu distribution (not for Ubuntu Intrepid). Therefore now I'm using the kernel 2.6.24-19-rt and by default I have alsa-driver 1.0.16 (from cat /proc/asound/version).

Then I downloaded alsa-driver, alsa-lib and alsa-utils 1.0.17 (.diff.gz, .orig.tar.gz, .dsc) from packages.ubuntu.com (they are for Intrepid) and I created the packages alsa-base, linux-sound-base, libasound2, libasound2-dev, alsa-utils using debuild as you suggested. After installing those packages unfortunately I still have:

$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.16.
Compiled on Jun 18 2008 for kernel 2.6.24-19-rt (SMP).

I also downloaded .diff.gz, .orig.tar.gz, .dsc files from packages.ubuntu.com for jackd 0.116.1 and rosegarden 1.7.1 (they are both for Ubuntu Jaunty). After creating the packages with debuild I installed them.
Now jackd is working fine (tested with Ardour), but rosegarden is still giving me the same problem (jackd crashes, but all the other audio and midi applications are working). This is the output when I launch it from the shell:

$ rosegardensequencer
kbuildsycoca running...
DCOP Cleaning up dead connections.
Rosegarden 1.7.1 - AlsaDriver [ALSA library version 1.0.17a, module version 1.0.16, kernel version 2.6.24-19-rt]

JackDriver::initialiseAudio - JACK sample rate = 192000Hz, buffer size = 512
JackDriver::initialiseAudio - creating disk thread
JackDriver::initialiseAudio - found 2 JACK physical outputs
JackDriver::initialiseAudio - connecting from "rosegarden:master out L" to "system:playback_1"
JackDriver::initialiseAudio - connecting from "rosegarden:master out R" to "system:playback_2"
JackDriver::initialiseAudio - found 2 JACK physical inputs
JackDriver::initialiseAudio - connecting from "system:capture_1" to "rosegarden:record in 1 L"
JackDriver::initialiseAudio - connecting from "system:capture_2" to "rosegarden:record in 1 R"
JackDriver::initialiseAudio - initialised JACK audio subsystem

  ALSA Client information:

    14,0 - (Midi Through, Midi Through Port-0)            (DUPLEX) [ctype 2, ptype 655362, cap 99]
    20,0 - (Audio Kontrol 1, Audio Kontrol 1-0)            (DUPLEX) [ctype 2, ptype 589826, cap 127]
    20,1 - (Audio Kontrol 1, Audio Kontrol 1-1)            (DUPLEX) [ctype 2, ptype 589826, cap 127]

CREATED OUTPUT PORT 3:out 1 - MIDI external device for device 0
Connecting my port 3 to 20:0 on initialisation
done
Creating device 0 in Play mode for connection 20:0 Audio Kontrol 1-0 (duplex)
Default device name for this device is MIDI external device
Creating device 1 in Record mode for connection 20:0 Audio Kontrol 1-0 (duplex)
Default device name for this device is MIDI hardware input device
CREATED OUTPUT PORT 4:out 2 - MIDI external device 2 for device 2
Connecting my port 4 to 20:1 on initialisation
done
Creating device 2 in Play mode for connection 20:1 Audio Kontrol 1-1 (duplex)
Default device name for this device is MIDI external device 2
Creating device 3 in Record mode for connection 20:1 Audio Kontrol 1-1 (duplex)
Default device name for this device is MIDI hardware input device 2
CREATED OUTPUT PORT 5:out 3 - MIDI output system device for device 4
done
Creating device 4 in Play mode for connection 14:0 Midi Through Port-0 (duplex) (not connecting)
Default device name for this device is MIDI output system device
Creating device 5 in Record mode for connection 14:0 Midi Through Port-0 (duplex) (not connecting)
Default device name for this device is MIDI input system device
AlsaDriver::setCurrentTimer((auto))
    Current timer set to "system timer" with timer checks
AlsaDriver::initialiseMidi -  initialised MIDI subsystem

Renamed 129:3 to General MIDI Device

  ALSA Client information:

    14,0 - (Midi Through, Midi Through Port-0)            (DUPLEX) [ctype 2, ptype 655362, cap 99]
    20,0 - (Audio Kontrol 1, Audio Kontrol 1-0)            (DUPLEX) [ctype 2, ptype 589826, cap 127]
    20,1 - (Audio Kontrol 1, Audio Kontrol 1-1)            (DUPLEX) [ctype 2, ptype 589826, cap 127]

Launched ok, pid = 6393
zombified - calling shutdown handler
closed client
reset plugins

JackDriver::initialiseAudio - JACK server not running

$ rosegarden --existingsequencer
cannot read response from jack server (Nessun file o directory)
PluginFactory::instance(dssi): creating new DSSIPluginFactory
LADSPAPluginFactory::discoverPlugins - discovering plugins; path is [/home/marco/.dssi] [/usr/local/lib/dssi] [/usr/lib/dssi]
LADSPAPluginFactory::discoverPlugins - done
PluginFactory::instance(ladspa): creating new LADSPAPluginFactory
LADSPAPluginFactory::discoverPlugins - discovering plugins; path is [/home/marco/.ladspa] [/usr/local/lib/ladspa] [/usr/lib/ladspa]
LADSPAPluginFactory::discoverPlugins - done
Composition::getTrackById(0) - WARNING - track id not found, this is probably a BUG /home/marco/tarballs/rosegarden/rosegarden-1.7.1/src/base/Composition.cpp:1533
Available track ids are:
Renaming device 0 to General MIDI Device
$ CompositionModelImpl::slotInstrumentParametersChanged()
TrackButtons::slotUpdateTracks
RosegardenGUIApp::awaitDialogClearance: entering
RosegardenGUIApp::awaitDialogClearance: exiting
Comparing current version "1.7.1" with latest version "1.7.2"
RosegardenGUIApp::awaitDialogClearance: entering
RosegardenGUIApp::awaitDialogClearance: exiting
Warning: Composition::~Composition() with 2 observers still extant
Observers are: 0x89618c4 [N10Rosegarden19SegmentParameterBoxE] 0xb4aa8fd8 [N10Rosegarden20CompositionModelImplE]

I'm using all the program versions you recommended, except alsa 1.0.16. What's the problem with alsa 1.0.16? Why the drivers  alsa 1.0.17 have not been istalled properly?

I also tried Intrepid, but the real time kernel they provide doesn't work with my Intel Dual-Core.
Thank you very much,
Marco

PS
This is the jackd output:
.
.
.
load = 3.8780 max usecs: 132.000, spare = 2534.000
load = 3.9270 max usecs: 106.000, spare = 2560.000
server thread back from poll
new client: rosegarden, id = 3 type 2 @ 0xb69ed000 fd = 18
start poll on 5 fd's
server thread back from poll
new client rosegarden using 19 for events
start poll on 5 fd's
server thread back from poll
start poll on 5 fd's
server thread back from poll
client event poll on 16 for qjackctl starts at 165334329
back from client event poll after 26 usecs
registered port rosegarden:master out L, offset = 10240
start poll on 5 fd's
server thread back from poll
client event poll on 16 for qjackctl starts at 165334486
back from client event poll after 7 usecs
registered port rosegarden:master out R, offset = 12288
start poll on 5 fd's
server thread back from poll
client event poll on 16 for qjackctl starts at 165335093
back from client event poll after 11 usecs
registered port rosegarden:record monitor out L, offset = 14336
start poll on 5 fd's
server thread back from poll
client event poll on 16 for qjackctl starts at 165335172
back from client event poll after 101 usecs
22:46:58.275 JACK connection graph change.
registered port rosegarden:record monitor out R, offset = 16384
start poll on 5 fd's
server thread back from poll
client event poll on 16 for qjackctl starts at 165336676
back from client event poll after 356 usecs
registered port rosegarden:record in 1 L, offset = 0
start poll on 5 fd's
server thread back from poll
client event poll on 16 for qjackctl starts at 165338087
back from client event poll after 33 usecs
registered port rosegarden:record in 1 R, offset = 0
start poll on 5 fd's
22:46:58.451 JACK connection change.
server thread back from poll
start poll on 5 fd's
.
.
.
server thread back from poll
polling sync client 3
22:46:58.519 JACK connection graph change.
++ jack_sort_graph
++ jack_rechain_graph():
+++ client is now alsa_pcm active ? 1
client alsa_pcm: internal client, execution_order=0.
+++ client is now qjackctl active ? 1
client qjackctl: start_fd=7, execution_order=0.
client event poll on 16 for qjackctl starts at 165585668
back from client event poll after 16 usecs
+++ client is now rosegarden active ? 1
client rosegarden: in subgraph after qjackctl, execution_order=1.
client event poll on 19 for rosegarden starts at 165586278
back from client event poll after 21 usecs
client qjackctl: wait_fd=17, execution_order=2 (last client).
-- jack_rechain_graph()
-- jack_sort_graph
start poll on 5 fd's
server thread back from poll
connect rosegarden:master out L and system:playback_1 (output)
client event poll on 19 for rosegarden starts at 165596441
++ jack_sort_graph
++ jack_rechain_graph():
+++ client is now alsa_pcm active ? 1
client alsa_pcm: internal client, execution_order=0.
+++ client is now rosegarden active ? 1
client rosegarden: start_fd=7, execution_order=0.
client event poll on 19 for rosegarden starts at 165596696
back from client event poll after 11 usecs
+++ client is now qjackctl active ? 1
client qjackctl: in subgraph after rosegarden, execution_order=1.
client event poll on 16 for qjackctl starts at 165596837
back from client event poll after 10 usecs
client rosegarden: wait_fd=17, execution_order=2 (last client).
-- jack_rechain_graph()
-- jack_sort_graph
start poll on 5 fd's
server thread back from poll
connect rosegarden:master out R and system:playback_2 (output)
client event poll on 19 for rosegarden starts at 165597064
back from client event poll after 19 usecs
++ jack_sort_graph
+++ client is now alsa_pcm active ? 1
client alsa_pcm: internal client, execution_order=0.
+++ client is now qjackctl active ? 1
client qjackctl: start_fd=7, execution_order=0.
client event poll on 16 for qjackctl starts at 165597206
back from client event poll after 109 usecs
+++ client is now rosegarden active ? 1
22:46:58.579 ALSA connection graph change.
client rosegarden: in subgraph after qjackctl, execution_order=1.
client event poll on 19 for rosegarden starts at 165597394
back from client event poll after 94 usecs
lock-driven null cycle
client qjackctl: wait_fd=17, execution_order=2 (last client).
-- jack_rechain_graph()
-- jack_sort_graph
start poll on 5 fd's
server thread back from poll
connect system:capture_1 and rosegarden:record in 1 L (forward)
client event poll on 19 for rosegarden starts at 165597994
back from client event poll after 52 usecs
++ jack_sort_graph
++ jack_rechain_graph():
+++ client is now alsa_pcm active ? 1
client alsa_pcm: internal client, execution_order=0.
client rosegarden: start_fd=7, execution_order=0.
client event poll on 19 for rosegarden starts at 165598129
back from client event poll after 85 usecs
+++ client is now qjackctl active ? 1
client qjackctl: in subgraph after rosegarden, execution_order=1.
client event poll on 16 for qjackctl starts at 165598310
back from client event poll after 97 usecs
client rosegarden: wait_fd=17, execution_order=2 (last client).
-- jack_rechain_graph()
-- jack_sort_graph
start poll on 5 fd's
server thread back from poll
connect system:capture_2 and rosegarden:record in 1 R (forward)
client event poll on 19 for rosegarden starts at 165598777
back from client event poll after 14 usecs
++ jack_sort_graph
++ jack_rechain_graph():
+++ client is now alsa_pcm active ? 1
client alsa_pcm: internal client, execution_order=0.
+++ client is now qjackctl active ? 1
client qjackctl: start_fd=7, execution_order=0.
client event poll on 16 for qjackctl starts at 165598870
back from client event poll after 98 usecs
+++ client is now rosegarden active ? 1
client rosegarden: in subgraph after qjackctl, execution_order=1.
client event poll on 19 for rosegarden starts at 165599138
back from client event poll after 14 usecs
client qjackctl: wait_fd=17, execution_order=2 (last client).
-- jack_rechain_graph()
-- jack_sort_graph
start poll on 5 fd's
22:46:58.657 ALSA connection change.
server thread back from poll
start poll on 5 fd's
.
.
.
server thread back from poll
start poll on 5 fd's
22:46:58.669 ALSA connection graph change.
22:46:58.859 ALSA connection change.
load = 6.0895 max usecs: 220.000, spare = 2446.000
.
.
.
load = 9.1055 max usecs: 234.000, spare = 2432.000
server thread back from poll
cannot create new client; rosegarden already exists
cannot complete client connection process
start poll on 5 fd's
load = 10.1792 max usecs: 300.000, spare = 2366.000
22:47:37.000 JACK connection graph change.
server thread back from poll
client event poll on 16 for qjackctl starts at 204068870
back from client event poll after 404 usecs
registered port rosegarden:record in 2 L, offset = 0
start poll on 5 fd's
server thread back from poll
client event poll on 16 for qjackctl starts at 204075171
back from client event poll after 39 usecs
registered port rosegarden:record in 2 R, offset = 0
start poll on 5 fd's
22:47:37.098 JACK connection change.
server thread back from poll
start poll on 5 fd's
.
.
.
server thread back from poll
start poll on 5 fd's
ALSA: poll time out, polled for 3998090 usecs
DRIVER NT: could not run driver cycle
stopping driver
detaching driver
DIS-connect system:capture_1 and rosegarden:record in 1 L
client event poll on 19 for rosegarden starts at 206805182
back from client event poll after 41 usecs
++ jack_sort_graph
++ jack_rechain_graph():
+++ client is now alsa_pcm active ? 1
client alsa_pcm: internal client, execution_order=0.
+++ client is now rosegarden active ? 1
22:47:39.751 JACK connection graph change.
22:47:39.753 Shutdown notification.
22:47:39.763 JACK is stopping...
22:47:39.768 JACK is being forced...
client rosegarden: start_fd=7, execution_order=0.
client event poll on 19 for rosegarden starts at 206805330
back from client event poll after 85 usecs
+++ client is now qjackctl active ? 1
client qjackctl: in subgraph after rosegarden, execution_order=1.
client event poll on 16 for qjackctl starts at 206805464
back from client event poll after 88 usecs
client rosegarden: wait_fd=17, execution_order=2 (last client).
-- jack_rechain_graph()
-- jack_sort_graph
client event poll on 16 for qjackctl starts at 206805606
back from client event poll after 53 usecs
DIS-connect system:capture_2 and rosegarden:record in 1 R
client event poll on 19 for rosegarden starts at 206805697
back from client event poll after 34 usecs
++ jack_sort_graph
++ jack_rechain_graph():
+++ client is now alsa_pcm active ? 1
client alsa_pcm: internal client, execution_order=0.
+++ client is now qjackctl active ? 1
client qjackctl: start_fd=7, execution_order=0.
client event poll on 16 for qjackctl starts at 206805809
back from client event poll after 79 usecs
+++ client is now rosegarden active ? 1
client rosegarden: in subgraph after qjackctl, execution_order=1.
client event poll on 19 for rosegarden starts at 206805937
back from client event poll after 70 usecs
client qjackctl: wait_fd=17, execution_order=2 (last client).
-- jack_rechain_graph()
-- jack_sort_graph
client event poll on 16 for qjackctl starts at 206806056
back from client event poll after 36 usecs
DIS-connect rosegarden:master out L and system:playback_1
client event poll on 19 for rosegarden starts at 206806124
back from client event poll after 33 usecs
++ jack_sort_graph
++ jack_rechain_graph():
+++ client is now alsa_pcm active ? 1
client alsa_pcm: internal client, execution_order=0.
+++ client is now rosegarden active ? 1
client rosegarden: start_fd=7, execution_order=0.
client event poll on 19 for rosegarden starts at 206806234
back from client event poll after 97 usecs
+++ client is now qjackctl active ? 1
client qjackctl: in subgraph after rosegarden, execution_order=1.
client event poll on 16 for qjackctl starts at 206806381
back from client event poll after 78 usecs
client rosegarden: wait_fd=17, execution_order=2 (last client).
-- jack_rechain_graph()
-- jack_sort_graph
client event poll on 16 for qjackctl starts at 206806509
back from client event poll after 48 usecs
DIS-connect rosegarden:master out R and system:playback_2
client event poll on 19 for rosegarden starts at 206806584
back from client event poll after 49 usecs
++ jack_sort_graph
++ jack_rechain_graph():
+++ client is now alsa_pcm active ? 1
client alsa_pcm: internal client, execution_order=0.
+++ client is now qjackctl active ? 1
client qjackctl: start_fd=7, execution_order=0.
jack main caught signal 12
client event poll on 16 for qjackctl starts at 206806711
back from client event poll after 89 usecs
+++ client is now rosegarden active ? 1
client rosegarden: in subgraph after qjackctl, execution_order=1.
client event poll on 19 for rosegarden starts at 206806842
back from client event poll after 85 usecs
client qjackctl: wait_fd=17, execution_order=2 (last client).
-- jack_rechain_graph()
-- jack_sort_graph
client event poll on 16 for qjackctl starts at 206806978
back from client event poll after 91 usecs
client event poll on 16 for qjackctl starts at 206807095
back from client event poll after 40 usecs
client event poll on 16 for qjackctl starts at 206807158
back from client event poll after 38 usecs
starting server engine shutdown
freeing shared port segments
stopping server thread
stopping watchdog thread
last xrun delay: 0.000 usecs
max delay reported by backend: 434.000 usecs
freeing engine shared memory
max usecs: 300.000, engine deleted
WARNING: 3 message buffer overruns!
cleaning up shared memory
cleaning up files
unregistering server `default'
zombified - calling shutdown handler
22:47:39.969 JACK was stopped successfully.
22:48:09.969 Post-shutdown script...
22:48:09.970 killall jackd
QProcess: Destroyed while process is still running.
22:48:10.383 Post-shutdown script terminated successfully.


2008/12/20 shane richards <shanerich@email.com>
>I'm only used to compile from a single tarball with the standard procedure ./configure, make, make install (+options) or using checkinstall (that I prefer). I've never  >rebuild a package  from  .tar.gz, .diff.gz and .dsc. I'll search on the web how to do it (dpkg?). Do you have any instructions?

Use apt/dpkg/debuild:

# get any build dependencies
$ apt-get build-dep <foobar>

# unpack the source and apply patches
$ dpkg-source -x <foobar>.dsc

# go to the source directory
$ cd <foobar>

# build the packages
$ debuild -us -uc


your packages should be ready in the parent directory.



>All real time kernels are available in the normal Ubuntu repositories and not only for Ubuntu Studio. I'm using Ubuntu Gutsy (7.10) and the kernel 2.6.24-19-rt is not >available for my distribution. It is only available for Ubuntu Hardy (8.04LTS), that offers also 2.6.24-22-rt. It is probably better for me to upgrade my system to Ubuntu >Hardy. For Ubuntu Intrepid (9.10) the kernel 2.6.27-3-rt is available. Do you know if it is a good kernel for audio?


Until you resolve your problems, stay with the program versions I recommended. If you have to upgrade, go with Intrepid. Hardy is a nightmare.

Feel free to email me with any individual issues as you come across them.

- shane