MIDI prevents Pd from starting

Hi,

I newly experienced MIDI issues with my PiSound and Pd.
This is after a crash of the pi while I was working on a pd patch, in SSH.
Setup : nanoKontrol and Pisound on RPI 3B+ running latest patchbox OS, with jack. Everything was working great for months before.
Now Pd doesn’t start, unless I start it with -nomidi flag.
Otherwise Pd hangs (no window, watchdog…)

I tried to boot with or without nanoKontrol attached, with or without amidiauto, local or SSH, same issue.
Resetting midi connections didn’t help.
aconnect -l gives me no return, just hangs , sudo aconnect -l gives me the connections.
Not sure if that the case before, nor if it is related.

What’s happening ?

Thanks

Hi, it’s strange for aconnect to hang. This hints at some misconfiguration on the system.

Can you post the log of dmesg here? Maybe it will show why ALSA’s MIDI is hanging.

dmesg gives the long log below.

BTW, I recently plugged a new nanoKontrol, can it be part of the problem, like alsa midi messing up with two references of the same name ?
Anyway, booting with either the old one or the new one leads to the same issue, and I didn’t have any trouble using the new one yesterday.

0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.71-rt24-v7+ (giedrius@giedrius-vb) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03)) #1 SMP PREEMPT RT Wed Mar 11 16:54:08 EET 2020
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Rev 1.2
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 8 MiB at 0x3b800000
[    0.000000] On node 0 totalpages: 245760
[    0.000000]   Normal zone: 2160 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 245760 pages, LIFO batch:63
[    0.000000] random: get_random_bytes called from start_kernel+0x7c/0x4ac with crng_init=0
[    0.000000] percpu: Embedded 18 pages/cpu s41536 r8192 d24000 u73728
[    0.000000] pcpu-alloc: s41536 r8192 d24000 u73728 alloc=18*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 243600
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=720 bcm2708_fb.fbswap=1 smsc95xx.macaddr=B8:27:EB:90:47:26 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 console=tty1 root=PARTUUID=3ac474d7-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 950604K/983040K available (8192K kernel code, 629K rwdata, 2188K rodata, 1024K init, 957K bss, 24244K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
               vector  : 0xffff0000 - 0xffff1000   (   4 kB)
               fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
               vmalloc : 0xbc800000 - 0xff800000   (1072 MB)
               lowmem  : 0x80000000 - 0xbc000000   ( 960 MB)
               modules : 0x7f000000 - 0x80000000   (  16 MB)
                 .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
                 .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
                 .data : 0x(ptrval) - 0x(ptrval)   ( 630 kB)
                  .bss : 0x(ptrval) - 0x(ptrval)   ( 958 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 26399 entries in 78 pages
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu: 	RCU priority boosting: priority 1 delay 500 ms.
[    0.000000] 	No expedited grace period (rcu_normal_after_boot).
[    0.000000] 	Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000007] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000017] Switching to timer-based delay loop, resolution 52ns
[    0.000272] Console: colour dummy device 80x30
[    0.001388] console [tty1] enabled
[    0.001421] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.001434] pid_max: default: 32768 minimum: 301
[    0.001816] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001830] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.002919] CPU: Testing write buffer coherency: ok
[    0.003477] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.060146] Setting up static identity map for 0x100000 - 0x10003c
[    0.100129] rcu: Hierarchical SRCU implementation.
[    0.180318] smp: Bringing up secondary CPUs ...
[    0.321038] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.461268] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.601519] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.601732] smp: Brought up 1 node, 4 CPUs
[    0.601852] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.601889] CPU: All CPU(s) started in HYP mode.
[    0.601920] CPU: Virtualization extensions available.
[    0.603307] devtmpfs: initialized
[    0.636046] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.636745] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.636816] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.637582] pinctrl core: initialized pinctrl subsystem
[    0.639438] NET: Registered protocol family 16
[    0.645068] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.656182] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.656233] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.656495] Serial: AMBA PL011 UART driver
[    0.660402] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.729998] bcm2835-dma 3f007000.dma: DMA legacy API manager at (ptrval), dmachans=0x1
[    0.733034] SCSI subsystem initialized
[    0.733514] usbcore: registered new interface driver usbfs
[    0.733654] usbcore: registered new interface driver hub
[    0.733872] usbcore: registered new device driver usb
[    0.751835] raspberrypi-firmware soc:firmware: Attached to firmware from 2020-02-12 12:38, variant start
[    0.761846] raspberrypi-firmware soc:firmware: Firmware hash is 53a54c770c493957d99bf49762dfabc4eee00e45
[    0.774441] clocksource: Switched to clocksource arch_sys_counter
[    0.961987] VFS: Disk quotas dquot_6.6.0
[    0.962145] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.962951] FS-Cache: Loaded
[    0.963371] CacheFiles: Loaded
[    0.982609] NET: Registered protocol family 2
[    0.984113] tcp_listen_portaddr_hash hash table entries: 512 (order: 2, 16384 bytes)
[    0.984223] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.984415] TCP bind hash table entries: 8192 (order: 5, 229376 bytes)
[    0.985206] TCP: Hash tables configured (established 8192 bind 8192)
[    0.985523] UDP hash table entries: 512 (order: 3, 32768 bytes)
[    0.985664] UDP-Lite hash table entries: 512 (order: 3, 32768 bytes)
[    0.986292] NET: Registered protocol family 1
[    0.987375] RPC: Registered named UNIX socket transport module.
[    0.987415] RPC: Registered udp transport module.
[    0.987448] RPC: Registered tcp transport module.
[    0.987480] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.989951] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[    0.998624] Initialise system trusted keyrings
[    0.999096] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    1.020436] FS-Cache: Netfs 'nfs' registered for caching
[    1.021773] NFS: Registering the id_resolver key type
[    1.021858] Key type id_resolver registered
[    1.021892] Key type id_legacy registered
[    1.021950] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.026508] Key type asymmetric registered
[    1.026552] Asymmetric key parser 'x509' registered
[    1.026665] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    1.026993] io scheduler noop registered
[    1.027031] io scheduler deadline registered (default)
[    1.027662] io scheduler cfq registered
[    1.027699] io scheduler mq-deadline registered (default)
[    1.027738] io scheduler kyber registered
[    1.033847] bcm2708_fb soc:fb: FB found 1 display(s)
[    1.061355] Console: switching to colour frame buffer device 160x45
[    1.076379] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 1280x720
[    1.080636] bcm2835-rng 3f104000.rng: hwrng registered
[    1.081379] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    1.082663] vc-sm: Videocore shared memory driver
[    1.083455] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    1.107326] brd: module loaded
[    1.132701] loop: module loaded
[    1.133954] Loading iSCSI transport class v2.0-870.
[    1.135450] libphy: Fixed MDIO Bus: probed
[    1.135772] usbcore: registered new interface driver lan78xx
[    1.140782] usbcore: registered new interface driver smsc95xx
[    1.145689] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.178463] dwc_otg 3f980000.usb: base=(ptrval)
[    1.383434] Core Release: 2.80a
[    1.388148] Setting default values for core params
[    1.392800] Finished setting default values for core params
[    1.598174] Using Buffer DMA mode
[    1.602812] Periodic Transfer Interrupt Enhancement - disabled
[    1.607674] Multiprocessor Interrupt Enhancement - disabled
[    1.612496] OTG VER PARAM: 0, OTG VER FLAG: 0
[    1.617319] Dedicated Tx FIFOs mode
[    1.622631] WARN::dwc_otg_hcd_init:1043: FIQ DMA bounce buffers: virt = bb904000 dma = 0xfb904000 len=9024
[    1.627663] FIQ FSM acceleration enabled for :
           Non-periodic Split Transactions
           Periodic Split Transactions
           High-Speed Isochronous Endpoints
           Interrupt/Control Split Transaction hack enabled
