Device Disconnected Error

Hi,
I am using Saleae 16 channel, when capture started then immediately I am getting error like “An error occurred during capture: DeviceSetupFailure” and then Device disconnected.
Note: I am using USB hub (tp-link) 4 channel and I tried direct connection with laptop then also I am facing same issue.

@raveendranasuva Sorry to hear about this. I have some questions / tests for you below:

  1. Which specific Saleae Logic model do you own? You can refer to the link below:
    How to Identify Each Saleae Device - Saleae Support

  2. Can you try running the solutions in the article below?
    Error Message: DeviceSetupFailure - Saleae Support

  3. How often are you seeing this error message? Does it appear every time you start a capture? Are you able to start any captures at all?

  4. Are you able to test on another PC? This might help determine if your Logic itself is faulty if it fails in the same way on another PC.

Thanks for your response.

@raveendranasuva I’m glad to hear your Logic Pro 16 works OK on another PC. This points to some sort of incompatibility with your PC, and your Logic hardware seems like it’s OK.

My first hunch is that your USB host controller might have some conflicts with our Logic device. Specifically, we’ve seen this issue in the past when using our logic analyzer with Etron USB host controllers.

I’d like to request some information from you with regards to your PC. As such, it may be best to continue our discussion over email. Would you mind sending me a message using the below link?
https://contact.saleae.com/hc/en-us/requests/new

In your message, please include the following.

  1. A link to this forum post so that I know it’s you.

  2. Can you share your USB host controller information? Instructions below:
    Finding Your USB 3.0 Host Controller Information - Saleae Support

  3. Can you share the make/model of your PC?

  4. Have you tried all USB ports directly on your PC, including USB 2.0 ports? On USB 2.0, the number of channels and sampling rates will be limited, but I’m curious to know if you are able to capture successfully. For tests moving forward, please also ensure you connect directly to your PC.

  5. Can you share your Machine ID with us?
    Sharing your Machine ID - Saleae Support

@timreyes ,
Thanks for your time and investigation,

  1. Saleae directly connected to PC then its capturing only 8 channels and some times disconnecting the capture from Saleae (But I am using Lenovo Thinkpad L480 its having USB 3.0)
  2. Not working with 4 channel USB hub. (In USB hub only Saleae connected then 8 channel working fine, but along with some UART to USB port converter connected then capture disconnecting).

@raveendranasuva Thanks for the added information. My comments are below

  1. Saleae directly connected to PC then its capturing only 8 channels and some times disconnecting the capture from Saleae (But I am using Lenovo Thinkpad L480 its having USB 3.0)

It looks like the Logic Pro 16 is somehow being identified as a USB 2.0 device. Have you tested connecting to all USB 3.0 ports, and is the behavior similar across all of them? I also notice that your laptop has USB-C ports. In case you have a USB-C to USB 3.0 micro adapter, it may be worth trying to connect to those ports as well.

  1. Not working with 4 channel USB hub. (In USB hub only Saleae connected then 8 channel working fine, but along with some UART to USB port converter connected then capture disconnecting).

What USB hub model are you using? Unfortunately, we typically do not recommend using USB hubs alongside our logic analyzers for this reason. As such, I’d like to first make sure that we can get your logic analyzer running reliably while connected directly to your PC.

In the meantime, I’d like to gather the missing information I previously requested from my last message. Feel free to send that over using the link below, as it may require sending sensitive information.
https://contact.saleae.com/hc/en-us/requests/new

I’m having this same issue on Logic 2.3.36 and 2.3.39.

The software is not handling Linux USB drivers correctly. It seems the larger number of lines I sample, the faster the decay of the USB driver.

I’ve reproduced this behavior on two different Linux machines. One using Pop!_OS 21.04 (Lenovo), the other using Pop!_OS 20.04 (System76) both using a Logic Pro 16.

Not talking with USB correctly has also had other side effects - like not working with an ST-LINK debugger (not the issue here - the Logic Pro is the ONLY device plugged into my computer other than the power cord).

Instead of forcing us to debug it clumsily through a forum post, why don’t you download Linux (it’s free) and reproduce it yourself. This happens so commonly you should be able to reproduce it as often as you want and get to the bottom of it.

@Zak Sorry to hear this… my responses below:

The software is not handling Linux USB drivers correctly. It seems the larger number of lines I sample, the faster the decay of the USB driver.

