From 168c28d1e401a6741d404731ed24fc978d57ca14 Mon Sep 17 00:00:00 2001 From: pixl Date: Sun, 19 Jul 2020 01:35:26 -0400 Subject: [PATCH] Wait for device to initialize before addDevice For some reason, hidpp20 device names were badly set (e.g. 'Wireless Mouse MWireless' instead of 'Wireless Mouse MX Master'). Adding a 100ms delay to addDevice seems to have fixed it. --- src/logid/backend/raw/DeviceMonitor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/logid/backend/raw/DeviceMonitor.cpp b/src/logid/backend/raw/DeviceMonitor.cpp index 34d0cb8..f98ed48 100644 --- a/src/logid/backend/raw/DeviceMonitor.cpp +++ b/src/logid/backend/raw/DeviceMonitor.cpp @@ -101,6 +101,8 @@ void DeviceMonitor::run() if (action == "add") task::spawn([this, name=devnode]() { + // Wait for device to initialise + std::this_thread::sleep_for(std::chrono::milliseconds(100)); auto supported_reports = backend::hidpp::getSupportedReports( RawDevice::getReportDescriptor(name)); if(supported_reports)