[    1.651623] dwc_otg: Microframe scheduler enabled
[    1.651700] WARN::hcd_init_fiq:457: FIQ on core 1
[    1.651708] WARN::hcd_init_fiq:458: FIQ ASM at 80637738 length 36
[    1.651719] WARN::hcd_init_fiq:497: MPHI regs_base at bc810000
[    1.651736] dwc_otg 3f980000.usb: DWC OTG Controller
[    1.670767] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    1.675783] dwc_otg 3f980000.usb: irq 56, io mem 0x00000000
[    1.680464] Init: Port Power? op_state=1
[    1.685183] Init: Power Port (0)
[    1.690153] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    1.695046] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.699902] usb usb1: Product: DWC OTG Controller
[    1.704776] usb usb1: Manufacturer: Linux 4.19.71-rt24-v7+ dwc_otg_hcd
[    1.709628] usb usb1: SerialNumber: 3f980000.usb
[    1.715713] hub 1-0:1.0: USB hub found
[    1.720455] hub 1-0:1.0: 1 port detected
[    1.726222] dwc_otg: FIQ enabled
[    1.726233] dwc_otg: NAK holdoff enabled
[    1.726243] dwc_otg: FIQ split-transaction FSM enabled
[    1.726264] Module dwc_common_port init
[    1.726680] usbcore: registered new interface driver usb-storage
[    1.731644] mousedev: PS/2 mouse device common for all mice
[    1.738258] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.743144] bcm2835-cpufreq: min=600000 max=1200000
[    1.748689] sdhci: Secure Digital Host Controller Interface driver
[    1.753288] sdhci: Copyright(c) Pierre Ossman
[    1.758689] mmc-bcm2835 3f300000.mmcnr: could not get clk, deferring probe
[    1.764242] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[    1.769452] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.776603] hidraw: raw HID events driver (C) Jiri Kosina
[    1.781686] usbcore: registered new interface driver usbhid
[    1.786589] usbhid: USB HID core driver
[    1.792574] vchiq: vchiq_init_state: slot_zero = (ptrval), is_master = 0
[    1.799511] [vc_sm_connected_init]: start
[    1.809220] [vc_sm_connected_init]: end - returning 0
[    1.816293] Initializing XFRM netlink socket
[    1.821083] NET: Registered protocol family 17
[    1.826123] Key type dns_resolver registered
[    1.831277] Registering SWP/SWPB emulation handler
[    1.837497] registered taskstats version 1
[    1.841977] Loading compiled-in X.509 certificates
[    1.868511] uart-pl011 3f201000.serial: cts_event_workaround enabled
[    1.873303] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 81, base_baud = 0) is a PL011 rev2
[    1.881933] mmc-bcm2835 3f300000.mmcnr: mmc_debug:0 mmc_debug2:0
[    1.886835] mmc-bcm2835 3f300000.mmcnr: DMA channel allocated
[    1.918150] sdhost: log_buf @ (ptrval) (fb907000)
[    1.944019] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    1.950111] Indeed it is in host mode hprt0 = 00021501
[    1.955075] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.961610] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.976520] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    1.981207] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    1.991541] of_cfs_init
[    1.996432] of_cfs_init: OK
[    2.002082] Waiting for root device PARTUUID=3ac474d7-02...
[    2.038682] random: fast init done
[    2.097635] mmc1: new high speed SDIO card at address 0001
[    2.126084] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.135715] mmc0: new high speed SDHC card at address aaaa
[    2.142182] mmcblk0: mmc0:aaaa SL16G 14.8 GiB
[    2.153660]  mmcblk0: p1 p2
[    2.194573] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.199941] Indeed it is in host mode hprt0 = 00001101
[    2.205817] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.210691] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    2.219407] devtmpfs: mounted
[    2.231366] Freeing unused kernel memory: 1024K
[    2.236469] Run /sbin/init as init process
[    2.445316] usb 1-1: New USB device found, idVendor=0424, idProduct=9514, bcdDevice= 2.00
[    2.450320] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.457285] hub 1-1:1.0: USB hub found
[    2.463591] hub 1-1:1.0: 5 ports detected
[    2.632802] random: crng init done
[    2.784577] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    2.925300] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00, bcdDevice= 2.00
[    2.928256] systemd[1]: System time before build time, advancing clock.
[    2.935307] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.938533] smsc95xx v1.0.6
[    3.036657] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:90:47:26
[    3.124162] NET: Registered protocol family 10
[    3.131889] Segment Routing with IPv6
[    3.144622] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
[    3.205440] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[    3.218154] systemd[1]: Detected architecture arm.
[    3.265514] systemd[1]: Set hostname to <patchbox>.
[    3.289409] usb 1-1.2: New USB device found, idVendor=0944, idProduct=0117, bcdDevice= 1.00
[    3.295630] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.301598] usb 1-1.2: Product: nanoKONTROL2
[    3.307603] usb 1-1.2: Manufacturer: KORG INC.
[    3.800088] systemd[1]: File /lib/systemd/system/systemd-journald.service:12 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[    3.812933] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[    4.360914] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    4.376870] systemd[1]: Listening on fsck to fsckd communication Socket.
[    4.401483] systemd[1]: Created slice system-getty.slice.
[    4.416736] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    4.442381] systemd[1]: Listening on Syslog Socket.
[    5.638489] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    6.177036] systemd-journald[126]: Received request to flush runtime journal from PID 1
[    7.768978] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    7.822726] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    7.822767] [vc_sm_connected_init]: start
[    7.836661] media: Linux media interface: v0.10
[    7.846070] [vc_sm_connected_init]: installed successfully
[    7.926564] videodev: Linux video capture interface: v2.00
[    8.137576] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    8.173663] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    8.180326] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    8.208453] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    8.261745] bcm2835_audio soc:audio: card created with 8 channels
[    8.263034] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    8.263085] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    8.276317] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    8.276366] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    8.296165] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    8.296230] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    8.420187] pisound: Searching for spi device...
[    8.420210] pisound: 	Found!
[    8.559425] pisound: Detected Pisound card:
[    8.559445] pisound: 	Serial:           PS-0DKBZGT
[    8.559456] pisound: 	Firmware Version: 1.01
[    8.559466] pisound: 	Hardware Version: 1.0
[    8.559476] pisound: 	Id:               1e93153555313630360b0e23
[    8.606287] snd-rpi-pisound soc:sound: snd-soc-dummy-dai <-> 3f203000.i2s mapping ok
[    8.756559] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    8.917698] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    9.090398] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[    9.100894] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[    9.113769] usbcore: registered new interface driver brcmfmac
[    9.339042] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[    9.339215] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[    9.340394] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 22 2019 01:59:28 version 7.45.98.94 (r723000 CY) FWID 01-3b33decd
[    9.811979] usbcore: registered new interface driver snd-usb-audio
[   12.331449] uart-pl011 3f201000.serial: no DMA platform data
[   12.425209] 8021q: 802.1Q VLAN Support v1.8
[   12.777348] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   12.777389] brcmfmac: power management disabled
[   13.297304] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   13.297894] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   14.433971] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   15.883134] ICMPv6: process `dhcpcd' is using deprecated sysctl (syscall) net.ipv6.neigh.wlan0.retrans_time - use net.ipv6.neigh.wlan0.retrans_time_ms instead
[   17.094797] Bluetooth: Core ver 2.22
[   17.095259] NET: Registered protocol family 31
[   17.095267] Bluetooth: HCI device and connection manager initialized
[   17.095296] Bluetooth: HCI socket layer initialized
[   17.095315] Bluetooth: L2CAP socket layer initialized
[   17.095441] Bluetooth: SCO socket layer initialized
[   17.116199] Bluetooth: HCI UART driver ver 2.3
[   17.116220] Bluetooth: HCI UART protocol H4 registered
[   17.116679] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   17.121132] Bluetooth: HCI UART protocol Broadcom registered
[   17.584243] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   17.584258] Bluetooth: BNEP filters: protocol multicast
[   17.584677] Bluetooth: BNEP socket layer initialized
[   17.683064] Bluetooth: RFCOMM TTY layer initialized
[   17.683098] Bluetooth: RFCOMM socket layer initialized
[   17.683131] Bluetooth: RFCOMM ver 1.11

When this log was saved, did you attempt to crash PD or reproduce the aconnect hang? I forgot to mention to take the log after the issue has occurred…

If it is after the issue, then it’s not showing any issues…

Actually I cannot reproduce the normal behavior, where aconnect doesn’t hang…

It’s a headless project, (read-only mode), and the patch starts at boot, this log is just after boot.
Normally Pd would start but it stays idle, printing the watchdog signaling pd.

sudo aconnect -l gives me this :

client 0: 'System' [type=kernel]
            0 'Timer           '
            1 'Announce        '
        	Connecting To: 128:0
        client 14: 'Midi Through' [type=kernel]
            0 'Midi Through Port-0'
        	Connecting To: 128:0[real:0]
        	Connected From: 128:0
        client 20: 'pisound' [type=kernel,card=1]
            0 'pisound MIDI PS-0DKBZGT'
        	Connecting To: 128:0[real:0]
        	Connected From: 128:0
        client 24: 'nanoKONTROL2' [type=kernel,card=2]
            0 'nanoKONTROL2 MIDI 1'
        	Connecting To: 128:0[real:0]
        	Connected From: 128:0
        client 129: 'pisound-ctl' [type=user,pid=503]
            0 'pisound-ctl     '
        	Connecting To: 128:0[real:0]
        	Connected From: 128:0
        client 130: 'RtMidiIn Client' [type=user,pid=561]
            0 'TouchOSC Bridge '
        	Connected From: 128:0
        client 131: 'RtMidiOut Client' [type=user,pid=561]
            0 'RtMidiIn Client:TouchOSC Bridge 130:0'
        	Connecting To: 128:0[real:0]

What is the output of:

sudo systemctl status jack
sudo systemctl status patchbox-init

Did you try starting the PD patch in GUI mode instead of automatic start? Do all PD patches hang, or is it a particular one?

Yes I tried in GUI mode, in no-gui, with or without X, it’s the same issue, Pd won’t start unless -nomidi is specified.
It actually hangs before opening any patch, here’s the output with verbose mode :
$pd -nogui -noaudio -verbose

    input channels = 0, output channels = 0
   Pd-0.50.2 ("") compiled for Debian (0.50.2-3) on 2020/02/24 at 22:30:39 UTC
    priority 6 scheduling enabled.`