Can you let me know more details about the issue you are seeing? Are all 16 channels accessible? Are you getting the same “DeviceSetupFailure” error during your capture that appears more commonly when more channels are enabled?

Not talking with USB correctly has also had other side effects - like not working with an ST-LINK debugger (not the issue here - the Logic Pro is the ONLY device plugged into my computer other than the power cord).

This is unfortunately a known issue, and the typical symptom is that the Logic won’t connect at all, unless a specific sequence order is followed upon connecting both devices. The workaround is highlighted below based on findings from customer reports:

Instead of forcing us to debug it clumsily through a forum post, why don’t you download Linux (it’s free) and reproduce it yourself. This happens so commonly you should be able to reproduce it as often as you want and get to the bottom of it.

That’s Completely understandable. Apologies for coming off that way… We typically prefer to gather some information first before jumping head first into installing an OS that we don’t officially support. Our officially supported OSes are here (Supported Operating Systems - Saleae Support). Regardless, should we decide to install a particular OS to run some tests, this is certainly possible!

Edit: I understand that Pop OS is in fact a dertivative of Ubuntu, which is promising! I’m just not familiar with the nuances of the difference.

@timreyes,

Thank you for the thoughtful response.

  • Are all 16 channels accessible?

Yes, thank goodness.

  • Are you getting the same “DeviceSetupFailure” error during your capture that appears more commonly when more channels are enabled?

When the device fails during a capture it has a different error, like a read error (I don’t exactly remember), then it will no longer attempt to make new captures and will always return the “DeviceSetupFailure” message.

I use the Logic Pro 16 for work, and I had to bang through the signal debugging by restarting my machine multiple times. I am into a different part of the project now, and unfortunately I don’t have time to review the workarounds at this time.

I would also like to point out that Ubuntu 18.04 is approaching end of life, and several of us have moved on to 20.04. The kernel has been significantly upgraded between the two and it is useful for several programming tasks. It would be nice to see it officially supported sooner than later.

I have owned my Logic Pro 16 since they were brand new (I believe I pre-ordered it). I ABSOLUTELY LOVE THIS DEVICE and Saleae in general. However, the recent USB problems have been nothing short of infuriating, because the device is failing me when I need it most. I end up spending my time debugging your software, instead of debugging my device under test. Not to mention, having to COMPLETELY REBOOT MY MACHINE to make USB functional again makes it almost impossible to use it in my workflow.

I have gotten to the point where I dread pulling out my Saleae. This is the complete opposite experience I used to have. I love my Logic Pro 16, I love signal watching, but my device is becoming unusable. Please dig in and figure this out.

Thank you for you time and thoughtful response.

@Zak Thanks for all these details. As a potential quick workaround for now, would you mind trying our older Logic 1.2.18 software below?

The reason I mention the older software is because the failures you have described look very similar to the issues that have been reported in the past on Apple’s new M1 processors. You’ll see the details of the behavior in the section below under “Our Test Results.” It seemed that the older Logic 1.x software was a viable workaround to this, and this may save you from the headaches of this error while we look into this.

@Zak one more quick question - could you send us your kernel version? uname -r or uname -a should do it. We primarily use Ubuntu 20.04 over here too, but there have already been 3 major updates to Ubuntu 20.04 and I probably haven’t updated it yet.

5.13.0-7614-generic

@Zak We had a chance to install a few versions of Pop!_OS over here and we weren’t able to reproduce the issue. Specifically we tested 20.10 and 21.04 set up via dual-boot on a Thinkpad X1 Extreme Gen1.

I think you are getting the ReadTimeout error below:

Can you let me know your PC hardware and specs?

Also, let me know once you’ve had a chance to test the older Logic 1.x software as per my previous reply.

Hello Saleae Folks,

I know A LOT of time has passed, but I have a much more succinct repro of this issue.

Using Logic 2.3.47, I was inspecting some hardware and trying to understand why some I2C messages were failing, so I set up channels 0,1,2 as Vcc, SCL and SDA. I selected both the digital channels (using the built-in decoder) and the analog channels with sampling rate dialed up to the MAXIMUM supported analog and digital sampling rates.

Nearly every single measurement resulted in my USB driver crashing, which required me to reboot my device.

However, if I dialed the sampling rate down to MINIMUM supported analog and digital sampling rates, then I never experienced any problems.

