Skip to content

Commit 981ded2

Browse files
committed
Merge pull request #521 from xlz/usb-troubleshooting
Usb troubleshooting docs, closes #516.
2 parents da9e989 + bfd2ac1 commit 981ded2

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,21 @@ Messages in `dmesg` like this means bugs in the USB driver. Updating kernel migh
7272
[ 509.238580] xhci_hcd 0000:03:00.0: Assuming host is dying, halting host.
7373
```
7474

75+
`failed to submit transfer: LIBUSB_ERROR_IO` followed by `dmesg` messages
76+
```
77+
[ 1417.271120] kinect2_bridge: page allocation failure: order:7, mode:0x40d0
78+
...
79+
[ 1417.271230] [<ffffffff815e8f93>] proc_do_submiturb+0x5c3/0xbc0
80+
[ 1417.271235] [<ffffffff815ea088>] usbdev_do_ioctl+0xaf8/0xfb0
81+
82+
```
83+
means USB buffer allocation fails due to memory fragmentation. Reserve memory `sudo sysctl -w vm.min_free_kbytes=65536` or more (always less than 5% of total memory) to mitigate this.
84+
7585
Windows 7 does not have great USB 3.0 drivers. In our testing the above known working devices will stop working after running for a while. However, the official Kinect v2 SDK does not support Windows 7 at all, so there is still hope for Windows 7 users. Windows 8.1 and 10 have improved USB 3.0 drivers.
7686

7787
Disabling USB selective suspend/autosuspend might be helpful to ameliorate transfer problems.
7888

79-
When you report USB issues, please attach relevant debug log from running the program with environment variable `LIBUSB_DEBUG=4`, and relevant log from `dmesg`.
89+
When you report USB issues, please attach relevant debug log from running the program with environment variable `LIBUSB_DEBUG=3`, and relevant log from `dmesg`.
8090

8191
### I'm seeing the color camera stream, but no depth/IR (black windows).
8292

cmake_modules/FindLibUSB.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ IF(PKG_CONFIG_FOUND)
1616
SET(MODULE "libusb-1.0>=1.0.20")
1717
ENDIF()
1818
IF(LibUSB_FIND_REQUIRED)
19-
SET(LisUSB_REQUIRED "REQUIRED")
19+
SET(LibUSB_REQUIRED "REQUIRED")
2020
ENDIF()
2121
PKG_CHECK_MODULES(LibUSB ${LibUSB_REQUIRED} ${MODULE})
2222

src/transfer_pool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void TransferPool::submit(size_t num_parallel_transfers)
108108
}
109109

110110
if (failcount == num_parallel_transfers)
111-
LOG_ERROR << "all submissions failed. Try debugging with environment variable: LIBUSB_DEBUG=4.";
111+
LOG_ERROR << "all submissions failed. Try debugging with environment variable: LIBUSB_DEBUG=3.";
112112
}
113113

114114
void TransferPool::cancel()

src/usb_control.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ UsbControl::~UsbControl()
190190
}
191191

192192
#define CHECK_LIBUSB_RESULT(__CODE, __RESULT) if((__CODE = (__RESULT == LIBUSB_SUCCESS ? Success : Error)) == Error) LOG_ERROR
193-
#define WRITE_LIBUSB_ERROR(__RESULT) libusb_error_name(__RESULT) << " " << libusb_strerror((libusb_error)__RESULT) << ". Try debugging with environment variable: export LIBUSB_DEBUG=4 ."
193+
#define WRITE_LIBUSB_ERROR(__RESULT) libusb_error_name(__RESULT) << " " << libusb_strerror((libusb_error)__RESULT) << ". Try debugging with environment variable: export LIBUSB_DEBUG=3 ."
194194

195195
UsbControl::ResultCode UsbControl::setConfiguration()
196196
{

0 commit comments

Comments
 (0)