running at normal (non-real-time) priority.

/usr/lib/puredata/bin/pd-watchdog
watchdog: signaling pd...
watchdog: signaling pd...
watchdog: signaling pd...

whereas :
$pd -nogui -noaudio -verbose -nomidi

        input channels = 0, output channels = 0
        Pd-0.50.2 ("")     compiled for Debian (0.50.2-3) on 2020/02/24 at 22:30:39 UTC
    priority 6 scheduling enabled.

    running at normal (non-real-time) priority.

    /usr/lib/puredata/bin/pd-watchdog
    input channels = 0, output channels = 0

ie working fine, I can open my patches as before, with audio. But I need MIDI…
Seems to be a midi setup that Pd doesn’t like.

Here is the output you asked

sudo systemctl status jack

gives :

jack.service - JACK Server
   Loaded: loaded (/lib/systemd/system/jack.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2020-12-10 21:13:51 GMT; 1min 48s ago
 Main PID: 438 (jackd)
    Tasks: 5 (limit: 2227)
   Memory: 87.6M
   CGroup: /system.slice/jack.service
           └─438 /usr/bin/jackd -t 2000 -R -P 95 -d alsa -d hw:pisound -r 48000 -p 64 -n 2 -X seq -s -S

Dec 10 21:13:52 patchbox jackdrc[438]: port created: Midi-Through:midi/playback_1
Dec 10 21:13:52 patchbox jackdrc[438]: port created: Midi-Through:midi/capture_1
Dec 10 21:13:52 patchbox jackdrc[438]: port created: pisound:midi/playback_1
Dec 10 21:13:52 patchbox jackdrc[438]: port created: pisound:midi/capture_1
Dec 10 21:13:52 patchbox jackdrc[438]: port created: nanoKONTROL2:midi/playback_1
Dec 10 21:13:52 patchbox jackdrc[438]: port created: nanoKONTROL2:midi/capture_1
Dec 10 21:13:56 patchbox jackdrc[438]: port created: pisound-ctl:midi/playback_1
Dec 10 21:13:56 patchbox jackdrc[438]: port created: pisound-ctl:midi/capture_1
Dec 10 21:14:02 patchbox jackdrc[438]: port created: RtMidiIn-Client:midi/capture_1
Dec 10 21:14:02 patchbox jackdrc[438]: port created: RtMidiOut-Client:midi/playback_1

And
sudo systemctl status patchbox-init

gives :

   ` patchbox-init.service - Patchbox Init
       Loaded: loaded (/lib/systemd/system/patchbox-init.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Thu 2020-12-10 21:14:02 GMT; 3min 34s ago `

Dec 10 21:13:59 patchbox systemd[1]: Starting Patchbox Init...
Dec 10 21:14:02 patchbox systemd[1]: patchbox-init.service: Succeeded.
Dec 10 21:14:02 patchbox systemd[1]: Started Patchbox Init.

Thanks for your help

What are the contents of /home/patch/.pdsettings and /root/.pdsettings?

cat /home/patch/.pdsettings 
audioapi: 5
noaudioin: False
audioindev1: 0 2
audioindevname1: JACK
noaudioout: False
audiooutdev1: 0 2
audiooutdevname1: JACK
audiobuf: 5
rate: 48000
callback: 0
blocksize: 64
midiapi: 1
nomidiin: False
midiindev1: 0
midiindevname1: ALSA MIDI device #1
nomidiout: False
midioutdev1: 0
midioutdevname1: ALSA MIDI device #1
path1: /home/patch/Documents/Pd/externals
npath: 1
standardpath: 1
verbose: 0
nloadlib: 0
defeatrt: 0
flags: -alsamidi -rt
zoom: 1
loading: no

And
sudo cat /root/.pdsettings
is giving the same output.

Luckily I made a backup image of the sd card before this issue happened, so the problem is kind of solved for me, but I’m still interested in what caused the issue.
I didn’t manage to reproduce the issue at the moment.

In the “working” version, where aconnect doesn’t hang, if I run
sudo systemctl jack status
I get an additional

Dec 09 07:34:47 patchbox jackdrc[380]: port created: Pure-Data:midi/capture_1
Dec 09 07:34:47 patchbox jackdrc[380]: port created: Pure-Data:midi/playback_2

That’s because in this case Pd does start, whereas Pd hangs at the MIDI intialization in the “buggy” version.
Apart that I can see no difference between the “working” and the “buggy” version in the other logs.

Anyway thanks for your help, if I find further informations about this I’ll let you know.

Are the .pdsettings the same in the working version?

Yes, it’s exactly the same

Hmm, I can’t think of what else to check right now. Do you remember some more significant details that led the system to the broken state? Some additional software installs, configuration changes, etc…

Please let us know as soon as this issue reoccurs on your backed up system. :slight_smile:

No I didn’t change any configuration, nor installed anything, the only “new” thing I can think of is having used two different nanoKontrol, never at the same time but switching from one to the other.

Yes I’ll let you know if it reoccurs, for now it’s been running without problems.

Thanks

1 Like