I have a feeling the Logic app, is not respecting some USB throttling signal, which causes the USB driver to become overwhelmed and eventually causes it to crash.

I hope that helps. Sorry for the long delay, but I finally have time to work on resolving this long standing issue.

All the best,
Zak

@Zak Thanks for getting back to us on this. That’s unfortunate to hear that none of our software updates since then has solved this for you…

We tested this on Pop!_OS awhile back on one of our laptops via dual-boot and couldn’t reproduce the issue you were seeing.

When you get a chance, can you share the information below? We’ll need some more clues to work with.

When you mention the following:

I assume you are referring to the behavior you mentioned previously, is that correct?

Machine ID:

{
  "Environment":"production",
  "Branch":"master",
  "Commit":"89994d92bc0b31fcbd8b281a3e7ddc20da60822c",
  "Version":"2.3.47",
  "MachineID":"e70d425c-a32b-4500-9f82-6a5c0b6f4635",
  "PID":2271346
}

I have a System76 Serval (serw12).

Logic 1.2.40 fails in a reasonable way. It gracefully acknowledges it can’t keep pace, and prompts me if I would like to keep what it has so far or discard it.

image

Perhaps a check on the USB throughput was missed in version 2+.

If I click “Keep”, then I am able to review the capture. However, the application still dies with a core dump.

$ App\ Images/Logic-1.2.40-Linux.AppImage 
QCommandLineParser: option not defined: "websource"
QCommandLineParser: option not defined: "port"
Root Path: /tmp/.mount_Logic-Wfw7t8/usr/bin  [ /home/build/Software/Logic/Source/LogicBase/src/Environment.cpp; Environment; 184 ]
Release Mode; analyzer path is /tmp/.mount_Logic-Wfw7t8/usr/bin/Analyzers  [ /home/build/Software/Logic/Source/LogicBase/src/Environment.cpp; Environment; 198 ]
Settings path is /home/zak/.config/Logic  [ /home/build/Software/Logic/Source/LogicBase/src/Environment.cpp; Environment; 456 ]
Errors path is /home/zak/.local/share/Logic/Errors  [ /home/build/Software/Logic/Source/LogicBase/src/Environment.cpp; Environment; 457 ]
Analyzers path is /tmp/.mount_Logic-Wfw7t8/usr/bin/Analyzers  [ /home/build/Software/Logic/Source/LogicBase/src/Environment.cpp; Environment; 458 ]
Databases path is /home/zak/.local/share/Logic/Databases  [ /home/build/Software/Logic/Source/LogicBase/src/Environment.cpp; Environment; 459 ]
Calibration path is /home/zak/.local/share/Logic/Calibration  [ /home/build/Software/Logic/Source/LogicBase/src/Environment.cpp; Environment; 460 ]
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Build date used by AutoSunset: Mar 10 2022  [ /home/build/Software/Logic/Source/Logic/src/AutoSunset.cpp; AutoSunset; 13 ]
libpng warning: iCCP: known incorrect sRGB profile
Hardware Information took 11 milliseconds to generate  [ /home/build/Software/Logic/Source/Logic/src/HardwareInformation.cpp; HardwareInformation; 272 ]
Hardware Information took 10 milliseconds to generate  [ /home/build/Software/Logic/Source/Logic/src/HardwareInformation.cpp; HardwareInformation; 272 ]
  [ /home/build/Software/Logic/Source/LogicInterface/src/UsbDevice.cpp; UsbDevice; 59 ]
  [ /home/build/Software/Logic/Source/LogicInterface/src/UsbDevice.cpp; IsFirmwareDownloaded; 139 ]
3 endpoints  [ /home/build/Software/Logic/Source/LogicInterface/src/UsbDevice.cpp; IsFirmwareDownloaded; 143 ]
  [ /home/build/Software/Logic/Source/LogicInterface/src/LinuxUsbDevice.cpp; ReseedDevice; 100 ]
SUPER SPEED  [ /home/build/Software/Logic/Source/LogicInterface/src/LogicProfessionalDevice.cpp; LogicProfessionalDevice; 95 ]
Logic Pro Firmware Compiled Oct 27 2017  15:29:14  [ /home/build/Software/Logic/Source/LogicInterface/src/LogicProfessionalDevice.cpp; LogicProfessionalDevice; 102 ]
Bitstream download took 2.418618 seconds, over 455 sections.  [ /home/build/Software/Logic/Source/LogicInterface/src/LogicAnalyzerDevice.cpp; DownloadBitstream; 1084 ]
temp: 30.000000 C  [ /home/build/Software/Logic/Source/LogicInterface/src/LogicProfessionalDevice.cpp; LogicProfessionalDevice; 229 ]
  [ /home/build/Software/Logic/Source/LogicInterface/src/LinuxUsbDevice.cpp; ReseedDevice; 100 ]
First device connected. Creating Primary Display.  [ /home/build/Software/Logic/Source/Logic/src/LogicWindow_Devices.cpp; AttachedDevicesChangedSlot; 134 ]
GeneratePixmapEllipses: 0.618093 seconds  [ /home/build/Software/Logic/Source/Logic/src/AnalogDisplayEngine.cpp; AnalogDisplayEngine; 35 ]
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
device change has triggered sprucing up the empty capture tab.  [ /home/build/Software/Logic/Source/Logic/src/LogicWindow_Controller.cpp; ActiveDeviceChanged; 477 ]
setting PrimaryDisplay's Session to NULL.  [ /home/build/Software/Logic/Source/Logic/src/PrimaryDisplay.cpp; SetSession; 693 ]
Newer calibration file availible! downloading...  [ /home/build/Software/Logic/Source/DeviceCollection/src/CalibrationManager.cpp; GetDeviceCalibrationInfoCompleteSlot; 389 ]
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
QPainter::begin: Paint device returned engine == 0, type: 3
button 1 clicked  [ /home/build/Software/Logic/Source/Logic/src/SegmentedControl.cpp; clickedSlot; 153 ]
button 2 clicked  [ /home/build/Software/Logic/Source/Logic/src/SegmentedControl.cpp; clickedSlot; 153 ]
button 2 clicked  [ /home/build/Software/Logic/Source/Logic/src/SegmentedControl.cpp; clickedSlot; 153 ]
button 2 clicked  [ /home/build/Software/Logic/Source/Logic/src/SegmentedControl.cpp; clickedSlot; 153 ]
button 3 clicked  [ /home/build/Software/Logic/Source/Logic/src/SegmentedControl.cpp; clickedSlot; 153 ]
selected time: 5.000000  [ /home/build/Software/Logic/Source/Logic/src/DeviceSettingsPopover.cpp; SetNewDurration; 1129 ]
selected time: 10.000000  [ /home/build/Software/Logic/Source/Logic/src/DeviceSettingsPopover.cpp; SetNewDurration; 1129 ]
Popover Close event  [ /home/build/Software/Logic/Source/Logic/src/DeviceSettingsPopover.cpp; closeEvent; 1350 ]
device change has triggered sprucing up the empty capture tab.  [ /home/build/Software/Logic/Source/Logic/src/LogicWindow_Controller.cpp; ActiveDeviceChanged; 477 ]
setting PrimaryDisplay's Session to NULL.  [ /home/build/Software/Logic/Source/Logic/src/PrimaryDisplay.cpp; SetSession; 693 ]
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::begin: Paint device returned engine == 0, type: 3
button 2 clicked  [ /home/build/Software/Logic/Source/Logic/src/SegmentedControl.cpp; clickedSlot; 153 ]
button 1 clicked  [ /home/build/Software/Logic/Source/Logic/src/SegmentedControl.cpp; clickedSlot; 153 ]
button 1 clicked  [ /home/build/Software/Logic/Source/Logic/src/SegmentedControl.cpp; clickedSlot; 153 ]
button 1 clicked  [ /home/build/Software/Logic/Source/Logic/src/SegmentedControl.cpp; clickedSlot; 153 ]
button 2 clicked  [ /home/build/Software/Logic/Source/Logic/src/SegmentedControl.cpp; clickedSlot; 153 ]
button 2 clicked  [ /home/build/Software/Logic/Source/Logic/src/SegmentedControl.cpp; clickedSlot; 153 ]
button 1 clicked  [ /home/build/Software/Logic/Source/Logic/src/SegmentedControl.cpp; clickedSlot; 153 ]
Starting capture with device ID: 6530629092524956442, Type: 7  [ /home/build/Software/Logic/Source/Logic/src/LogicWindow_Collection.cpp; startSlot; 53 ]
Migrating API analyzer 1 from session 0 to session 1  [ /home/build/Software/Logic/Source/Logic/src/ApiServer.cpp; MigrateAnalyzer; 1190 ]
Migrating API analyzer 2 from session 0 to session 1  [ /home/build/Software/Logic/Source/Logic/src/ApiServer.cpp; MigrateAnalyzer; 1190 ]
Creating and Starting API capture session 1  [ /home/build/Software/Logic/Source/Logic/src/ApiServer.cpp; CreateNewCaptureSession; 352 ]
Starting capture. LCM: 250000000, Digital:250000000, Analog:50000000, Digital Multiplier:1, Analog Multipler:5, Device Type:7  [ /home/build/Software/Logic/Source/Logic/src/DataFacade.cpp; StartCollection; 295 ]
ideal transfer size 10633216 bytes exceeds limit 1638400, capping transfer size.  [ /home/build/Software/Logic/Source/LogicInterface/src/LogicAnalyzerDevice.cpp; AdjustTransferSize; 237 ]
  [ /home/build/Software/Logic/Source/LogicInterface/src/LinuxUsbDevice.cpp; ReseedDevice; 100 ]
setting PrimaryDisplay's Session to a valid session, 1  [ /home/build/Software/Logic/Source/Logic/src/PrimaryDisplay.cpp; SetSession; 695 ]
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::end: Painter not active, aborted
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::end: Painter not active, aborted
successfully submitted 1000 URBsread timeout  [ /home/build/Software/Logic/Source/LogicInterface/src/LinuxUsbDevice.cpp; ReadThread; 332 ]
RecoverableException: usb_bulk_write sent the wrong number of bytes. -110 4  [ /home/build/Software/Logic/Source/LogicInterface/src/LinuxUsbDevice.cpp; Write; 127 ]
Failed to send the stop command to the device. the device might not be responding.  [ /home/build/Software/Logic/Source/LogicInterface/src/LinuxUsbDevice.cpp; ReadThread; 365 ]
cleanup stream discarded 1000 URBs. 0 URBs never queued
Successful transfers: 442  [ /home/build/Software/Logic/Source/LogicInterface/src/LinuxUsbDevice.cpp; ReadThread; 388 ]
On Error Event. Id: 6530629092524956442, Error: 1  [ /home/build/Software/Logic/Source/Logic/src/DataCollector.cpp; OnError; 116 ]
Capture error condition detected by GetCaptureProgress when capture already triggered, but we're still killing all threads. Possible error condition.  [ /home/build/Software/Logic/Source/Logic/src/ApiServer.cpp; GetCaptureProgress; 467 ]
Stopping Device!  [ /home/build/Software/Logic/Source/LogicInterface/src/LogicProfessionalDevice.cpp; Stop; 425 ]
Error condition detected!  [ /home/build/Software/Logic/Source/Logic/src/CaptureMonitor.cpp; UpdateState; 158 ]
Successfull collection complete with id: 1  [ /home/build/Software/Logic/Source/Logic/src/LogicWindow_Collection.cpp; CollectionCompleteSlot; 438 ]
libpng warning: iCCP: known incorrect sRGB profile
Popover Close event  [ /home/build/Software/Logic/Source/Logic/src/DeviceSettingsPopover.cpp; closeEvent; 1350 ]
Starting capture with device ID: 6530629092524956442, Type: 7  [ /home/build/Software/Logic/Source/Logic/src/LogicWindow_Collection.cpp; startSlot; 53 ]
Migrating API analyzer 1 from session 1 to session 0  [ /home/build/Software/Logic/Source/Logic/src/ApiServer.cpp; MigrateAnalyzer; 1190 ]
Migrating API analyzer 2 from session 1 to session 0  [ /home/build/Software/Logic/Source/Logic/src/ApiServer.cpp; MigrateAnalyzer; 1190 ]
setting PrimaryDisplay's Session to NULL.  [ /home/build/Software/Logic/Source/Logic/src/PrimaryDisplay.cpp; SetSession; 693 ]
Setting API Session to 0. Previous id: 1  [ /home/build/Software/Logic/Source/Logic/src/ApiServer.cpp; SetActiveSession; 521 ]
Deleting API Session 1. Current id: 0  [ /home/build/Software/Logic/Source/Logic/src/ApiServer.cpp; DeleteSession; 555 ]
API Session destructor. ID: 1  [ /home/build/Software/Logic/Source/Logic/src/ApiServer.cpp; ~ServerSession; 595 ]
  [ /home/build/Software/Logic/Source/DeviceCollection/src/DeviceCollection.cpp; ~DeviceCollection; 18 ]
  [ /home/build/Software/Logic/Source/DeviceCollection/src/Device.cpp; ~Device; 265 ]
  [ /home/build/Software/Logic/Source/Logic/src/ConditionManagerImplementation.cpp; ~ConditionManagerImplementation; 63 ]
Session 1 that should have been deleted still exists. Use Count: 22  [ /home/build/Software/Logic/Source/Logic/src/LogicWindow_Collection.cpp; startSlot; 217 ]
Migrating API analyzer 1 from session 0 to session 2  [ /home/build/Software/Logic/Source/Logic/src/ApiServer.cpp; MigrateAnalyzer; 1190 ]
Migrating API analyzer 2 from session 0 to session 2  [ /home/build/Software/Logic/Source/Logic/src/ApiServer.cpp; MigrateAnalyzer; 1190 ]
Creating and Starting API capture session 2  [ /home/build/Software/Logic/Source/Logic/src/ApiServer.cpp; CreateNewCaptureSession; 352 ]
Starting capture. LCM: 250000000, Digital:125000000, Analog:50000000, Digital Multiplier:2, Analog Multipler:5, Device Type:7  [ /home/build/Software/Logic/Source/Logic/src/DataFacade.cpp; StartCollection; 295 ]
RecoverableException: usb_bulk_write sent the wrong number of bytes. -110 8  [ /home/build/Software/Logic/Source/LogicInterface/src/LinuxUsbDevice.cpp; Write; 127 ]
Terminated called  [ /home/build/Software/Logic/Source/Logic/Main.cpp; SetStdTerminateHandler; 155 ]
Aborted (core dumped)

The next time I launched it prompted me to send a error report (but failed to send it), and it also was unable find my device and prompted me to unplug and replug it back in. The reason it can’t find it is because it crashed my USB driver (just like v2+).

Thanks for digging into this again, I appreciate it!
Zak

@Zak Whoa… something really strange is going on here, and it seems to occur on both the Logic 2 app and the older Logic 1.x app (albeit failing in slightly different ways):

I’m going to need to pull in our software team later this week (hopefully on Wednesday :crossed_fingers:)

In the meantime, I wanted to double check if your Logic Pro 16 itself may be faulty. Do you happen to have another PC with an officially supported OS that you can test your Pro 16 on? This can help rule out a potential hardware issue, as well as a potential incompatibility with PopOS. I briefly read through our previous discussion and couldn’t find this information.

I have the same issue using a Logic Pro 16 under Ubuntu 20.04 LTS on a Lenovo X1 Extreme Gen4.

Especially considering Saleae’s recent price hike ($1400 … SRSLY?!) the quality of the Saleae currently simply does not justify such an expense. I used to love this software. Now it is just crap.

  • the Logic Pro16 arbitrarily disconnects either before or after making recordings
  • the app image way too often simply quits … without any useful error message

With 2.3.50 I was under the impression, running it from commandline with option --no-sandbox helped to get more stability … but with 2.3.51 it only got worse.

Please Saleae, fix those problems, otherwise we will all be using your competitors products that only cost 1/4 and provide a proper hardware trigger input and output …

Interesting thought, we did see a similar issue with another customer not too long ago.

Our device relies on a steady stream of USB read requests (IN transfers) in order to ensure that the device side buffer does not overflow during a capture. That overflow is what causes the “could not keep up” error (aka read timeout, due to the device stopping the stream on the overflow condition)

To ensure that we’re able to run smoothly, our software queues up a large amount of read operations. Unfortunately, there is no guidance for exactly how much we can safely queue up on Linux, so we attempt to queue up 33ms worth of data, but cap the queue to 1000 URBs.

Could you run some tests for me? Our software can use an environment variable to override the USB transfer size limit, which we internally set to 1000 URBs, 1000 * 16 * 1024 = 16384000 bytes by default. Values used must be a multiple of 16384.

For each test, please close the software and disconnect the device. Then, from a terminal, set the environment variable and launch Logic.

Then, connect the Logic Pro 16, and run a capture, with the timer mode, set to say 30 seconds. Disconnect any inputs, and run the following tests:
1 digital channel @ 500 MS/s. (17% max USB throughput)
2 digital channels @ 500 MS/s. (33% max USB throughput)
3 digital channels @ 500 MS/s. (50% max USB throughput)
4 digital channels @ 500 MS/s. (67% max USB throughput)
5 digital channels @ 500 MS/s. (83% max USB throughput)
6 digital channels @ 500 MS/s. (100% max USB throughput)

For each test, document:

  • did the capture complete, after the 30 second timer expired?
  • did the capture collect some data, but end early with a read timeout? (if so, how many seconds of data were recorded?)
  • did the capture collect no data, and end with a read timeout?
  • did the capture collect no data, and end with a device setup failure?

Then close the software, disconnect the device, and start over.

Please run the test once for each of these environment variables:
export SALEAE_USB_TRANSFER_LIMIT=102400
export SALEAE_USB_TRANSFER_LIMIT=1024000
export SALEAE_USB_TRANSFER_LIMIT=2048000
export SALEAE_USB_TRANSFER_LIMIT=4096000
export SALEAE_USB_TRANSFER_LIMIT=8192000
export SALEAE_USB_TRANSFER_LIMIT=16384000

Please also send me the output of lspci -k.

Quick background: all 3 of our developers (myself included) spend a significant portion of our time developing and testing the app from Linux (Ubuntu 20 these days). We test every release on Mac, Linux, and Windows. These problems are often related to a specific combination of USB 3.0 host controller hardware & Linux kernel version, not to say it isn’t ultimately a bug in our software though. I’d love to get to the bottom of these issues and get them fixed for you, and everyone else experiencing them.

Ubuntu 20.04, Lenovo Extreme X1 Gen4

Saleae is always connected to top-right USB (right next to power button) w/o USB hub in between

output from: lspci -k

00:00.0 Host bridge: Intel Corporation Device 9a36 (rev 05)
Subsystem: Lenovo Device 22e4
00:01.0 PCI bridge: Intel Corporation Device 9a01 (rev 05)
Kernel driver in use: pcieport
00:02.0 VGA compatible controller: Intel Corporation Device 9a60 (rev 01)
Subsystem: Lenovo Device 22e4
Kernel driver in use: i915
Kernel modules: i915
00:04.0 Signal processing controller: Intel Corporation Device 9a03 (rev 05)
Subsystem: Lenovo Device 22e4
Kernel driver in use: proc_thermal
Kernel modules: processor_thermal_device
00:06.0 PCI bridge: Intel Corporation Device 9a0f (rev 05)
Kernel driver in use: pcieport
00:07.0 PCI bridge: Intel Corporation Device 9a2d (rev 05)
Kernel driver in use: pcieport
00:07.2 PCI bridge: Intel Corporation Device 9a2f (rev 05)
Kernel driver in use: pcieport
00:0d.0 USB controller: Intel Corporation Device 9a17 (rev 05)
Subsystem: Lenovo Device 22e4
Kernel driver in use: xhci_hcd
Kernel modules: xhci_pci
00:0d.2 USB controller: Intel Corporation Device 9a1f (rev 05)
Subsystem: Lenovo Device 22e4
Kernel driver in use: thunderbolt
Kernel modules: thunderbolt
00:0d.3 USB controller: Intel Corporation Device 9a21 (rev 05)
Subsystem: Lenovo Device 22e4
Kernel driver in use: thunderbolt
Kernel modules: thunderbolt
00:14.0 USB controller: Intel Corporation Device 43ed (rev 11)
Subsystem: Lenovo Device 22e4
Kernel driver in use: xhci_hcd
Kernel modules: xhci_pci
00:14.2 RAM memory: Intel Corporation Device 43ef (rev 11)
Subsystem: Lenovo Device 22e4
00:15.0 Serial bus controller [0c80]: Intel Corporation Device 43e8 (rev 11)
Subsystem: Lenovo Device 22e4
Kernel driver in use: intel-lpss
Kernel modules: intel_lpss_pci
00:16.0 Communication controller: Intel Corporation Device 43e0 (rev 11)
Subsystem: Lenovo Device 22e4
Kernel driver in use: mei_me
Kernel modules: mei_me
00:1c.0 PCI bridge: Intel Corporation Device 43b8 (rev 11)
Kernel driver in use: pcieport
00:1c.6 PCI bridge: Intel Corporation Device 43be (rev 11)
Kernel driver in use: pcieport
00:1f.0 ISA bridge: Intel Corporation Device 4389 (rev 11)
Subsystem: Lenovo Device 22e4
00:1f.3 Multimedia audio controller: Intel Corporation Device 43c8 (rev 11)
Subsystem: Lenovo Device 22e4
Kernel driver in use: sof-audio-pci-intel-tgl
Kernel modules: snd_hda_intel, snd_sof_pci_intel_tgl
00:1f.4 SMBus: Intel Corporation Device 43a3 (rev 11)
Subsystem: Lenovo Device 22e4
Kernel driver in use: i801_smbus
Kernel modules: i2c_i801
00:1f.5 Serial bus controller [0c80]: Intel Corporation Device 43a4 (rev 11)
Subsystem: Lenovo Device 22e4
01:00.0 VGA compatible controller: NVIDIA Corporation Device 2520 (rev a1)
Subsystem: Lenovo Device 22e4
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
01:00.1 Audio device: NVIDIA Corporation Device 228e (rev a1)
Subsystem: Lenovo Device 22e4
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
04:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a80a
Subsystem: Samsung Electronics Co Ltd Device a801
Kernel driver in use: nvme
Kernel modules: nvme
09:00.0 Network controller: Intel Corporation Device 2725 (rev 1a)
Subsystem: Intel Corporation Device 0020
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi
0a:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)
Subsystem: Lenovo RTS525A PCI Express Card Reader
Kernel driver in use: rtsx_pci
Kernel modules: rtsx_pci

Running the suggested tests:

set export SALEAE_USB_TRANSFER_LIMIT=102400
starting app; connecting Saleae
capture completed – 1 digital channel @ 500 MS/s. (17% max USB throughput)
capture completed – 2 digital channels @ 500 MS/s. (33% max USB throughput)
ReadTimeout @ approx 6.4s – 3 digital channels @ 500 MS/s. (50% max USB throughput)
ReadTimeout @ approx 4.8s – 4 digital channels @ 500 MS/s. (67% max USB throughput)
ReadTimeout @ approx 1.2s – 5 digital channels @ 500 MS/s. (83% max USB throughput)
ReadTimeout @ < 0.3s – 6 digital channels @ 500 MS/s. (100% max USB throughput)

closing app; disconnecting Saleae

export SALEAE_USB_TRANSFER_LIMIT=1024000
capture completed – 1 digital channel @ 500 MS/s. (17% max USB throughput)
unknown error occured; Saleae disconnected; app quit unexpectedly close to 30s or after completion of capture – 2 digital channels @ 500 MS/s. (33% max USB throughput)
same behavior when I restart the app/reconnect Saleae and do the same test again

closing app; disconnecting Saleae
export SALEAE_USB_TRANSFER_LIMIT=2048000
starting app; connecting Saleae

Unknown Error right after starting the app; ReadQueueError when trying to start capture
same behavior after reconnecting Saleae

closing app; disconnecting Saleae
export SALEAE_USB_TRANSFER_LIMIT=4096000
starting app; connecting Saleae

ReadQueueError when trying to start capture
same behavior after reconnecting Saleae

closing app; disconnecting Saleae
export SALEAE_USB_TRANSFER_LIMIT=8192000
starting app; connecting Saleae
Saleae keeps reconnecting and after 2-3 attempts the app quits

closing app; disconnecting Saleae
export SALEAE_USB_TRANSFER_LIMIT=16384000
starting app; connecting Saleae
ReadQueueError when trying to start capture

Now … this was ‘just’ running the Saleae … in parallel, I’m using the Glasgow Explorer to test something. 3 channels @ 500 MS/s; running Saleae is fine.
Running Saleae plus a simple test with the Glasgow Explorer in parallel – ReadTimeout.

All tests are done with --no-sandbox mode

Just opening recorded sessions sometimes causes the app to quit unexpectedly (no Saleae connected). This behavior was observed on an Intel NUC9 also.

My setup on the Lenovo Extreme X1 Gen4 is a little bit more complex:
one of the USB-C is used to connect ‘a messy chain’ of USB devices: two USB-C daisy chained displays with a USB hub connected
the other USB-C is not used
one USB-A is used for the Saleae
the other USB-A is not used

I have a Saleae and a product from a competitor; this one works fine. Just the software is not as snappy and nice as Saleae’s which is why I preferred Saleae’s app in the past.